All Projects → zym1119 → Deeplabv3_mobilenetv2_pytorch

zym1119 / Deeplabv3_mobilenetv2_pytorch

A PyTorch Implementation of MobileNetv2+DeepLabv3

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Deeplabv3 mobilenetv2 pytorch

Lightnet
LightNet: Light-weight Networks for Semantic Image Segmentation (Cityscapes and Mapillary Vistas Dataset)
Stars: ✭ 698 (+436.92%)
Mutual labels:  segmentation, mobilenetv2
LightNet
LightNet: Light-weight Networks for Semantic Image Segmentation (Cityscapes and Mapillary Vistas Dataset)
Stars: ✭ 710 (+446.15%)
Mutual labels:  segmentation, mobilenetv2
Deep Learning Based Ecg Annotator
Annotation of ECG signals using deep learning, tensorflow’ Keras
Stars: ✭ 110 (-15.38%)
Mutual labels:  segmentation
Hyperdensenet
This repository contains the code of HyperDenseNet, a hyper-densely connected CNN to segment medical images in multi-modal image scenarios.
Stars: ✭ 124 (-4.62%)
Mutual labels:  segmentation
Nucleisegmentation
cGAN-based Multi Organ Nuclei Segmentation
Stars: ✭ 120 (-7.69%)
Mutual labels:  segmentation
Mobilenet Yolo
MobileNetV2-YoloV3-Nano: 0.5BFlops 3MB HUAWEI P40: 6ms/img, YoloFace-500k:0.1Bflops 420KB🔥🔥🔥
Stars: ✭ 1,566 (+1104.62%)
Mutual labels:  mobilenetv2
Multi object datasets
Multi-object image datasets with ground-truth segmentation masks and generative factors.
Stars: ✭ 121 (-6.92%)
Mutual labels:  segmentation
Edafa
Test Time Augmentation (TTA) wrapper for computer vision tasks: segmentation, classification, super-resolution, ... etc.
Stars: ✭ 107 (-17.69%)
Mutual labels:  segmentation
Sudachidict
A lexicon for Sudachi
Stars: ✭ 127 (-2.31%)
Mutual labels:  segmentation
Motsfusion
MOTSFusion: Track to Reconstruct and Reconstruct to Track
Stars: ✭ 118 (-9.23%)
Mutual labels:  segmentation
Syntok
Text tokenization and sentence segmentation (segtok v2)
Stars: ✭ 123 (-5.38%)
Mutual labels:  segmentation
Model Quantization
Collections of model quantization algorithms
Stars: ✭ 118 (-9.23%)
Mutual labels:  segmentation
Nnunet
No description or website provided.
Stars: ✭ 2,231 (+1616.15%)
Mutual labels:  segmentation
Deeplab V3 Plus Cityscapes
mIOU=80.02 on cityscapes. My implementation of deeplabv3+ (also know as 'Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation' based on the dataset of cityscapes).
Stars: ✭ 121 (-6.92%)
Mutual labels:  segmentation
Masktrack
Implementation of MaskTrack method which is the baseline of several state-of-the-art video object segmentation methods in Pytorch
Stars: ✭ 110 (-15.38%)
Mutual labels:  segmentation
Cn24
Convolutional (Patch) Networks for Semantic Segmentation
Stars: ✭ 125 (-3.85%)
Mutual labels:  segmentation
Pointnet Keras
Keras implementation for Pointnet
Stars: ✭ 110 (-15.38%)
Mutual labels:  segmentation
Dstl unet
Dstl Satellite Imagery Feature Detection
Stars: ✭ 117 (-10%)
Mutual labels:  segmentation
Openvehiclevision
An opensource lib. for vehicle vision applications (written by MATLAB), lane marking detection, road segmentation
Stars: ✭ 120 (-7.69%)
Mutual labels:  segmentation
Awesome Gan For Medical Imaging
Awesome GAN for Medical Imaging
Stars: ✭ 1,814 (+1295.38%)
Mutual labels:  segmentation

DeepLabv3_MobileNetv2

This is a PyTorch implementation of MobileNet v2 network with DeepLab v3 structure used for semantic segmentation.

The backbone of MobileNetv2 comes from paper:

Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation

And the segment head of DeepLabv3 comes from paper:

Rethinking Atrous Convolution for Semantic Image Segmentation

Please refer to these papers about details like Atrous Convolution, Inverted Residuals, Depthwise Convolution or ASPP if you have some confusion about these blocks.

Results

After training for 150 epochs, without any further tuning, the first training result on test set is like: img

Feel free to change any config or code in this repo :-)

How to use?

First you need to install dependencies of this implementation. This implementation is written under Python 3.5 with following libs:

torch 0.4.0 torchvision 0.2.1 numpy 1.14.5 opencv-python 3.4.1.15 tensorflow 1.8.0 (necessary for tensorboardX) tensorboardX 1.2

use sudo pip install lib to install them

Then, prepare cityscapes dataset or your own dataset. Currently, cityscapes is the only supported dataset without any modification.

Cityscapes dataset should have the following hierachy:

dataset_root
|   trainImages.txt
|   trainLabels.txt
|   valImages.txt
|   valLabels.txt 
|
└───gtFine(Label Folder)
|   └───train(train set)
|   |   └───aachen(city)
|   |   └───bochum
|   |   └───...
|   |
|   └───test(test set)
|   └───val(val set)
|
└───leftImg8bit(Image Folder)
    └───train
    └───test
    └───val

Don't worry about txt files if you don't have them, this program can generate unexist txt files automatically.

Third, modify config.py to fit your own training policy or configuration

At last, run python main.py --root /your/path/to/dataset/ or just run python main.py

After training, tensorboard is also available to observe training procedure using tensorboard --logdir=./exp_dir/summaries

Tips

I have changed a little from origin MobileNetv2 and DeepLabv3 network, here are the changes:

1. The multi-grid blocks have the same structure with the 7-th layer in MobileNetv2 while 
the rest layers of MobileNetv2 are discarded.
2. The lr decay is determined by epoch not iterations as in DeepLab and the input image 
is randomly cropped by 512 instead of 513 in DeepLab.
3. During training, a input image is first resized so that the shorter side is 600 pixel, 
then cropped into 512 pixels square and sent into network.

If you have some question, please leave an issue.

ImageNet pre-trained weights are loaded from Randl's github, really helpful!

TO-DO

  1. add cityscapes visualization tools(Done)
  2. fine-tune training policy
  3. use ImageNet pre-trained model(Done)

Logs

Date Changes
7.11 fix bugs in network.Test(), add cityscapes output visualization function
7.12 fix bugs in network.plot_curve(), add checkpoint split to avoid out of memory, add save loss in network.save_checkpoint()
7.13 fix bugs in figure save, add [email protected]
7.27 upload ImageNet pre-trained weight
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].