This repository contains the implementation of the following paper: "Adaptive Self-Training for Object Detection", that was paper presented at ICCVW2023.
This work presents a semi-supervised learning method for object detection.
This repository can be used to reproduce the main results of the paper.
[paper]
@inproceedings{Vandeghen2023Adaptive,
author = {Vandeghen, Renaud and Louppe, Gilles and Van Droogenbroeck, Marc},
title = {Adaptive Self-Training for Object Detection},
booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV) Workshops},
month = {October},
year = {2023},
pages = {914-923}
}
conda create -n astod python=3.10
conda activate astod
pip install torch torchvision wandb tabulateOrganize the dataset as follows:
├── coco
│ ├── annotations
│ │ ├── instances_train2017.json
│ │ ├── instances_val2017.json
│ ├── train2017
│ ├── val2017You can follow the preprocessing done in STAC to generate the different splits.
The first step of training is to train the teacher model. This can be done by running the following command on a remote server using SLURM:
seed=1
split=10
sbatch --output teacher.log teacher.sh $seed $splitGenerate the candidate labels using the teacher model:
seed=1
split=10
sbatch --output labeling.log label.sh $seed $splitProcess the candidate lables based on the score histogram:
seed=1
split=10
bins=21
sbatch --output process.log process.sh $seed $split $binsThis configuration will produce the same results presented in the paper.
You can change the code argument in process.sh to change the configuration (fix threshold, global or per class threshold, etc.).
Train the student model using the pseudo-labels:
seed=1
split=10
sbatch --output student.log student.sh $seed $splitRefine the student model with the labeled data only:
seed=1
split=10
sbatch --output refine.log refine.sh $seed $splitYou can repeat the different steps by changing the teacher model by the student model for the Labeling step.
This repository is based on torchvision.
The authors also thanks all the different great open-sourced SSOD works.
- Renaud Vandeghen, University of Liège (ULiège).
