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.
-
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. -
First, download the dataset your are prefering. The links to the datasets can be found in the respective sections.
-
After download, unzip the files and place the output folders as they are in the directory images.
-
(Optional: Adapt the dataset lists in data to your to preferred path)
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
-
The network can be trained via train_image.py See the Args-Parser parameter description in the file for the documentation of the parameters.
-
The trained models are obtainable under snapshopt/san
Office-31 dataset can be found here.
Office-Home dataset can be found here.
Image-Clef dataset can be found here.
We thank Mingsheng Long et al. for providing the code for the CDAN model.
See https://github.com/thuml/CDAN