Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 1.51 KB

README.md

File metadata and controls

43 lines (31 loc) · 1.51 KB

W2D

This repo is the official implementation of our CVPR 2022 paper "The Two Dimensions of Worst-case Training and the Integrated Effect for Out-of-domain Generalization".

Getting Started

Data Preparation

  • Downloader datasets (except NICO and CelebA datasets)
python3 -m domainbed.scripts.download \
       --data_dir=./domainbed/data
  • Download CelebA dataset from here
  • Download clean NICO dataset (provided by ours) from here
  • The directory structures are discribed at OoD-Bench

Install

  • Pytorch

Launch a sweep

cd /ood_bench/DomainBed
bash sweep/"dataset_name"/run.sh launch ../datasets 0
  • To change the training setting, modify the scripts under /ood_bench/DomainBed/sweep.
  • If you have any questions about the scripts, more details are discribed at OoD-Bench and DomainBed.
  • Note: Since ResNet is not used in Colored_MNIST dataset, when you train on Colored_MNIST, uncomment line 992-1020 at algorithms.py.

View the results

python -m domainbed.scripts.collect_results\
       --input_dir="sweep_output_path"

Acknowledgments

The codebase is built upon OoD-Bench and DomainBed.