The paper "Gradient Harmonization in Unsupervised Domain Adaptation" has been published in IEEE TPAMI 2024.
- Prerequisites
- Data Preparation
- Training UDA model
- Training Retrieval model
- Training Detection model
- Acknowledgements
If you find this repository useful, please consider citing our paper:
@article{huang2024gh,
title={Gradient Harmonization in Unsupervised Domain Adaptation},
author={Huang, Fuxiang and Song, Suqi and Zhang, Lei},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
year={2024},
publisher={IEEE}
}To run the code, please ensure you have the following dependencies installed:
- Python:
==3.8 - PyTorch:
==1.8.1 - CUDA Toolkit:
==11.1
Download the datasets and extract them to ./data:
python cdan/train_image.py CDAN+E --gpu_id 0 --num_iterations 8004 --dset office --s_dset_path data/office31/amazon.txt --t_dset_path data/office31/webcam.txt --test_interval 500 --output_dir cdan/logs/cdan_gh/office31_a2w --GH Truepython mcd/mcd.py data/office31 -d Office31 -s A -t W -a resnet50 --epochs 20 --seed 0 -i 500 --trade-off 10.0 --log mcd/logs/mcd_gh/office31_a2w --GH Truepython dwl/main.py data/office31 -d Office31 -s A -t W -a resnet50 --GH Truepython gvb/train_image.py --gpu_id 0 --GVBG 1 --GVBD 1 --num_iterations 8004 --dset office --s_dset_path data/office31/amazon.txt --t_dset_path data/office31/webcam.txt --test_interval 500 --output_dir gvb/logs/gvb_gh/office31_a2w --GH Truepython ssrt/main_SSRT_GH.office31.pypython cdan/train_image.py CDAN+E --gpu_id 0 --num_iterations 8004 --dset office --s_dset_path data/office31/amazon.txt --t_dset_path data/office31/webcam.txt --test_interval 500 --output_dir cdan/logs/cdan_gh/office31_a2w --GH_new Truepython mcd/mcd.py data/office31 -d Office31 -s A -t W -a resnet50 --epochs 20 --seed 0 -i 500 --trade-off 10.0 --log mcd/logs/mcd_gh/office31_a2w --GH_new Truepython dwl/main.py data/office31 -d Office31 -s A -t W -a resnet50 --GH_new Truepython gvb/train_image.py --gpu_id 0 --GVBG 1 --GVBD 1 --num_iterations 8004 --dset office --s_dset_path data/office31/amazon.txt --t_dset_path data/office31/webcam.txt --test_interval 500 --output_dir gvb/logs/gvb_gh/office31_a2w --GH_new Truepython ssrt/main_SSRT_GH++.office31.pypython Retrieval/maincss_convharmonic.py --GH_new Truepython Detection/train.pyWe would like to acknowledge the following repositories that contributed to our work:
- CDAN: GitHub Repository
- MCD: GitHub Repository
- DWL: GitHub Repository
- GVB: GitHub Repository
- SSRT: GitHub Repository
- GA(TIRG): GitHub Repository
[NOTE] If you have any questions, please don't hesitate to contact Fuxiang Huang, Suqi Song and Lei Zhang.