Code Monkey home page Code Monkey logo

ripu's Introduction

Region Impurity and Prediction Uncertainty (CVPR 2022 Oral Presentation)

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

[Arxiv] [Paper]

๐Ÿฅณ We are happy to announce that RIPU was accepted at CVPR22 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, Region Impurity and Prediction Uncertainty (RIPU), introduces a new acquisition strategy characterizing the spatial adjacency of image regions along with the prediction confidence. We show that 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 DAFormer, please check our [Paper].

Citation

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

@InProceedings{Xie_2022_CVPR,
    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}
}

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

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
โ”‚   โ””โ”€โ”€	

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/

Train

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

# training for GTAV to Cityscapes
sh gtav_to_cityscapes.sh

# training for SYNTHIA to Cityscapes
sh synthia_to_cityscapes.sh

Evaluate

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

Acknowledgements

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

Contact

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

or describe your problem in Issues.

ripu's People

Contributors

binhuixie avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.