Skip to content
Implementation of SegNet: A Deep Convolutional Encoder-Decoder Architecture for Semantic Pixel-Wise Labelling
Branch: segnet-cleaned
Clone or download
Latest commit 344c113 Mar 15, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmake Merge pull request #2240 from nsubtil/cmake-build-dependencies May 30, 2015
data [example] image classification web demo Jul 12, 2014
docs [docs] drop out-of-date reference to dev branch Jun 10, 2015
examples Removed old segnet model, replaced by tutorial repo Jan 18, 2016
include/caffe fix make test after CPU-only build Sep 17, 2017
matlab Update ilsvrc_2012_mean.mat to W x H x C, update demo and add comments May 30, 2015
models Remove unnecessary filler parameter in the sample model Jun 2, 2015
python Merge pull request #2522 from MartinThoma/moose May 30, 2015
scripts [travis] install lmdb through git mirror May 30, 2015
src fix make test after CPU-only build Sep 17, 2017
tools Merge pull request #2350 from drdan14/log-parser-python-improved May 30, 2015
.Doxyfile update doxygen config to stop warnings Sep 3, 2014
.gitignore ignore pycharm files Feb 22, 2015
.travis.yml [travis] run pytest Jan 7, 2015
CMakeLists.txt Build gflags and glog through CMake if not found in the system Apr 2, 2015 clarify the license and copyright terms of the project Aug 7, 2014 replace bundled install instructions with link to site Feb 10, 2014
LICENSE Fixed incorrect licence link Jan 9, 2016
Makefile Fix OSX El Capitan CUDA incompatibility, by adding lib to rpath Aug 3, 2016
Makefile.config.example Add commented out helpers for homebrew users Apr 2, 2015 Update Apr 26, 2017
caffe.cloc [fix] stop cloc complaint about cu type Sep 4, 2014

Caffe SegNet

This is a modified version of Caffe which supports the SegNet architecture

As described in SegNet: A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation Vijay Badrinarayanan, Alex Kendall and Roberto Cipolla, PAMI 2017 []

Updated Version:

This version supports cudnn v2 acceleration. @TimoSaemann has a branch supporting a more recent version of Caffe (Dec 2016) with cudnn v5.1:

Getting Started with Example Model and Webcam Demo

If you would just like to try out a pretrained example model, then you can find the model used in the SegNet webdemo and a script to run a live webcam demo here:

For a more detailed introduction to this software please see the tutorial here:


Prepare a text file of space-separated paths to images (jpegs or pngs) and corresponding label images alternatively e.g. /path/to/im1.png /another/path/to/lab1.png /path/to/im2.png /path/lab2.png ...

Label images must be single channel, with each value from 0 being a separate class. The example net uses an image size of 360 by 480.

Net specification

Example net specification and solver prototext files are given in examples/segnet. To train a model, alter the data path in the data layers in net.prototxt to be your dataset.txt file (as described above).

In the last convolution layer, change num_output to be the number of classes in your dataset.


In solver.prototxt set a path for snapshot_prefix. Then in a terminal run ./build/tools/caffe train -solver ./examples/segnet/solver.prototxt


If you use this software in your research, please cite our publications: Alex Kendall, Vijay Badrinarayanan and Roberto Cipolla "Bayesian SegNet: Model Uncertainty in Deep Convolutional Encoder-Decoder Architectures for Scene Understanding." arXiv preprint arXiv:1511.02680, 2015. Vijay Badrinarayanan, Alex Kendall and Roberto Cipolla "SegNet: A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation." PAMI, 2017.


This extension to the Caffe library is released under a creative commons license which allows for personal and research use only. For a commercial license please contact the authors. You can view a license summary here:

You can’t perform that action at this time.