All Projects → leimao → DeepLab-V3

leimao / DeepLab-V3

Licence: MIT license
Google DeepLab V3 for Image Semantic Segmentation

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects

Projects that are alternatives of or similar to DeepLab-V3

TensorFlow-Advanced-Segmentation-Models
A Python Library for High-Level Semantic Segmentation Models based on TensorFlow and Keras with pretrained backbones.
Stars: ✭ 64 (-37.86%)
Mutual labels:  semantic-segmentation, deeplab
deeplabv3plus-keras
deeplabv3plus (Google's new algorithm for semantic segmentation) in keras:Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation
Stars: ✭ 67 (-34.95%)
Mutual labels:  semantic-segmentation, deeplab
kitti deeplab
Inference script and frozen inference graph with fine tuned weights for semantic segmentation on images from the KITTI dataset.
Stars: ✭ 26 (-74.76%)
Mutual labels:  semantic-segmentation, deeplab
Indoor-segmentation
Indoor segmentation for robot navigating, which is based on deeplab model in TensorFlow.
Stars: ✭ 105 (+1.94%)
Mutual labels:  semantic-segmentation, deeplab
Segmentation-Series-Chaos
Summary and experiment includes basic segmentation, human segmentation, human or portrait matting for both image and video.
Stars: ✭ 75 (-27.18%)
Mutual labels:  semantic-segmentation, deeplab
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 (-76.7%)
Mutual labels:  semantic-segmentation, deeplab
SegFormer
Official PyTorch implementation of SegFormer
Stars: ✭ 1,264 (+1127.18%)
Mutual labels:  semantic-segmentation
pytorch-segmentation
🎨 Semantic segmentation models, datasets and losses implemented in PyTorch.
Stars: ✭ 1,184 (+1049.51%)
Mutual labels:  semantic-segmentation
unet-pytorch
This is the example implementation of UNet model for semantic segmentations
Stars: ✭ 17 (-83.5%)
Mutual labels:  semantic-segmentation
map-floodwater-satellite-imagery
This repository focuses on training semantic segmentation models to predict the presence of floodwater for disaster prevention. Models were trained using SageMaker and Colab.
Stars: ✭ 21 (-79.61%)
Mutual labels:  semantic-segmentation
MobileUNET
U-NET Semantic Segmentation model for Mobile
Stars: ✭ 39 (-62.14%)
Mutual labels:  semantic-segmentation
hyperseg
HyperSeg - Official PyTorch Implementation
Stars: ✭ 174 (+68.93%)
Mutual labels:  semantic-segmentation
ESANet
ESANet: Efficient RGB-D Semantic Segmentation for Indoor Scene Analysis
Stars: ✭ 154 (+49.51%)
Mutual labels:  semantic-segmentation
AttaNet
AttaNet for real-time semantic segmentation.
Stars: ✭ 37 (-64.08%)
Mutual labels:  semantic-segmentation
semantic-segmentation
SOTA Semantic Segmentation Models in PyTorch
Stars: ✭ 464 (+350.49%)
Mutual labels:  semantic-segmentation
Semantic-Segmentation-BiSeNet
Keras BiseNet architecture implementation
Stars: ✭ 55 (-46.6%)
Mutual labels:  semantic-segmentation
semantic-tsdf
Semantic-TSDF for Self-driving Static Scene Reconstruction
Stars: ✭ 14 (-86.41%)
Mutual labels:  semantic-segmentation
GrabCut-Annotation-Tool
OpenCVのGrabCut()を利用したセマンティックセグメンテーション向けアノテーションツール(Annotation tool using GrabCut() of OpenCV. It can be used to create datasets for semantic segmentation.)
Stars: ✭ 27 (-73.79%)
Mutual labels:  semantic-segmentation
Automated-objects-removal-inpainter
Automated object remover Inpainter is a project that combines Semantic segmentation and EdgeConnect architectures with minor changes in order to remove specified object/s from list of 20 objects from all the input photos
Stars: ✭ 88 (-14.56%)
Mutual labels:  semantic-segmentation
Swin-Transformer-Semantic-Segmentation
This is an official implementation for "Swin Transformer: Hierarchical Vision Transformer using Shifted Windows" on Semantic Segmentation.
Stars: ✭ 856 (+731.07%)
Mutual labels:  semantic-segmentation

DeepLab V3

Lei Mao, Shengjie Lin

University of Chicago

Toyota Technological Institute at Chicago

Introduction

DeepLab is a series of image semantic segmentation models, whose latest version, i.e. v3+, proves to be the state-of-art. Its major contribution is the use of atrous spatial pyramid pooling (ASPP) operation at the end of the encoder. While the model works extremely well, its open source code is hard to read (at least from my personal perspective). Here we re-implemented DeepLab V3, the earlier version of v3+ (which only additionally employs the decoder architecture), in a much simpler and more understandable way.

Dependencies

  • Python 3.5
  • TensorFlow 1.8
  • Tqdm 4.26.0
  • Numpy 1.14
  • OpenCV 3.4.3
  • Pillow 5.3.0

Files

.
├── archieved
├── download.py
├── feature_extractor.py
├── LICENSE.md
├── model.py
├── modules.py
├── nets
├── README.md
├── test_demo.py
├── test_any_image.py
├── train.py
└── utils.py

The nets directory contains network definition files that are directly copied from tensorflow/models/research/slim/nets

Usages

Install Dependencies

To install dependencies, please run the following command to install everything required automatically:

$ chmod +x install_dependencies.sh
$ pip install -r requirements.txt
$ ./install_dependencies.sh

If found permission problems, please run the following command instead:

$ chmod +x install_dependencies.sh
$ pip install -r requirements.txt
$ sudo ./install_dependencies.sh

Download Dataset

Download and extract VOC2012 dataset, SBD dataset, and pretrained models to designated directories.

$ python download.py --help
usage: download.py [-h] [--downloads_dir DOWNLOADS_DIR] [--data_dir DATA_DIR]
                   [--pretrained_models_dir PRETRAINED_MODELS_DIR]
                   [--pretrained_models PRETRAINED_MODELS [PRETRAINED_MODELS ...]]

Download DeepLab semantic segmentation datasets and pretrained backbone
models.

optional arguments:
  -h, --help            show this help message and exit
  --downloads_dir DOWNLOADS_DIR
                        Downloads directory
  --data_dir DATA_DIR   Data directory
  --pretrained_models_dir PRETRAINED_MODELS_DIR
                        Pretrained models directory
  --pretrained_models PRETRAINED_MODELS [PRETRAINED_MODELS ...]
                        Pretrained models to download: resnet_50, resnet_101,
                        mobilenet_1.0_224

For example, to download and extract datasets and models into directories specified:

$ python download.py --downloads_dir ./downloads --data_dir ./data --pretrained_models_dir ./models/pretrained --pretrained_models resnet_50 resnet_101 mobilenet_1.0_224

For simplicity, please just run the following command in terminal:

$ python download.py

Train Model

$ python train.py --help
usage: train.py [-h] [--network_backbone NETWORK_BACKBONE]
                [--pre_trained_model PRE_TRAINED_MODEL]
                [--trainset_filename TRAINSET_FILENAME]
                [--valset_filename VALSET_FILENAME] [--images_dir IMAGES_DIR]
                [--labels_dir LABELS_DIR]
                [--trainset_augmented_filename TRAINSET_AUGMENTED_FILENAME]
                [--images_augmented_dir IMAGES_AUGMENTED_DIR]
                [--labels_augmented_dir LABELS_AUGMENTED_DIR]
                [--model_dir MODEL_DIR] [--log_dir LOG_DIR]
                [--random_seed RANDOM_SEED]

Train DeepLab V3 for image semantic segmantation.

optional arguments:
  -h, --help            show this help message and exit
  --network_backbone NETWORK_BACKBONE
                        Network backbones: resnet_50, resnet_101,
                        mobilenet_1.0_224. Default: resnet_101
  --pre_trained_model PRE_TRAINED_MODEL
                        Pretrained model directory
  --trainset_filename TRAINSET_FILENAME
                        Train dataset filename
  --valset_filename VALSET_FILENAME
                        Validation dataset filename
  --images_dir IMAGES_DIR
                        Images directory
  --labels_dir LABELS_DIR
                        Labels directory
  --trainset_augmented_filename TRAINSET_AUGMENTED_FILENAME
                        Train augmented dataset filename
  --images_augmented_dir IMAGES_AUGMENTED_DIR
                        Images augmented directory
  --labels_augmented_dir LABELS_AUGMENTED_DIR
                        Labels augmented directory
  --model_dir MODEL_DIR
                        Trained model saving directory
  --log_dir LOG_DIR     TensorBoard log directory
  --random_seed RANDOM_SEED
                        Random seed for model training.

For simplicity, please run the following command in terminal:

$ python train.py

With learning rate of 1e-5, the mIOU could be greater 0.7 after 20 epochs, which is comparable to the test statistics of DeepLab V3 in the publication.

Demos

To show some demos, please run the following command in terminal:

$ python test_demo.py
Image Label Prediction
Image Label Prediction
Image Label Prediction
Image Label Prediction

Custom Demo

Just put some JPG-format images into demo_dir and run the following command in the terminal.

$ python test_any_image.py

Results will be written into same folder. Make sure that proper model trained and a checkpoint is saved in models_dir. See the script for details.

Contributed by pinaxe1. Will modify to accept arguments and multiple image formats.

References

L.-C. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille. Deeplab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFs. TPAMI, 2017.

L.-C. Chen, G. Papandreou, F. Schroff, and H. Adam. Rethinking Atrous Convolution for Semantic Image Segmentation. arXiv:1706.05587, 2017.

L.-C. Chen, Y. Zhu, G. Papandreou, F. Schroff, H. Adam. Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation. arXiv:1802.02611, 2018.

To-Do List

  • Test script for new arbitrary test images.
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].