Skip to content

csgaobb/SEC

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seed, Expand, Constrain: Three Principles for Weakly-Supervised Image Segmentation

Created by Alexander Kolesnikov and Christoph Lampert at IST Austria.

Disclaimer: the code was tested on Ubuntu 14.04 LTS.

Dependencies

  • Python packages:
      $ pip install -r python-dependencies.txt
  • caffe: installation instructions are available at http://caffe.berkeleyvision.org/installation.html. Note, you need to compile caffe with python wrapper and support for python layers.

  • Fully connected CRF wrapper (requires the Eigen3 package).

      $ pip install CRF/

Adding new loss layers to caffe

In order to add new loss layers to caffe install the pylayers package, provided in this repository:

      $ pip install pylayers/

How to train SEC model

  • Go into the training directory:
      $ cd training
  • Download the initial model (~80 MB) pretrained on Imagenet:
      $ wget http://ccvl.stat.ucla.edu/ccvl/init_models/vgg16_20M.caffemodel
  • Decompress localization cues:
      $ gzip -kd localization_cues/localization_cues.pickle.gz
  • Set root_folder parameter in train.prototxt to the directory with PASCAL VOC 2012 images

  • Run caffe:

      $ caffe train --solver solver.prototxt --weights vgg16_20M.caffemodel --gpu <gpu_id>

The trained model will be created in training/models

How to deploy the SEC model

  • Go into the deploy directory:
      $ cd deploy
  • Download pretrained SEC model (~80 MB):
      $ wget http://pub.ist.ac.at/~akolesnikov/SEC-data/SEC.caffemodel
  • Run the model on any image (smooth options switches on CRF postprocessing):
      $ python demo.py --model SEC.caffemodel --image <PATH TO IMAGE> --smooth

About

Seed, Expand, Constrain: Three Principles for Weakly-Supervised Image Segmentation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 73.3%
  • C++ 22.2%
  • Python 4.0%
  • Other 0.5%