All Projects → Reagan1311 → Dabnet

Reagan1311 / Dabnet

Licence: mit
Depth-wise Asymmetric Bottleneck for Real-time Semantic Segmentation (BMVC2019)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Dabnet

Icnet Tensorflow
TensorFlow-based implementation of "ICNet for Real-Time Semantic Segmentation on High-Resolution Images".
Stars: ✭ 396 (+263.3%)
Mutual labels:  semantic-segmentation, cityscapes, real-time
Nas Segm Pytorch
Code for Fast Neural Architecture Search of Compact Semantic Segmentation Models via Auxiliary Cells, CVPR '19
Stars: ✭ 126 (+15.6%)
Mutual labels:  semantic-segmentation, cityscapes, real-time
AttaNet
AttaNet for real-time semantic segmentation.
Stars: ✭ 37 (-66.06%)
Mutual labels:  real-time, semantic-segmentation, cityscapes
Fasterseg
[ICLR 2020] "FasterSeg: Searching for Faster Real-time Semantic Segmentation" by Wuyang Chen, Xinyu Gong, Xianming Liu, Qian Zhang, Yuan Li, Zhangyang Wang
Stars: ✭ 438 (+301.83%)
Mutual labels:  semantic-segmentation, cityscapes
Panoptic Deeplab
This is Pytorch re-implementation of our CVPR 2020 paper "Panoptic-DeepLab: A Simple, Strong, and Fast Baseline for Bottom-Up Panoptic Segmentation" (https://arxiv.org/abs/1911.10194)
Stars: ✭ 355 (+225.69%)
Mutual labels:  semantic-segmentation, cityscapes
Kimera Semantics
Real-Time 3D Semantic Reconstruction from 2D data
Stars: ✭ 368 (+237.61%)
Mutual labels:  semantic-segmentation, real-time
Erfnet pytorch
Pytorch code for semantic segmentation using ERFNet
Stars: ✭ 304 (+178.9%)
Mutual labels:  semantic-segmentation, cityscapes
Enet
ENet: A Deep Neural Network Architecture for Real-Time Semantic Segmentation
Stars: ✭ 530 (+386.24%)
Mutual labels:  semantic-segmentation, real-time
Lednet
LEDNet: A Lightweight Encoder-Decoder Network for Real-time Semantic Segmentation
Stars: ✭ 450 (+312.84%)
Mutual labels:  semantic-segmentation, real-time
Tusimple Duc
Understanding Convolution for Semantic Segmentation
Stars: ✭ 567 (+420.18%)
Mutual labels:  semantic-segmentation, cityscapes
Deeplabv3 Plus
Tensorflow 2.3.0 implementation of DeepLabV3-Plus
Stars: ✭ 32 (-70.64%)
Mutual labels:  semantic-segmentation, cityscapes
Ademxapp
Code for https://arxiv.org/abs/1611.10080
Stars: ✭ 333 (+205.5%)
Mutual labels:  semantic-segmentation, cityscapes
Edgenets
This repository contains the source code of our work on designing efficient CNNs for computer vision
Stars: ✭ 331 (+203.67%)
Mutual labels:  semantic-segmentation, cityscapes
Lightnet
LightNet: Light-weight Networks for Semantic Image Segmentation (Cityscapes and Mapillary Vistas Dataset)
Stars: ✭ 698 (+540.37%)
Mutual labels:  semantic-segmentation, cityscapes
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 (-70.64%)
Mutual labels:  semantic-segmentation, cityscapes
Pspnet Tensorflow
TensorFlow-based implementation of "Pyramid Scene Parsing Network".
Stars: ✭ 313 (+187.16%)
Mutual labels:  semantic-segmentation, cityscapes
Espnet
ESPNet: Efficient Spatial Pyramid of Dilated Convolutions for Semantic Segmentation
Stars: ✭ 473 (+333.94%)
Mutual labels:  semantic-segmentation, real-time
Chainer Pspnet
PSPNet in Chainer
Stars: ✭ 76 (-30.28%)
Mutual labels:  semantic-segmentation, cityscapes
DST-CBC
Implementation of our paper "DMT: Dynamic Mutual Training for Semi-Supervised Learning"
Stars: ✭ 98 (-10.09%)
Mutual labels:  semantic-segmentation, cityscapes
Lightweight Segmentation
Lightweight models for real-time semantic segmentation(include mobilenetv1-v3, shufflenetv1-v2, igcv3, efficientnet).
Stars: ✭ 261 (+139.45%)
Mutual labels:  semantic-segmentation, real-time

DABNet: Depth-wise Asymmetric Bottleneck for Real-time Semantic Segmentation

This project contains the Pytorch implementation for the proposed DABNet: [arXiv].

Introduction

As a pixel-level prediction task, semantic segmentation needs large computational cost with enormous parameters to obtain high performance. Recently, due to the increasing demand for autonomous systems and robots, it is significant to make a tradeoff between accuracy and inference speed. In this paper, we propose a novel Depthwise Asymmetric Bottleneck (DAB) module to address this dilemma, which efficiently adopts depth-wise asymmetric convolution and dilated convolution to build a bottleneck structure. Based on the DAB module, we design a Depth-wise Asymmetric Bottleneck Network (DABNet) especially for real-time semantic segmentation, which creates sufficient receptive field and densely utilizes the contextual information. Experiments on Cityscapes and CamVid datasets demonstrate that the proposed DABNet achieves a balance between speed and precision. Specifically, without any pretrained model and postprocessing, it achieves 70.1% Mean IoU on the Cityscapes test dataset with only 0.76 million parameters and a speed of 104 FPS on a single GTX 1080Ti card.

Installation

  • Env: Python 3.6; PyTorch 1.0; CUDA 9.0; cuDNN V7
  • Install some packages
pip install opencv-python pillow numpy matplotlib 
  • Clone this repository
git clone https://github.com/Reagan1311/DABNet
cd DABNet
  • One GPU with 11GB is needed

Dataset

You need to download the two dataset——CamVid and Cityscapes, and put the files in the dataset folder with following structure.

├── camvid
|    ├── train
|    ├── test
|    ├── val 
|    ├── trainannot
|    ├── testannot
|    ├── valannot
|    ├── camvid_trainval_list.txt
|    ├── camvid_train_list.txt
|    ├── camvid_test_list.txt
|    └── camvid_val_list.txt
├── cityscapes
|    ├── gtCoarse
|    ├── gtFine
|    ├── leftImg8bit
|    ├── cityscapes_trainval_list.txt
|    ├── cityscapes_train_list.txt
|    ├── cityscapes_test_list.txt
|    └── cityscapes_val_list.txt           

Training

  • You can run: python train.py -h to check the detail of optional arguments. Basically, in the train.py, you can set the dataset, train type, epochs and batch size, etc.
python train.py --dataset ${camvid, cityscapes} --train_type ${train, trainval} --max_epochs ${EPOCHS} --batch_size ${BATCH_SIZE} --lr ${LR} --resume ${CHECKPOINT_FILE}
  • training on Cityscapes train set
python train.py --dataset cityscapes
  • training on CamVid train and val set
python train.py --dataset camvid --train_type trainval --max_epochs 1000 --lr 1e-3 --batch_size 16
  • During training course, every 50 epochs, we will record the mean IoU of train set, validation set and training loss to draw a plot, so you can check whether the training process is normal.
Val mIoU vs Epochs Train loss vs Epochs
alt text-1 alt text-2

(PS: Based on the graphs, we think that training is not saturated yet, maybe the LR is too large, so you can change the hyper-parameter to get better result)

Testing

  • After training, the checkpoint will be saved at checkpoint folder, you can use test.py to get the result.
python test.py --dataset ${camvid, cityscapes} --checkpoint ${CHECKPOINT_FILE}

Evaluation

  • For those dataset that do not provide label on the test set (e.g. Cityscapes), you can use predict.py to save all the output images, then submit to official webpage for evaluation.
python predict.py --checkpoint ${CHECKPOINT_FILE}

Inference Speed

  • You can run the eval_fps.py to test the model inference speed, input the image size such as 512,1024.
python eval_fps.py 512,1024

Results

  • quantitative results:
Dataset Pretrained Train type mIoU FPS model
Cityscapes(Fine) from scratch trainval 70.07​% 104 Detailed result
Cityscapes(Fine) from scratch train 69.57​% 104 GoogleDrive
CamVid from scratch trainval 66.72​% 146 GoogleDrive
  • qualitative segmentation examples:

Citation

Please consider citing the DABNet if it's helpful for your research.

@inproceedings{li2019dabnet,
  title={DABNet: Depth-wise Asymmetric Bottleneck for Real-time Semantic Segmentation},
  author={Li, Gen and Kim, Joongkyu},
  booktitle={British Machine Vision Conference},
  year={2019}
}

Thanks to the Third Party Libs

Pytorch
Pytorch-Deeplab
ERFNet
CGNet

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