Home

Awesome

Dynamic Retraining-Updating Mean Teacher for Source-Free Object Detection (ECCV 2024)

Trinh Le Ba Khanh, Huy-Hung Nguyen, Long Hoang Pham, Duong Nguyen-Ngoc Tran and Jae Wook Jeon

Official Pytorch implementation of Dynamic Retraining-Updating Mean Teacher for Source-Free Object Detection, ECCV 2024 paper.

<p align="center"> <img width="75%" alt="scheme_DRU" src="scheme_DRU.png"> </p>

The overview of our DRU method is presented in the following figure. For more details, please refer to the paper.

<p align="center"> <img width="100%" alt="scheme_DRU" src="DRU_overview.png"> </p>

1. Installation

1.1 Requirements

1.2 Compiling Deformable DETR CUDA operators

cd ./models/ops
sh ./make.sh
# unit test (should see all checking is True)
python test.py

2. Dataset Preparation

Our method used 3 popular SFOD benchmarks:

You can download the raw data from the official websites: Cityscapes, FoggyCityscapes, Sim10k, Bdd100k. The annotations are converted into COCO style, can download from here (provided by MRT-release). The datasets and annotations are organized as:

[data_root]
└─ cityscapes
	└─ annotations
		└─ cityscapes_train_cocostyle.json
		└─ cityscapes_train_caronly_cocostyle.json
		└─ cityscapes_val_cocostyle.json
		└─ cityscapes_val_caronly_cocostyle.json
	└─ leftImg8bit
		└─ train
		└─ val
└─ foggy_cityscapes
	└─ annotations
		└─ foggy_cityscapes_train_cocostyle.json
		└─ foggy_cityscapes_val_cocostyle.json
	└─ leftImg8bit_foggy
		└─ train
		└─ val
└─ sim10k
	└─ annotations
		└─ sim10k_train_cocostyle.json
	└─ JPEGImages
└─ bdd10k
	└─ annotations
		└─ bdd100k_daytime_train_cocostyle.json
		└─ bdd100k_daytime_val_cocostyle.json
	└─ images

3. Training and Evaluation

3.1 Training

First, run source_only to pretrain the Source-only model. Then, run teaching_standard to train the conventional Mean-Teacher framework OR teaching_mask to train the proposed DRU.

For example in city2foggy benchmark, first edit the files in configs/def-detr-base/city2foggy/ to specify your own DATA_ROOT and OUTPUT_DIR, then run:

sh configs/def-detr-base/city2foggy/source_only.sh
sh configs/def-detr-base/city2foggy/teaching_standard.sh
sh configs/def-detr-base/city2foggy/teaching_mask.sh

3.2 Evaluation

To evaluate the trained model and get the predicted results, run:

sh configs/def-detr-base/city2foggy/evaluation_source_only.sh
sh configs/def-detr-base/city2foggy/evaluation_teaching_standard.sh
sh configs/def-detr-base/city2foggy/evaluation_teaching_mask.sh

4. Experiments

All experiments are conducted with batch size 8 (for source_only: 8 labeled samples; for teaching_standard or teaching_mask: 8 unlabeled samples), on an NVIDIA Quadro RTX 8000 GPU (48GB).

city2foggy: Cityscapes → FoggyCityscapes(level 0.02)

Training stageAP@50logs & weights
source_only29.5Source-only
teaching_standard37.4MT
teaching_mask43.6DRU

city2bdd: Cityscapes → Bdd100k(daytime)

Training stageAP@50logs & weights
source_only29.1Source-only
teaching_standard32.6MT
teaching_mask36.6DRU

sim2city: Sim10k → Cityscapes(car only)

Training stageAP@50logs & weights
source_only48.9Source-only
teaching_standard56.2MT
teaching_mask58.7DRU

5. Citation

If you find our paper or code useful, please cite our work:

@inproceedings{trinh2024dru,
  title={Dynamic Retraining-Updating Mean Teacher for Source-Free Object Detection},
  author={Trinh Le Ba Khanh, Huy-Hung Nguyen, Long Hoang Pham, Duong Nguyen-Ngoc Tran and Jae Wook Jeon},
  booktitle={ECCV},
  pages={328--344},
  year={2024}
}

6. Acknowledgement

This project is built upon MRT-release, Deformable DETR, DT-ST and MIC, and we'd like to appreciate for their excellent works.

7. Contact

If you have any issue with code or paper, feel free to contact: trinhlbk(at)skku.edu