/DAI-Net

[CVPR 2024] Boosting Object Detection with Zero-Shot Day-Night Domain Adaptation

Primary LanguagePython

Boosting Object Detection with Zero-Shot Day-Night Domain Adaptation

Zhipeng Du Β· Miaojing Shi Β· Jiankang Deng

PyTorch implementation of Boosting Object Detection with Zero-Shot Day-Night Domain Adaptation. (CVPR 2024) [Page | Paper]

overview

πŸ”¨ To-Do List

    • release the code regarding the proposed model and losses.
    • release the evaluation code, and the pretrained models.
    • release the training code.

πŸš€ Installation

Begin by cloning the repository and setting up the environment:

git clone https://github.com/ZPDu/DAI-Net.git
cd DAI-Net

conda create -y -n dainet python=3.7
conda activate dainet

pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 -f https://download.pytorch.org/whl/torch_stable.html

pip install -r requirements.txt

πŸ“” Training

Data and Weight Preparation

Organize the folders as:

.
β”œβ”€β”€ utils
β”œβ”€β”€ weights
β”‚   β”œβ”€β”€ decomp.pth
β”‚   β”œβ”€β”€ vgg16_reducedfc.pth
β”œβ”€β”€ dataset
β”‚   β”œβ”€β”€ wider_face_train.txt
β”‚   β”œβ”€β”€ wider_face_val.txt
β”‚   β”œβ”€β”€ WiderFace
β”‚   β”‚   β”œβ”€β”€ WIDER_train
β”‚   β”‚   └── WIDER_val

Model Training

To train the model, run

python -m torch.distributed.launch --nproc_per_node=$NUM_OF_GPUS$ train.py

πŸ““ Evaluation​

On Dark Face:

  • Download the testing samples from UG2+ Challenge.
  • Download the checkpoints: DarkFaceZSDA (28.0) or DarkFaceFS (52.9, finetuned with full supervision).
  • Set (1) the paths of testing samples & checkpoint, (2) whether to use a multi-scale strategy, and run test.py.
  • Submit the results for benchmarking. (Detailed instructions).

On ExDark:

  • Our experiments are based on the codebase of MAET. You only need to replace the checkpoint with ours for evaluation.

πŸ“‘ Citation

If you find this work useful, please cite

@inproceedings{du2024boosting,
  title={Boosting Object Detection with Zero-Shot Day-Night Domain Adaptation},
  author={Du, Zhipeng and Shi, Miaojing and Deng, Jiankang},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={12666--12676},
  year={2024}
}

or

@article{du2023boosting,
  title={Boosting Object Detection with Zero-Shot Day-Night Domain Adaptation},
  author={Du, Zhipeng and Shi, Miaojing and Deng, Jiankang},
  journal={arXiv preprint arXiv:2312.01220},
  year={2023}
}

πŸ”Ž Acknowledgement

We thank DSFD.pytorch, RetinexNet_PyTorch, MAET, HLA-Face for their amazing works!