TripleNet

This is a pytorch implementation of the TripleNet and PairNet models from the paper Triply Supervised Decoder Networks for Joint Detection and Segmentation.

NOTE: If you want to run the models with semantic segmentation task only, you can checkout the seg_only_models branch and follow the README in that branch.

Installation

Use the package manager pip to install the required packages for preparing the dataset, training and testing the model.

pip install -r requirements.txt

Dataset

Download dataset VOC2007, put them under VOCdevkit directory as the following directory structure:

VOCdevkit
-| VOC2007
   -| Annotations
   -| ImageSets
   -| JPEGImages
   -| SegmentationClass
   -| SegmentationObject

Usage

Training

python train.py --model='model name' --run_name='experiment name'

Example:

python train.py --model=pairnet --run_name=pairnet_voc_2007

To train TripleNet model, switch model to model=triplenet

Testing

python test.py --model='model name' --model_checkpoint='path to saved model checkpoint'

Example:

python test.py --model=pairnet --model_checkpoint=checkpoints/pairnet_voc_2007/epoch=99-step=36083.ckpt

Pretrained Model

We have uploaded pretrained models of our experiments. You can download them from [OneDrive]:
Pairnet
TripleNet

Download it and put it into the model_checkpoint folder.

Reference

Most of the code in Dataset/ and utils/ is from the following repos