[CVPR2024] PracticalDG: Perturbation Distillation on Vision-Language Models for Hybrid Domain Generalization
Python 3.7.11+
Pytorch 1.8.0+
Download the dataset PACS, OfficeHome and DomainNet.
Arrange data with the following structure:
Path/To/Dataset
├── Domain1
├── cat
├── ......
├── Domain2
├── cat
├── ......
├── Domain3
├── cat
├── ......
├── Domain4
├── cat
├── ......
├── image_list
List for each dataset is provided in ./image_list
Modify the file path in the scripts.
For the training and inference process, please simply execute:
bash scripts/run.sh
Change test_envs to different values (e.g., 0,1,2,3) to conduct leave-one-domain-out protocol.
We thank the authors from OpenDG-Eval for reference. We modify their code to implement Hybrid Domain Generalization.
@inproceedings{chen2024practicaldg,
title={PracticalDG: Perturbation Distillation on Vision-Language Models for Hybrid Domain Generalization},
author={Chen, Zining and Wang, Weiqiu and Zhao, Zhicheng and Su, Fei and Men, Aidong and Meng, Hongying},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={23501--23511},
year={2024}
}
