Skip to content

ChristophRaab/ASAN

 
 

Repository files navigation

Adversarial Spectral Adaptation Network (ASAN).

Pytorch Source code for Adversarial Spectral Adaptation Network (ASAN).
This repository is part of the ACCV 2020 submission Bridging Adversarial and Statistical DomainTransfer via Spectral Adaptation Networks.
Link to paper

Contact: [email protected]
If you got problems with this implementation, feel free to write me an email.

Installation

  1. We provide the yml-file for the virtual conda envirement in the file
    pytorch.yml. After installation you should be able to run the code in this repository.

  2. First, download the dataset your are prefering. The links to the datasets can be found in the respective sections.

  3. After download, unzip the files and place the output folders as they are in the directory images.

  4. (Optional: Adapt the dataset lists in data to your to preferred path)

Demo

For a simple training-evaluation demo run with preset parameters, you can use the following commands for training on

Office-31 A->W
train_image.py --tl RSL --s_dset_path data/office/amazon.txt --t_dset_path data/office/webcam.txt --test_interval 100 --num_workers 12 --sn True --k 11 --tllr 0.001

Image-Clef I->P
train_image.py --tl RSL --dset image-clef --s_dset_path data/office/amazon.txt --t_dset_path data/office/webcam.txt --test_interval 100 --num_workers 12 --sn True --k 11 --tllr 0.001

Training and Inference

  1. The network can be trained via train_image.py See the Args-Parser parameter description in the file for the documentation of the parameters.

  2. The trained models are obtainable under snapshopt/san

Datasets

Office-31

Office-31 dataset can be found here.

Office-Home

Office-Home dataset can be found here.

Image-clef

Image-Clef dataset can be found here.

Acknowledgement

We thank Mingsheng Long et al. for providing the code for the CDAN model.
See https://github.com/thuml/CDAN

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%