This repository contains some models for semantic segmentation and the pipeline of training and testing models, implemented in PyTorch
Models
- Vanilla FCN: FCN32, FCN16, FCN8, in the versions of VGG, ResNet and DenseNet respectively (Fully convolutional networks for semantic segmentation)
- U-Net (U-net: Convolutional networks for biomedical image segmentation)
- SegNet (Segnet: A deep convolutional encoder-decoder architecture for image segmentation)
- PSPNet (Pyramid scene parsing network)
- GCN (Large Kernel Matters)
- DUC, HDC (understanding convolution for semantic segmentation)
- Mask-RCNN (paper, code from FAIR, code PyTorch)
Dataset
PASCAL VOC 2012
- Visit this, download SBD and PASCAL VOC 2012
- Extract them, you will get benchmark_RELEASE and VOCdevkit folders.
- Add file seg11valid.txt (download) into VOCdevkit/VOC2012/ImageSets/Segmentation
- Put the benchmark_RELEASE and VOCdevkit folders in a folder called VOC
- Set the path (root) of VOC folder in the last step in voc.py
Cityscapes
- Download leftImg8bit_trainvaltest, gtFine_trainvaltest, leftImg8bit_trainextra, and gtCoarse from the cityscapes website
- Extract and put them in a folder called cityscapes
- Set the path (root) of cityscapes folder in the last step in cityscapes.py
Requirement
- PyTorch 0.2.0
- TensorBoard for PyTorch. Here to install
- Some other libraries (find what you miss when running the code :-P)
Preparation
- Go to models directory and set the path of pretrained models in config.py
- Go to datasets directory and do following the README
TODO
I’m going to implement The Image Segmentation Paper Top10 Net in PyTorch firstly.
- DeepLab v3
- RefineNet
- ImageNet
- GoogleNet
- More dataset (e.g. ADE)