Geometric and Textural Augmentation for Domain Gap Reduction

May 21, 2022 ยท View on GitHub

This is the code for the paper

Geometric and Textural Augmentation for Domain Gap Reduction

Project Page | Paper | Poster | Video

Preresquisites

Testbed Install:

We use Dassl as the testbed and the code is based on it.

# Create the conda environment (make sure conda is installed)
conda create -n dassl python=3.7
conda activate dassl

# Install dependencies
cd Dassl/
pip install -r requirements.txt

# Install torch (version >= 1.7.1) and torchvision based on your cuda version 
conda install pytorch torchvision cudatoolkit=your_cuda_version -c pytorch

# Install this library (no need to re-build if the source code is modified)
python setup.py develop

Datasets Install:

We use three commonly used multi-domain datasets (please download datasets into this folder):

Download the style predictor model into this folder.

Training and Testing

cd gta-dgr/scripts/

# Training on PACS
bash pacs.sh

# Training on Office-Home
bash officehome.sh

# Training on Digits-DG
bash digits.sh

If you find this code useful for your research, please cite

@InProceedings{Liu22GTDG, 
  author={Xiao-Chang Liu and Yong-Liang Yang and Peter Hall},
  title={Geometric and Textural Augmentation for Domain Gap Reduction},
  booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  year={2022}
}