This is the official implementation of:
Zeyi Huang', Haohan Wang', Eric P. Xing, and Dong Huang, Self-Challenging Improves Cross-Domain Generalization, ECCV, 2020 (Oral), arxiv version.
Notice about DG task: In order to get the same results in the testing part, you should use the same environment configuration here, including software, hardware and random seed. When using a different environment configuration, similar to other DG repositories, you need to tune the parameters a little bit. According to my observations, a simple larger batch size and early stop can solve the problem. If you still can't solve the problem, don't panic! send me an email(zeyih(at)andrew(dot)cmu(dot)edu) with your environment. I'll help you out.
Update: To mitigate fluctuation in different environments, we modify RSC in a curriculum manner. Also, we unify RSC for different network architectures. If you have any questions about the code, feel free to contact me or pull a issue.
@inproceedings{huangRSC2020,
title={Self-Challenging Improves Cross-Domain Generalization},
author={Zeyi Huang and Haohan Wang and Eric P. Xing and Dong Huang},
booktitle={ECCV},
year={2020}
}
Download PACS dataset from here. Once you have download the data, you must update the files in data/correct_txt_list to match the actual location of your files. Note: make sure you use the same train/val/test split in PACS paper.
Experiments with different source/target domains are listed in train.py(L145-152).
To train a ResNet18, simply run:
python train.py --net resnet18
To test a ResNet18, you can download RSC model below and logs: | Backbone | Target Domain | Acc % | models |
---|---|---|---|---|
ResNet-18 | Photo | 96.05 | download | |
ResNet-18 | Sketch | 82.67 | download | |
ResNet-18 | Cartoon | 81.61 | download | |
ResNet-18 | Art | 85.16 | download |
Faster-RCNN
New ImageNet ResNet baselines training by RSC.
Backbone | Top-1 Acc % | Top-5 Acc % | pth models |
---|---|---|---|
ResNet-50 | 77.18 | 93.53 | download |
ResNet-101 | 78.23 | 94.16 | download |
We borrowed code and data augmentation techniques from Jigen, ImageNet-pytorch.