All Projects → CoinCheung → Deeplab-Large-FOV

CoinCheung / Deeplab-Large-FOV

Licence: Apache-2.0 license
My Implementation of the deeplab_v1 (known as deeplab large fov)

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Deeplab-Large-FOV

TensorFlow-Advanced-Segmentation-Models
A Python Library for High-Level Semantic Segmentation Models based on TensorFlow and Keras with pretrained backbones.
Stars: ✭ 64 (+146.15%)
Mutual labels:  segmentation, deeplab
Segmentation-Series-Chaos
Summary and experiment includes basic segmentation, human segmentation, human or portrait matting for both image and video.
Stars: ✭ 75 (+188.46%)
Mutual labels:  segmentation, deeplab
Tensorflow Enet
TensorFlow implementation of ENet
Stars: ✭ 251 (+865.38%)
Mutual labels:  segmentation
backscrub
Virtual Video Device for Background Replacement with Deep Semantic Segmentation
Stars: ✭ 691 (+2557.69%)
Mutual labels:  deeplab
DocuNet
Code and dataset for the IJCAI 2021 paper "Document-level Relation Extraction as Semantic Segmentation".
Stars: ✭ 84 (+223.08%)
Mutual labels:  segmentation
Deeplab-pytorch
Deeplab for semantic segmentation tasks
Stars: ✭ 61 (+134.62%)
Mutual labels:  deeplab
BCNet
Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers [CVPR 2021]
Stars: ✭ 434 (+1569.23%)
Mutual labels:  segmentation
Awesome Tensorlayer
A curated list of dedicated resources and applications
Stars: ✭ 248 (+853.85%)
Mutual labels:  segmentation
android tflite
GPU Accelerated TensorFlow Lite applications on Android NDK. Higher accuracy face detection, Age and gender estimation, Human pose estimation, Artistic style transfer
Stars: ✭ 105 (+303.85%)
Mutual labels:  segmentation
dd-ml-segmentation-benchmark
DroneDeploy Machine Learning Segmentation Benchmark
Stars: ✭ 179 (+588.46%)
Mutual labels:  segmentation
blindassist-ios
BlindAssist iOS app
Stars: ✭ 34 (+30.77%)
Mutual labels:  segmentation
Shadowless
A Fast and Open Source Autonomous Perception System.
Stars: ✭ 29 (+11.54%)
Mutual labels:  segmentation
etos-deepcut
Deep Extreme Cut http://www.vision.ee.ethz.ch/~cvlsegmentation/dextr . a tool to do automatically object segmentation from extreme points.
Stars: ✭ 24 (-7.69%)
Mutual labels:  deeplab
MITK-Diffusion
MITK Diffusion - Official part of the Medical Imaging Interaction Toolkit
Stars: ✭ 47 (+80.77%)
Mutual labels:  segmentation
Ffn
Flood-Filling Networks for instance segmentation in 3d volumes.
Stars: ✭ 252 (+869.23%)
Mutual labels:  segmentation
segm-lstm
[deprecated] reference code for string segmentation using LSTM(tensorflow)
Stars: ✭ 19 (-26.92%)
Mutual labels:  segmentation
Pointrend Pytorch
A PyTorch implementation of PointRend: Image Segmentation as Rendering
Stars: ✭ 249 (+857.69%)
Mutual labels:  segmentation
GIBBON
The Geometry and Image-Based Bioengineering add-On for MATLAB
Stars: ✭ 132 (+407.69%)
Mutual labels:  segmentation
point-cloud-segmentation
TF2 implementation of PointNet for segmenting point clouds
Stars: ✭ 33 (+26.92%)
Mutual labels:  segmentation
ReSegment
Burmese (Myanmar) syllable level segmentation with regex.
Stars: ✭ 24 (-7.69%)
Mutual labels:  segmentation

Deeplab-LFOV

This is my implementation of Deeplab-LargeFOV.

Get Pascal VOC2012 and VOG_AUG dataset

Run the script to download the dataset:

    $ sh get_dataset.sh

This will download and extract the VOC2012 dataset together with the augumented VOC dataset. In the paper, the author used the aug version dataset to train the model and then test on the standard VOC2012 val set.

Train and evaluate the model

Just run the training script and evaluating script:

    $ python3 train.py --cfg config/pascal_voc_2012_multi_scale.py
    $ python3 evaluate.py --cfg config/pascal_voc_2012_multi_scale.py

Then you will see the mIOU result as reported by the authors(57.25 mIOU for deeplab-largeFOV).

If you want to see the result reported by the authors, use the configuration file pascal_voc_aug_multi_scale.py:

    $ python3 train.py --cfg config/pascal_voc_aug_multi_scale.py
    $ python3 eval.py --cfg config/pascal_voc_aug_multi_scale.py

This will train on the augmented dataset, which is also what the authors used in the paper.

Inference

The script infer.py is an example how we could use the trained model to implement segmentation on the picture of example.jpg. Just run it to see the performance of this model:

    $ python3 infer.py

And you will see the result picture.

Notes:

  1. The authors claimed to use the weight pretrained on imagenet to initialize the model, and they provided the initial model which is exported from the framework of caffe. So far, I found no easy way to convert caffe pretrained weights to that of pytorch, so I employ the following tricks as a remedy:
  • Initialize weights of the common parts of the 'deeplab vgg' and 'pytorch standard vgg' with the weights from pytorch model zoo.

  • Initialize the weights of the extraly appended layers with the msra normal distribution random numbers.

  • Implement warmup with the linear strategy mentioned in this paper

  • Upsample the output logits of the model instead of downsample the ground truth as does in deeplabv3.

  • Use the exponential lr scheduler as does in the deeplabv3.

  • Do multi-scale training and multi-scale testing(with flip). The images are cropped to be (497, 497). The training scales are: [0.75, 1, 1.25, 1.5, 1.75, 2.], and the testing scales are: [0.5, 0.75, 1, 1.25, 1.5, 1.75].

  • Since we do not expect the crop size of the inference is too far away from what we use in the training process, I use crop evaluation.

  • the images are also augmented with random variance of brightness, contrast and saturation.

  • Considering the imbalance between the amount of different pixels, I used the on-line hard example mining loss to train the model.

With these tricks, my model achieves 68.72 mIOU(without crf), modestly better than the result reported by the authors.

By the way

I also tried to use mixup in hopes of some further boost to the performance, but the result just gave a big slap on my face. I left the mixup code in the program and if you have special insights on this trick, please feel free to add a pull request or open an issue. Many thanks !

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].