Skip to content

Reducing Annotation Cost by Labeling Contextually Diverse Classes WACV2023

Notifications You must be signed in to change notification settings

sharat29ag/contextual_class

Repository files navigation

Code to Select Contextually Diverse Class (WACV 2023)

This is the code accompanying the paper Reducing Annotation Effort by Identifying and Labeling Contextually Diverse Classes for Semantic Segmentation Under Domain Shift published in IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), 2023.

Contextual Class Selection for annotation

We propose a novel and intuitive approach, (d)Class-based annotation, where contextually relevant classes that are complementary for model training are identified in each actively selected frame, thus reducing the annotation effort and simultaneously increasing the model performance.

Dataset

Download the Cityscapes dataset.

Usage

Clone the repo:

git clone https://github.com/sharat29ag/contextual_class.git

Download :

resent weight

sample pretrained_weight

Steps

  1. Use any selection technique to select image ids from the unlabeled pool. CDAL_selection.txt is a sample selection using CDAL technique.
  2. Save features using pretrained model for the already annotated images.
python savefeat_anchor_based.py
  1. Create class represetative anchors using the labeled pool.
python create_anchors.py --file<path to labeled image ids text file> --features<path to features from step 2>
  1. For anchor based annotation to annotate contextually diverse classes on the selected images of unlabeled pool using class representative anchors extracted from the labeled pool.
python anchor_based_annotation.py

Results are saved in : anchor_based_annotation/Cityscapes(gtFine_labeldIds) and anchor_based_annotation_color(for color samples)

Citation

If using this code, parts of it, or developments from it, please cite our paper:

@inproceedings{agarwal2023reducing,
  title={Reducing Annotation Effort by Identifying and Labeling Contextually Diverse Classes for Semantic Segmentation Under Domain Shift},
  author={Agarwal, Sharat and Anand, Saket and Arora, Chetan},
  booktitle={Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision},
  pages={5904--5913},
  year={2023}
}

Acknowledgements

CDAL selection CDAL

Segmentation training MADA

Contact

If there are any questions or concerns feel free to send a message at [email protected]

About

Reducing Annotation Cost by Labeling Contextually Diverse Classes WACV2023

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages