Skip to content


Repository files navigation

Convolutional Simplex Projection Network (CSPN)

In this work we propose an optimization approach for solving weakly supervised semantic segmentation with deep Convolutional Neural Networks(CNN). The method introduces a novel layer which applies simplex projection on the output of a neural network in order to satisfy object size constraints. Although we demonstrate the performance of the approach in a semantic segmentation application, the method is generic and can be integrated in any given network architecture. The goal of intruducing such a layer is to reduce the set of feasible solutions to only those that satisfy some given constraints. This implementation builds on SEC. Further details on the approach can be found in the paper. This paper has been accepted in BMVC 2018.



In order to use our algorithm, you need to train a modified version of SEC CNN. But first we need some preprocessing steps.

To obtain object size estimates, we rely on an external module for which you need to download the trained model.

  1. download DCSM library, and DCSM trained model. Place the files and in DCSM folder.

  2. To create the saliency maps, run the file after upadting the paths to match your machine.

These are raw class-specific saliency maps, we merge them into a single image for each input image. To do that, run:


In this file, you need to specify a threshold value above which pixels count as salient areas, and background otherwise. In our experiments the threshold value 0.125 performed best. Note that mutliple classes could be above this threshold, so to prevent a pixel from being assigned to more than one class concurrently, we take the class with the maximum score.

  1. download SEC and replace their train.prototxt with our train.prototxt.

  2. You may now start training your segmentation CNN by typing in the command:

~/libs/caffe/build/tools/caffe train --solver solver.prototxt -weights vgg16_20M.caffemodel

(Make sure that Caffe Python layers (* as well as SEC layers) are added to your system path so that Caffe can detect them.)

  1. After training is finished, you can run the code in to evaluate the trained CNN on Pascal VOC validation dataset.

  2. Alternatively, you can download the trained model.

The optimal performance when integrating the new approach is reached at an early stage (iteration 3000), whereas in the baseline approach, a larger number of iterations was required. This fast convergence can be attributed to the fact that the space of feasible solutions is reduced only to those that are within the constraint set.


For remarks or questions, please drop me an email (

If you use our approach or rely on it, please cite our paper:

   author = {{Briq}, R. and {Moeller}, M. and {Gall}, J.},
    title = "{Convolutional Simplex Projection Network (CSPN) for Weakly Supervised Semantic Segmentation}",
    journal = {arXiv preprint arXiv:1807.09169},
    year = {2018}


No description, website, or topics provided.







No releases published


No packages published