Home

Awesome

DynamicRouting

This project provides an implementation for "Learning Dynamic Routing for Semantic Segmentation" (CVPR2020 Oral) on PyTorch. For the reason that experiments in the paper were conducted using internal framework, this project reimplements them on dl_lib and reports detailed comparisons below. Some parts of code in dl_lib are based on detectron2.

introduce image

Requirement

Installation

Make sure that your get at least one gpu when compiling. Run:

Usage

Dataset

We use Cityscapes dataset for training and validation. Please refer to datasets/README.md or dataset structure in detectron2 for more details.

Pretrained Model

We give ImageNet pretained models:

Training

For example, if you want to train Dynamic Network with Layer16 backbone:

NOTE: Please set FIX_SIZE_FOR_FLOPS to [768,768] and [1024,2048] for training and evaluation, respectively.

Evaluation

You can evaluate the trained or downloaded model:

NOTE: If your machine does not support such setting, please change settings in config.py to a suitable value.

Performance

Cityscapes val set

Without ImageNet Pretrain:

MethodsBackboneIter/KmIoU (paper)GFLOPs (paper)mIoU (ours)GFLOPs (ours)Model
Dynamic-ALayer1618672.844.973.952.5GoogleDrive
Dynamic-BLayer1618673.858.774.358.9GoogleDrive
Dynamic-CLayer1618674.666.674.859.8GoogleDrive
Dynamic-RawLayer1618676.1119.576.7114.9GoogleDrive
Dynamic-RawLayer1655878.3113.378.1114.2GoogleDrive

With ImageNet Pretrain:

MethodsBackboneIter/KmIoU (paper)GFLOPs (paper)mIoU (ours)GFLOPs (ours)Model
Dynamic-RawLayer1618678.6119.478.8117.8GoogleDrive
Dynamic-RawLayer3318679.2242.379.4243.1GoogleDrive

To do

Acknowledgement

Citation

Consider cite the Dynamic Routing in your publications if it helps your research.

@inproceedings{li2020learning,
    title = {Learning Dynamic Routing for Semantic Segmentation},
    author = {Yanwei Li, Lin Song, Yukang Chen, Zeming Li, Xiangyu Zhang, Xingang Wang, Jian Sun},
    booktitle = {IEEE Conference on Computer Vision and Pattern Recognition},
    year = {2020}
}

Consider cite this project in your publications if it helps your research.

@misc{DynamicRouting,
    author = {Yanwei Li},
    title = {DynamicRouting},
    howpublished = {\url{https://github.com/yanwei-li/DynamicRouting}},
    year ={2020}
}