• Stars
    star
    139
  • Rank 262,954 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 2 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[CVPR 2022 Oral] Towards Fewer Annotations: Active Learning via Region Impurity and Prediction Uncertainty for Domain Adaptive Semantic Segmentation https://arxiv.org/abs/2111.12940

Region Impurity and Prediction Uncertainty (CVPR Oral)

Binhui Xie, Longhui Yuan, Shuang Li, Chi Harold Liu and Xinjing Cheng

PaperΒ Β  ModelsΒ Β  BilibiliΒ Β  YouTubeΒ Β  SlidesΒ Β 

This repository provides the official code for the paper Towards Fewer Annotations: Active Learning via Region Impurity and Prediction Uncertainty for Domain Adaptive Semantic Segmentation.

πŸ₯³ We are happy to announce that RIPU was accepted at CVPR 2022 Oral Presentation.

Overview

We propose a simple region-based active learning approach for semantic segmentation under a domain shift, aiming to automatically query a small partition of image regions to be labeled while maximizing segmentation performance. Our algorithm, RIPU, introduces a new acquisition strategy characterizing the spatial adjacency of image regions along with the prediction confidence. The proposed region-based selection strategy makes more efficient use of a limited budget than image-based or point-based counterparts.

image

We show some qualitative examples from the Cityscapes validation set, image

and also visualize the queried regions to annotate. image

For more information on RIPU, please check our Paper.

Usage

Prerequisites

  • Python 3.7
  • Pytorch 1.7.1
  • torchvision 0.8.2

Step-by-step installation

conda create --name ADASeg -y python=3.7
conda activate ADASeg

# this installs the right pip and dependencies for the fresh python
conda install -y ipython pip

# this installs required packages
pip install -r requirements.txt

Data Preparation

Symlink the required dataset

ln -s /path_to_cityscapes_dataset datasets/cityscapes
ln -s /path_to_gtav_dataset datasets/gtav
ln -s /path_to_synthia_dataset datasets/synthia

Generate the label static files for GTAV/SYNTHIA Datasets by running

python datasets/generate_gtav_label_info.py -d datasets/gtav -o datasets/gtav/
python datasets/generate_synthia_label_info.py -d datasets/synthia -o datasets/synthia/

The data folder should be structured as follows:

β”œβ”€β”€ datasets/
β”‚   β”œβ”€β”€ cityscapes/     
|   |   β”œβ”€β”€ gtFine/
|   |   β”œβ”€β”€ leftImg8bit/
β”‚   β”œβ”€β”€ gtav/
|   |   β”œβ”€β”€ images/
|   |   β”œβ”€β”€ labels/
|   |   β”œβ”€β”€ gtav_label_info.p
β”‚   └──	synthia
|   |   β”œβ”€β”€ RAND_CITYSCAPES/
|   |   β”œβ”€β”€ synthia_label_info.p
β”‚   └──	

Model Zoo

We have put our model checkpoints here [Google Drive] [η™ΎεΊ¦η½‘η›˜] (提取码RIPU).

GTAV to Cityscapes

name backbone budget mIoU ckpt where in Our Paper
1 RIPU-PA V2 40 px 65.5 Google DriveΒ /Β BaiDuΒ  Table 1
2 RIPU-RA V2 2.2% 69.6 Google DriveΒ /Β BaiDuΒ  Table 1
3 RIPU-RA V3+ 5.0% 71.2 Google DriveΒ /Β BaiDuΒ  Table 1

SYNTHIA to Cityscapes

name backbone budget mIoU ckpt where in Our Paper
1 RIPU-PA V2 40 px 66.1 Google DriveΒ /Β BaiDuΒ  Table 2
2 RIPU-RA V2 2.2% 70.1 Google DriveΒ /Β BaiDuΒ  Table 2
3 RIPU-RA V3+ 5.0% 71.4 Google DriveΒ /Β BaiDuΒ  Table 2

Source-free scenarios

task budget mIoU source pre-trained ckpt adapted ckpt Where in Our Paper
1 GTAV to Cityscapes 2.2% 67.1 Google DriveΒ /Β BaiDuΒ  Google DriveΒ /Β BaiDuΒ  Table 12
2 SYNTHIA to Cityscapes 2.2% 68.7 Google DriveΒ /Β BaiDuΒ  Google DriveΒ /Β BaiDuΒ  Table 13

RIPU Training

We provide the training scripts in scripts/ using a single GPU.

# training for GTAV to Cityscapes
sh gtav_to_cityscapes.sh

# training for SYNTHIA to Cityscapes
sh synthia_to_cityscapes.sh

RIPU Testing

To evaluate RIPU e.g. GTAV to Cityscapes (v3+, 5.0%), use the following command:

python test.py -cfg configs/gtav/deeplabv3plus_r101_RA.yaml resume checkpint/v3plus_gtav_ra_5.0_precent/model_last.pth OUTPUT_DIR checkpint/v3plus_gtav_ra_5.0_precent

Acknowledgements

This project is based on the following open-source projects: FADA and SDCA. We thank their authors for making the source code publically available.

Citation

If you find this project useful in your research, please consider citing:

@InProceedings{xie2022ripu,
    author    = {Xie, Binhui and Yuan, Longhui and Li, Shuang and Liu, Chi Harold and Cheng, Xinjing},
    title     = {Towards Fewer Annotations: Active Learning via Region Impurity and Prediction Uncertainty for Domain Adaptive Semantic Segmentation},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month     = {June},
    year      = {2022},
    pages     = {8068-8078}
}

Contact

If you have any problem about our code, feel free to contact

or describe your problem in Issues.

More Repositories

1

CIRL

[CVPR 2022 Oral] Code release for "Causality Inspired Representation Learning for Domain Generalization"
Python
123
star
2

SePiCo

[TPAMI 2023 ESI Highly Cited Paper] SePiCo: Semantic-Guided Pixel Contrast for Domain Adaptive Semantic Segmentation https://arxiv.org/abs/2204.08808
Python
113
star
3

I2V-GAN

ACMMM2021 paper "I2V-GAN: Unpaired Infrared-to-Visible Video Translation"
Python
106
star
4

EADA

[AAAI 2022] Official Implementation of Active Learning for Domain Adaptation: An Energy-based Approach https://arxiv.org/abs/2112.01406
Python
76
star
5

TSA

[CVPR 2021 Oral] Code release for "Transferable Semantic Augmentation for Domain Adaptation"
Python
74
star
6

MetaSAug

[CVPR 2021] MetaSAug: Meta Semantic Augmentation for Long-Tailed Visual Recognition
Python
61
star
7

RoTTA

[CVPR 2023] Robust Test-Time Adaptation in Dynamic Scenarios. https://arxiv.org/abs/2303.13899
Python
47
star
8

GDCAN

[TPAMI 2021] Code release for "Generalized Domain Conditioned Adaptation Network" https://arxiv.org/abs/2103.12339
Python
45
star
9

SDCA

Official Implementation of Semantic Distribution-aware Contrastive Adaptation for Semantic Segmentation https://arxiv.org/abs/2105.05013
Python
37
star
10

BCDM

[AAAI 2021] Code release for "Bi-Classifier Determinacy Maximization for Unsupervised Domain Adaptation" https://arxiv.org/abs/2012.06995
Python
34
star
11

DCAN

[AAAI 2020] Code release for "Domain Conditioned Adaptation Network" https://arxiv.org/abs/2005.06717
Python
33
star
12

DDA

Code release for "Dynamic Domain Adaptation for Efficient Inference" (CVPR 2021)
Python
30
star
13

SSAN

[ACMMM 2020] Code release for "Simultaneous Semantic Alignment Network for Heterogenous Domain Adaptation" https://arxiv.org/abs/2008.01677
Python
29
star
14

DUC

[ICLR 2023 Spotlight] Code release for "Dirichlet-based Uncertainty Calibration for Active Domain Adaptation"
Python
27
star
15

VBLC

[AAAI 2023 Oral] VBLC: Visibility Boosting and Logit-Constraint Learning for Domain Adaptive Semantic Segmentation under Adverse Conditions
Python
22
star
16

SCDA

[ICCV 2021] Code release for "Semantic Concentration for Domain adaptation"
Python
21
star
17

Annotator

[NeurIPS 2023] Official Implementation of A Generic Active Learning Baseline for LiDAR Semantic Segmentation
Python
21
star
18

ROMA

Display of ROMA.
Python
18
star
19

JADA

[ACM MM 2019] Code release for "Joint Adversarial Domain Adaptation" https://dl.acm.org/doi/10.1145/3343031.3351070
Python
17
star
20

BorLan

[ICCV2023] Borrowing Knowledge From Pre-trained Language Model: A New Data-efficient Visual Learning Paradigm
Python
14
star
21

CAF

[TKDE 2023 ESI Highly Cited Paper] A Collaborative Alignment Framework of Transferable Knowledge Extraction for Unsupervised Domain Adaptation
Python
10
star
22

O2net

Python
10
star
23

Transfer-Learning-Study

learning materials
9
star
24

ParetoDA

[NIPS 2021] Code release for "Pareto Domain Adaptation"
Python
9
star
25

MsRA

Code release for "End-to-End Transferable Anomaly Detection via Multi-spectral Cross-domain Representation Alignment"
Python
7
star
26

MetaReg

Python
6
star
27

Domain-Oriented-Transformer

Python
4
star
28

LSG

[NeurIPS 2023] Official Implementation of Language Semantic Graph Guided Data-Efficient Learning
Python
4
star
29

DCG

[CVPR 2023] Code release for "Improving Generalization with Domain Convex Game"
Python
3
star
30

TTSA

Code release for "Adapting Across Domains via Target-oriented Transferable Semantic Augmentation under Prototype Constraint"
Python
3
star
31

SCT

Python
2
star
32

CSDN

Official repository of "Critical Classes and Samples Discovering for Partial Domain Adaptation", IEEE Transaction on Cybernetics
Python
2
star
33

EvoS

Official implementation of our NeurIPS 2023 paper (EvoS).
Python
1
star