All Projects → rishizek → Tensorflow Deeplab V3

rishizek / Tensorflow Deeplab V3

Licence: mit
DeepLabv3 built in TensorFlow

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Tensorflow Deeplab V3

Pytorch Deeplab Resnet
DeepLab resnet v2 model in pytorch
Stars: ✭ 584 (+110.07%)
Mutual labels:  semantic-segmentation, pascal-voc
Fcn Googlenet
GoogLeNet implementation of Fully Convolutional Networks for Semantic Segmentation in TensorFlow
Stars: ✭ 45 (-83.81%)
Mutual labels:  semantic-segmentation, pascal-voc
Edgenets
This repository contains the source code of our work on designing efficient CNNs for computer vision
Stars: ✭ 331 (+19.06%)
Mutual labels:  semantic-segmentation, pascal-voc
Pytorch Deeplab
DeepLab-ResNet rebuilt in Pytorch
Stars: ✭ 254 (-8.63%)
Mutual labels:  semantic-segmentation, pascal-voc
Dsrg
Weakly-Supervised Semantic Segmentation Network with Deep Seeded Region Growing (CVPR 2018).
Stars: ✭ 206 (-25.9%)
Mutual labels:  semantic-segmentation, pascal-voc
Tensorflow Deeplab Resnet
DeepLab-ResNet rebuilt in TensorFlow
Stars: ✭ 1,198 (+330.94%)
Mutual labels:  semantic-segmentation, pascal-voc
Pytorch Auto Drive
Segmentation models (ERFNet, ENet, DeepLab, FCN...) and Lane detection models (SCNN, SAD, PRNet, RESA, LSTR...) based on PyTorch 1.6 with mixed precision training
Stars: ✭ 32 (-88.49%)
Mutual labels:  semantic-segmentation, pascal-voc
FCN-Segmentation-TensorFlow
FCN for Semantic Image Segmentation achieving 68.5 mIoU on PASCAL VOC
Stars: ✭ 34 (-87.77%)
Mutual labels:  semantic-segmentation, pascal-voc
Deeplab V2 Resnet 101 Tensorflow
An (re-)implementation of DeepLab v2 (ResNet-101) in TensorFlow for semantic image segmentation on the PASCAL VOC 2012 dataset.
Stars: ✭ 173 (-37.77%)
Mutual labels:  semantic-segmentation, pascal-voc
Chainer Pspnet
PSPNet in Chainer
Stars: ✭ 76 (-72.66%)
Mutual labels:  semantic-segmentation, pascal-voc
Tensorflow Deeplab Lfov
DeepLab-LargeFOV implemented in tensorflow
Stars: ✭ 218 (-21.58%)
Mutual labels:  semantic-segmentation, pascal-voc
DST-CBC
Implementation of our paper "DMT: Dynamic Mutual Training for Semi-Supervised Learning"
Stars: ✭ 98 (-64.75%)
Mutual labels:  semantic-segmentation, pascal-voc
PiCIE
PiCIE: Unsupervised Semantic Segmentation using Invariance and Equivariance in clustering (CVPR2021)
Stars: ✭ 102 (-63.31%)
Mutual labels:  semantic-segmentation
Vod Converter
Convert between visual object detection datasets
Stars: ✭ 260 (-6.47%)
Mutual labels:  pascal-voc
label-fusion
Volumetric Fusion of Multiple Semantic Labels and Masks
Stars: ✭ 18 (-93.53%)
Mutual labels:  semantic-segmentation
Pytorch tiramisu
FC-DenseNet in PyTorch for Semantic Segmentation
Stars: ✭ 267 (-3.96%)
Mutual labels:  semantic-segmentation
SlideSeg
A Python module that produces image patches and annotation masks from whole slide images for deep learning in digital pathology.
Stars: ✭ 71 (-74.46%)
Mutual labels:  semantic-segmentation
pointnet2 semantic
A pointnet++ fork, with focus on semantic segmentation of differents datasets
Stars: ✭ 69 (-75.18%)
Mutual labels:  semantic-segmentation
DDUnet-Modified-Unet-for-WMH-with-Dense-Dilate
WMH segmentaion with unet, dilated_unet, and with ideas from denseNet
Stars: ✭ 23 (-91.73%)
Mutual labels:  semantic-segmentation
SAComputerVisionMachineLearning
Computer Vision and Machine Learning related projects of Udacity's Self-driving Car Nanodegree Program
Stars: ✭ 36 (-87.05%)
Mutual labels:  semantic-segmentation

DeepLab-v3 Semantic Segmentation in TensorFlow

This repo attempts to reproduce DeepLabv3 in TensorFlow for semantic image segmentation on the PASCAL VOC dataset. The implementation is largely based on DrSleep's DeepLab v2 implemantation and tensorflow models Resnet implementation.

Setup

Please install latest version of TensorFlow (r1.6) and use Python 3.

  • Download and extract PASCAL VOC training/validation data (2GB tar file), specifying the location with the --data_dir.
  • Download and extract augmented segmentation data (Thanks to DrSleep), specifying the location with --data_dir and --label_data_dir (namely, $data_dir/$label_data_dir).
  • For inference the trained model with 76.42% mIoU on the Pascal VOC 2012 validation dataset is available here. Download and extract to --model_dir.
  • For training, you need to download and extract pre-trained Resnet v2 101 model from slim specifying the location with --pre_trained_model.

Training

For training model, you first need to convert original data to the TensorFlow TFRecord format. This enables to accelerate training seep.

python create_pascal_tf_record.py --data_dir DATA_DIR \
                                  --image_data_dir IMAGE_DATA_DIR \
                                  --label_data_dir LABEL_DATA_DIR 

Once you created TFrecord for PASCAL VOC training and validation deta, you can start training model as follow:

python train.py --model_dir MODEL_DIR --pre_trained_model PRE_TRAINED_MODEL

Here, --pre_trained_model contains the pre-trained Resnet model, whereas --model_dir contains the trained DeepLabv3 checkpoints. If --model_dir contains the valid checkpoints, the model is trained from the specified checkpoint in --model_dir.

You can see other options with the following command:

python train.py --help

The training process can be visualized with Tensor Board as follow:

tensorboard --logdir MODEL_DIR

Evaluation

To evaluate how model perform, one can use the following command:

python evaluate.py --help

The current best model build by this implementation achieves 76.42% mIoU on the Pascal VOC 2012 validation dataset.

Method OS mIOU
paper MG(1,2,4)+ASPP(6,12,18)+Image Pooling 16 77.21%
repo MG(1,2,4)+ASPP(6,12,18)+Image Pooling 16 76.42%

Here, the above model was trained about 9.5 hours (with Tesla V100 and r1.6) with following parameters:

python train.py --train_epochs 46 --batch_size 16 --weight_decay 1e-4 --model_dir models/ba=16,wd=1e-4,max_iter=30k --max_iter 30000

You may achieve better performance with the cost of computation with my DeepLabV3+ Implementation.

Inference

To apply semantic segmentation to your images, one can use the following commands:

python inference.py --data_dir DATA_DIR --infer_data_list INFER_DATA_LIST --model_dir MODEL_DIR 

The trained model is available here. One can find the detailed explanation of mask such as meaning of color in DrSleep's repo.

TODO:

Pull requests are welcome.

  • [x] Freeze batch normalization during training
  • [ ] Multi-GPU support
  • [ ] Channels first support (Apparently large performance boost on GPU)
  • [ ] Model pretrained on MS-COCO
  • [ ] Unit test

Acknowledgment

This repo borrows code heavily from

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].