Giter VIP home page Giter VIP logo

cspn's Introduction

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.

apprach

Instructions:

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 create_saliency_raw.py and create_saliency_images.py in DCSM folder.

  2. To create the saliency maps, run the file create_saliency_raw.py 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:

  1. create_saliency_images.py.

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 (*_CSPN.py 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 evaluate_VOC_val.py 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.

results

For remarks or questions, please drop me an email ([email protected]).

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}
}

cspn's People

Watchers

James Cloos avatar EnQing626 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.