Home

Awesome

TF Image Segmentation: Image Segmentation framework

The aim of the TF Image Segmentation framework is to provide/provide a simplified way for:

So far, the framework contains an implementation of the FCN models (training and evaluation) in Tensorflow and TF-Slim library with training routine, reported accuracy, trained models for PASCAL VOC 2012 dataset. To train these models on your data, convert your dataset to tfrecords and follow the instructions below.

The end goal is to provide utilities to convert other datasets, report accuracies on them and provide models.

Installation

This code requires:

  1. Tensorflow r0.12 or later version.

  2. Custom tensorflow/models repository, which might be merged in a future.

Simply run:

git clone -b fully_conv_vgg https://github.com/warmspringwinds/models

And add models/slim subdirectory to your path:

import sys
# update with your path
sys.path.append('/home/dpakhom1/workspace/models/slim/')
  1. Some libraries which can be acquired by installing Anaconda package.

Or you can install scikit-image, matplotlib, numpy using pip.

  1. VGG 16 checkpoint file, which you can get from here.

  2. Clone this library:

git clone https://github.com/warmspringwinds/tf-image-segmentation

And add it to the path:

import sys
# update with your path
sys.path.append("/home/dpakhom1/tf_projects/segmentation/tf-image-segmentation/")

PASCAL VOC 2012

Implemented models were tested on Restricted PASCAL VOC 2012 Validation dataset (RV-VOC12) and trained on the PASCAL VOC 2012 Training data and additional Berkeley segmentation data for PASCAL VOC 12. It was important to test models on restricted Validation dataset to make sure no images in the validation dataset were seen by model during training.

The code to acquire the training and validating the model is also provided in the framework.

Fully Convolutional Networks for Semantic Segmentation (FCNs)

Here you can find models that were described in the paper "Fully Convolutional Networks for Semantic Segmentation" by Long et al. We trained and tested FCN-32s, FCN-16s and FCN-8s against PASCAL VOC 2012 dataset.

You can find all the scripts that were used for training and evaluation here.

This code has been used to train networks with this performance:

ModelTest dataMean IOUMean pix. accuracyPixel accuracyModel Download Link
FCN-32s (ours)RV-VOC1262.70in prog.in prog.Dropbox
FCN-16s (ours)RV-VOC1263.52in prog.in prog.Dropbox
FCN-8s (ours)RV-VOC1263.65in prog.in prog.Dropbox
FCN-32s (orig.)RV-VOC1159.4073.3089.10
FCN-16s (orig.)RV-VOC1162.4075.7090.00
FCN-8s (orig.)RV-VOC1162.7075.9090.30

About

If you used the code for your research, please, cite the paper:

@article{pakhomov2017deep,
  title={Deep Residual Learning for Instrument Segmentation in Robotic Surgery},
  author={Pakhomov, Daniil and Premachandran, Vittal and Allan, Max and Azizian, Mahdi and Navab, Nassir},
  journal={arXiv preprint arXiv:1703.08580},
  year={2017}
}

During implementation, some preliminary experiments and notes were reported: