All Projects β†’ layumi β†’ Seg Uncertainty

layumi / Seg Uncertainty

Licence: mit
IJCAI2020 & IJCV 2020 πŸŒ‡ Unsupervised Scene Adaptation with Memory Regularization in vivo

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Seg Uncertainty

IAST-ECCV2020
IAST: Instance Adaptive Self-training for Unsupervised Domain Adaptation (ECCV 2020) https://teacher.bupt.edu.cn/zhuchuang/en/index.htm
Stars: ✭ 84 (-58.42%)
Mutual labels:  semantic-segmentation, cityscapes, domain-adaptation
Clan
( CVPR2019 Oral ) Taking A Closer Look at Domain Shift: Category-level Adversaries for Semantics Consistent Domain Adaptation
Stars: ✭ 248 (+22.77%)
Mutual labels:  semantic-segmentation, transfer-learning, domain-adaptation
Nas Segm Pytorch
Code for Fast Neural Architecture Search of Compact Semantic Segmentation Models via Auxiliary Cells, CVPR '19
Stars: ✭ 126 (-37.62%)
Mutual labels:  semantic-segmentation, cityscapes
Dise Domain Invariant Structure Extraction
Pytorch Implementation -- All about Structure: Adapting Structural Information across Domains for Boosting Semantic Segmentation, CVPR 2019
Stars: ✭ 129 (-36.14%)
Mutual labels:  semantic-segmentation, domain-adaptation
Fastseg
πŸ“Έ PyTorch implementation of MobileNetV3 for real-time semantic segmentation, with pretrained weights & state-of-the-art performance
Stars: ✭ 202 (+0%)
Mutual labels:  semantic-segmentation, cityscapes
Lsd Seg
Learning from Synthetic Data: Addressing Domain Shift for Semantic Segmentation
Stars: ✭ 99 (-50.99%)
Mutual labels:  semantic-segmentation, domain-adaptation
Convolutional Handwriting Gan
ScrabbleGAN: Semi-Supervised Varying Length Handwritten Text Generation (CVPR20)
Stars: ✭ 107 (-47.03%)
Mutual labels:  transfer-learning, domain-adaptation
Contrastiveseg
Exploring Cross-Image Pixel Contrast for Semantic Segmentation
Stars: ✭ 135 (-33.17%)
Mutual labels:  semantic-segmentation, cityscapes
Chainer Pspnet
PSPNet in Chainer
Stars: ✭ 76 (-62.38%)
Mutual labels:  semantic-segmentation, cityscapes
Cgnet
CGNet: A Light-weight Context Guided Network for Semantic Segmentation [IEEE Transactions on Image Processing 2020]
Stars: ✭ 186 (-7.92%)
Mutual labels:  semantic-segmentation, cityscapes
Cbst
Code for <Domain Adaptation for Semantic Segmentation via Class-Balanced Self-Training> in ECCV18
Stars: ✭ 146 (-27.72%)
Mutual labels:  semantic-segmentation, domain-adaptation
Self Driving Golf Cart
Be Driven 🚘
Stars: ✭ 147 (-27.23%)
Mutual labels:  self-driving-car, semantic-segmentation
Awesome Transfer Learning
Best transfer learning and domain adaptation resources (papers, tutorials, datasets, etc.)
Stars: ✭ 1,349 (+567.82%)
Mutual labels:  transfer-learning, domain-adaptation
Seanet
Self-Ensembling Attention Networks: Addressing Domain Shift for Semantic Segmentation
Stars: ✭ 90 (-55.45%)
Mutual labels:  semantic-segmentation, domain-adaptation
Dabnet
Depth-wise Asymmetric Bottleneck for Real-time Semantic Segmentation (BMVC2019)
Stars: ✭ 109 (-46.04%)
Mutual labels:  semantic-segmentation, cityscapes
Ddc Transfer Learning
A simple implementation of Deep Domain Confusion: Maximizing for Domain Invariance
Stars: ✭ 83 (-58.91%)
Mutual labels:  transfer-learning, domain-adaptation
Shot
code released for our ICML 2020 paper "Do We Really Need to Access the Source Data? Source Hypothesis Transfer for Unsupervised Domain Adaptation"
Stars: ✭ 134 (-33.66%)
Mutual labels:  transfer-learning, domain-adaptation
Hrnet Semantic Segmentation
The OCR approach is rephrased as Segmentation Transformer: https://arxiv.org/abs/1909.11065. This is an official implementation of semantic segmentation for HRNet. https://arxiv.org/abs/1908.07919
Stars: ✭ 2,369 (+1072.77%)
Mutual labels:  semantic-segmentation, cityscapes
Deep Transfer Learning
Deep Transfer Learning Papers
Stars: ✭ 68 (-66.34%)
Mutual labels:  transfer-learning, domain-adaptation
Libtlda
Library of transfer learners and domain-adaptive classifiers.
Stars: ✭ 71 (-64.85%)
Mutual labels:  transfer-learning, domain-adaptation

Seg_Uncertainty

Python 3.6 License: MIT

In this repo, we provide the code for the two papers, i.e.,

Prerequisites

  • Python 3.6
  • GPU Memory >= 11G (e.g., GTX2080Ti or GTX1080Ti)
  • Pytorch or Paddlepaddle

Prepare Data

Download [GTA5] and [Cityscapes] to run the basic code. Alternatively, you could download extra two datasets from [SYNTHIA] and [OxfordRobotCar].

The data folder is structured as follows:

β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ Cityscapes/  
|   |   β”œβ”€β”€ data/
|   |       β”œβ”€β”€ gtFine/
|   |       β”œβ”€β”€ leftImg8bit/
β”‚   β”œβ”€β”€ GTA5/
|   |   β”œβ”€β”€ images/
|   |   β”œβ”€β”€ labels/
|   |   β”œβ”€β”€ ...
β”‚   β”œβ”€β”€ synthia/ 
|   |   β”œβ”€β”€ RGB/
|   |   β”œβ”€β”€ GT/
|   |   β”œβ”€β”€ Depth/
|   |   β”œβ”€β”€ ...
β”‚   └── Oxford_Robot_ICCV19
|   |   β”œβ”€β”€ train/
|   |   β”œβ”€β”€ ...

Training

Stage-I:

python train_ms.py --snapshot-dir ./snapshots/SE_GN_batchsize2_1024x512_pp_ms_me0_classbalance7_kl0.1_lr2_drop0.1_seg0.5  --drop 0.1 --warm-up 5000 --batch-size 2 --learning-rate 2e-4 --crop-size 1024,512 --lambda-seg 0.5  --lambda-adv-target1 0.0002 --lambda-adv-target2 0.001   --lambda-me-target 0  --lambda-kl-target 0.1  --norm-style gn  --class-balance  --only-hard-label 80  --max-value 7  --gpu-ids 0,1  --often-balance  --use-se  

Generate Pseudo Label:

python generate_plabel_cityscapes.py  --restore-from ./snapshots/SE_GN_batchsize2_1024x512_pp_ms_me0_classbalance7_kl0.1_lr2_drop0.1_seg0.5/GTA5_25000.pth

Stage-II (with recitfying pseudo label):

python train_ft.py --snapshot-dir ./snapshots/1280x640_restore_ft_GN_batchsize9_512x256_pp_ms_me0_classbalance7_kl0_lr1_drop0.2_seg0.5_BN_80_255_0.8_Noaug --restore-from ./snapshots/SE_GN_batchsize2_1024x512_pp_ms_me0_classbalance7_kl0.1_lr2_drop0.1_seg0.5/GTA5_25000.pth --drop 0.2 --warm-up 5000 --batch-size 9 --learning-rate 1e-4 --crop-size 512,256 --lambda-seg 0.5 --lambda-adv-target1 0 --lambda-adv-target2 0 --lambda-me-target 0 --lambda-kl-target 0 --norm-style gn --class-balance --only-hard-label 80 --max-value 7 --gpu-ids 0,1,2 --often-balance  --use-se  --input-size 1280,640  --train_bn  --autoaug False

*** If you want to run the code without rectifying pseudo label, please change [this line] to 'from trainer_ms import AD_Trainer', which would apply the conventional pseudo label learning. ***

Testing

python evaluate_cityscapes.py --restore-from ./snapshots/1280x640_restore_ft_GN_batchsize9_512x256_pp_ms_me0_classbalance7_kl0_lr1_drop0.2_seg0.5_BN_80_255_0.8_Noaug/GTA5_25000.pth

Trained Model

The trained model is available at https://drive.google.com/file/d/1smh1sbOutJwhrfK8dk-tNvonc0HLaSsw/view?usp=sharing

  • The folder with SY in name is for SYNTHIA-to-Cityscapes
  • The folder with RB in name is for Cityscapes-to-Robot Car

One Note for SYNTHIA-to-Cityscapes

Note that the evaluation code I provided for SYNTHIA-to-Cityscapes is still average the IoU by divide 19. Actually, you need to re-calculate the value by divide 16. There are only 16 shared classes for SYNTHIA-to-Cityscapes. In this way, the result is same as the value reported in paper.

The Key Code

Core code is relatively simple, and could be directly applied to other works.

Related Works

We also would like to thank great works as follows:

Citation

@inproceedings{zheng2019unsupervised,
  title={Unsupervised Scene Adaptation with Memory Regularization in vivo},
  author={Zheng, Zhedong and Yang, Yi},
  booktitle={IJCAI},
  year={2020}
}
@article{zheng2020unsupervised,
  title={Rectifying Pseudo Label Learning via Uncertainty Estimation for Domain Adaptive Semantic Segmentation },
  author={Zheng, Zhedong and Yang, Yi},
  journal={International Journal of Computer Vision (IJCV)},
  doi={10.1007/s11263-020-01395-y},
  year={2020}
}
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].