Awesome
OpenDG: Open Domain Generalization
Code release for Open Domain Generalization with Domain-Augmented Meta-Learning (CVPR2021)
Datasets
- Here are some datasets you may need. PACS and Office-Home for the open domain generalization experiments on them. Office-31, STL-10, Visda2017 and DomainNet for the Multi-Datasets experiment.
- We provide the labels and train-val-test splits for these datasets in
data/
folder.
Requirements
- Python 3.8
- PyTorch 1.5.0
Quick Start
- Download the DATASET you need. Move the
image_list
folder of the DATASET (which we provide indata/DATASET/
) to the directory of the DATASET. - We provide scripts in
src/scripts/
. Complete the configuration of experiments, such as the path to the DATASET, thenbash run_train.sh
for training on source domains and testing on target domain data from known classes. - After training and saving the model checkpoints,
bash run_validate.sh
for testing on the whole target domain, including both known and unknown classes.
Citation
If you find this code or our paper useful, please consider citing:<br>
@inproceedings{shu2021open,
title={Open Domain Generalization with Domain-Augmented Meta-Learning},
author={Shu, Yang and Cao, Zhangjie and Wang, Chenyu and Wang, Jianmin and Long, Mingsheng},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={9624--9633},
year={2021}
}
Contact
If you have any problems about our code, feel free to contact<br>