Unsupervised Segmentation using MASON
Unsupervised Segmentation of Images
Installation
- Clone this repository
git clone https://github.com/JosephKJ/MASON
Let's call the directory as ROOT
- Clone the Caffe repository
cd $ROOT
git clone https://github.com/Microsoft/caffe.git
[optional]
cd caffe
git reset --hard 1a2be8e
-
Setup CAFFE
-
Get the ImageNet pretrained VGG-16 network(caffemodel only) and place it in
./model
folder.
caffemodel_url: http://www.robots.ox.ac.uk/~vgg/software/very_deep/caffe/VGG_ILSVRC_16_layers.caffemodel
Demo
You can run python segment_image.py
.
This script will take the image located in ./data/demo/2007_000363.jpg
, computes the objectness heatmap, uses it with GrabCut and gets the result displayed on screen. (NB: This method doesnot require any bounding box annotation.)
Output
(Legend: Input image -- Objectness heat map -- Segmentation using MASON and GrabCut -- Segmentation using GrabCut alone)
semi-supervised-SS.py
expects bounding box information from a dataset. The code can work out of the box with Pascal VOC dataset.