This is an official code implementation repository for Enhancing Source-Free Domain Adaptive Object Detection with Low-confidence Pseudo Label Distillation, accepted to ECCV 2024.
- We use Python 3.6 and Pytorch 1.9.0
- The codebase from Detectron2.
git clone https://github.com/junia3/LPLD.git
conda create -n LPLD python=3.6
conda activate LPLD
conda install pytorch==1.9.0 torchvision==0.10.0 torchaudio==0.9.0 cudatoolkit=10.2 -c pytorch
cd LPLD
pip install -r requirements.txt
## Make sure you have GCC and G++ version <=8.0
cd ..
python -m pip install -e LPLD
- Cityscapes, FoggyCityscapes / Download Webpage / Google drive (preprocessed)
- PASCAL_VOC / Download Webpage
- Clipart / Download Webpage / Google drive (preprocessed)
- Watercolor / Download Webpage / Google drive (preprocessed)
- Sim10k / Download Webpage
Make sure that all downloaded datasets are located in the ./dataset folder. After preparing the datasets, you will have the following file structure:
LPLD
...
├── dataset
│ └── foggy
│ └── cityscape
│ └── clipart
│ └── watercolor
...Make sure that all dataset fit the format of PASCAL_VOC. For example, the dataset foggy is stored as follows:
$ cd ./dataset/foggy/VOC2007/
$ ls
Annotations ImageSets JPEGImages
$ cat ImageSets/Main/test_t.txt
target_munster_000157_000019_leftImg8bit_foggy_beta_0.02
target_munster_000124_000019_leftImg8bit_foggy_beta_0.02
target_munster_000110_000019_leftImg8bit_foggy_beta_0.02
.
.Currently, we only provide code and results with ResNet-50 backbone baselines. We are planning to add VGG-16 backbone baselines and code.
Before training, please download source models from the google drive link.
CUDA_VISIBLE_DEVICES=$GPU_ID python tools/train_main.py \
--config-file configs/sfda/sfda_city2foggy.yaml --model-dir ./source_model/cityscape_baseline/model_final.pthCUDA_VISIBLE_DEVICES=$GPU_ID python tools/test_main.py --eval-only \
--config-file configs/sfda/sfda_city2foggy.yaml --model-dir $WEIGHT_LOCATIONWe provide visualization code. We use our trained model to detect foggy cityscapes in the example image.
CUDA_VISIBLE_DEVICES=$GPU_ID python tools/visualize.py \
--config-file configs/sfda/sfda_city2foggy.yaml \
--model-dir $WEIGHT_LOCATION \
--img_path $SAMPLE_LOCATION| Source | Target | Download Link |
|---|---|---|
| Cityscapes | FoggyCityscapes | Google drive |
| Kitti | Cityscapes | Google drive |
| Sim10k | Cityscapes | Google drive |
| Pascal VOC | Watercolor | Google drive |
| Pascal VOC | Clipart | Google drive |
Open
TBDIf you have any issue with code or paper, feel free to contact jun_yonsei@yonsei.ac.kr.