Awesome
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.
<p align="center"> <img src="teaser.jpg" width=50% height=50%> </p>Dataset
Download the Cityscapes dataset.
Usage
Clone the repo:
git clone https://github.com/sharat29ag/contextual_class.git
Download :
Steps
- Use any selection technique to select image ids from the unlabeled pool. CDAL_selection.txt is a sample selection using CDAL technique.
- Save features using pretrained model for the already annotated images.
python savefeat_anchor_based.py
- 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>
- 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 sharata@iiitd.ac.in