@@ -20,94 +20,89 @@ Code for our ICML-2020 paper [**Do We Really Need to Access the Source Data? Sou
20201 . ##### Unsupervised Closed-set Domain Adaptation (UDA) on the Digits dataset
2121 - MNIST -> USPS (**m2u**) SHOT (**cls_par = 0.1**) and SHOT-IM (**cls_par = 0.0**)
2222 ```python
23- cd digit/
24- python uda_digit.py --dset m2u --gpu_id 0 --output seed2020 --seed 2020 --cls_par 0.0
25- python uda_digit.py --dset m2u --gpu_id 0 --output seed2020 --seed 2020 --cls_par 0.1
23+ cd digit/
24+ python uda_digit.py --dset m2u --gpu_id 0 --output ckps_digits --cls_par 0.0
25+ python uda_digit.py --dset m2u --gpu_id 0 --output ckps_digits --cls_par 0.1
2626 ```
2727
28282 . ##### Unsupervised Closed-set Domain Adaptation (UDA) on the Office/ Office-Home dataset
2929 - Train model on the source domain **A** (**s = 0**)
3030 ```python
3131 cd object/
32- python image_source.py --trte val --da uda --output seed2020 --seed 2020 -- gpu_id 0 --dset office --max_epoch 30 --s 0
32+ python image_source.py --trte val --da uda --output ckps/source/ --gpu_id 0 --dset office --max_epoch 100 --s 0
3333 ```
3434
3535 - Adaptation to other target domains **D and W**, respectively
3636 ```python
37- python image_target.py --savename par0.0 --cls_par 0.0 --zz val --da uda --output seed2020 --seed 2020 --gpu_id 0 --dset office --max_epoch 30 --s 0
38- python image_target.py --savename par0.3 --cls_par 0.3 --zz val --da uda --output seed2020 --seed 2020 --gpu_id 0 --dset office --max_epoch 30 --s 0
37+ python image_target.py --cls_par 0.3 --da uda --output_src ckps/source/ --output ckps/target/ --gpu_id 0 --dset office --s 0
3938 ```
40- 39+
41403 . ##### Unsupervised Closed-set Domain Adaptation (UDA) on the VisDA-C dataset
4241 - Synthetic-to-real
4342 ```python
4443 cd object/
45- python uda_visda .py --savename par0.0 --cls_par 0.0 --zz val --da uda --output seed2020 --seed 2020 --gpu_id 0 --max_epoch 3
46- python uda_visda .py --savename par0 .3 --cls_par 0.3 --zz val --da uda --output seed2020 --seed 2020 --gpu_id 0 --max_epoch 3
44+ python image_source .py --trte val --output ckps/source/ --da uda --gpu_id 0 --dset VISDA-C --net resnet101 --lr 1e-3 --max_epoch 10 --s 0
45+ python image_target .py --cls_par 0 .3 --da uda --dset VISDA-C --gpu_id 0 --s 0 --output_src ckps/source/ --output ckps/target/ --net resnet101 --lr 1e- 3
4746 ```
4847
49484 . ##### Unsupervised Partial-set Domain Adaptation (PDA) on the Office-Home dataset
5049 - Train model on the source domain **A** (**s = 0**)
5150 ```python
52- cd object/
53- python image_source.py --trte val --da pda --output seed2020 --seed 2020 -- gpu_id 0 --dset office-home --max_epoch 30 --s 0
51+ cd object/
52+ python image_source.py --trte val --da pda --output ckps/source/ --gpu_id 0 --dset office-home --max_epoch 50 --s 0
5453 ```
5554
5655 - Adaptation to other target domains **C and P and R**, respectively
5756 ```python
58- python image_target.py --savename par0.0 --cls_par 0.0 --zz val --da pda --gent '' --threshold 10 --output seed2020 --seed 2020 --gpu_id 0 --dset office-home --max_epoch 30 --s 0
59- python image_target.py --savename par0.3 --cls_par 0.3 --zz val --da pda --gent '' --threshold 10 --output seed2020 --seed 2020 --gpu_id 0 --dset office-home --max_epoch 30 --s 0
60- ```
61-
57+ python image_target.py --cls_par 0.3 --threshold 10 --da pda --dset office-home --gpu_id 0 --s 0 --output_src ckps/source/ --output ckps/target/
58+ ```
59+ 62605 . ##### Unsupervised Open-set Domain Adaptation (ODA) on the Office-Home dataset
6361 - Train model on the source domain **A** (**s = 0**)
6462 ```python
65- cd object/
66- python image_source.py --trte val --da oda --output seed2020 --seed 2020 -- gpu_id 0 --dset office-home --max_epoch 30 --s 0
63+ cd object/
64+ python image_source.py --trte val --da oda --output ckps/source/ --gpu_id 0 --dset office-home --max_epoch 50 --s 0
6765 ```
6866
6967 - Adaptation to other target domains **C and P and R**, respectively
7068 ```python
71- python image_target_oda.py --savename par0.0 --cls_par 0.0 --zz val --da oda --output seed2020 --seed 2020 --gpu_id 0 --dset office-home --max_epoch 30 --s 0
72- python image_target_oda.py --savename par0.3 --cls_par 0.3 --zz val --da oda --output seed2020 --seed 2020 --gpu_id 0 --dset office-home --max_epoch 30 --s 0
69+ python image_target_oda.py --cls_par 0.3 --da oda --dset office-home --gpu_id 0 --s 0 --output_src ckps/source/ --output ckps/target/
7370 ```
74-
71+
75726 . ##### Unsupervised Multi-source Domain Adaptation (MSDA) on the Office-Caltech dataset
7673 - Train model on the source domains **A** (**s = 0**), **C** (**s = 1**), **D** (**s = 2**), respectively
7774 ```python
78- cd object/
79- python image_source.py --trte val --da uda --output seed2020 --seed 2020 -- gpu_id 0 --dset office-caltech --net resnet101 -- max_epoch 30 --s 0
80- python image_source.py --trte val --da uda --output seed2020 --seed 2020 -- gpu_id 0 --dset office-caltech --net resnet101 -- max_epoch 30 --s 1
81- python image_source.py --trte val --da uda --output seed2020 --seed 2020 -- gpu_id 0 --dset office-caltech --net resnet101 -- max_epoch 30 --s 2
75+ cd object/
76+ python image_source.py --trte val --da uda --output ckps/source/ --gpu_id 0 --dset office-caltech --max_epoch 100 --s 0
77+ python image_source.py --trte val --da uda --output ckps/source/ --gpu_id 0 --dset office-caltech --max_epoch 100 --s 1
78+ python image_source.py --trte val --da uda --output ckps/source/ --gpu_id 0 --dset office-caltech --max_epoch 100 --s 2
8279 ```
8380
8481 - Adaptation to the target domain **W** (**t = 3**)
8582 ```python
86- python image_target.py --savename par0.3 -- cls_par 0.3 --zz val -- da uda --output seed2020 --seed 2020 --gpu_id 0 --issave 1 -- dset office-caltech --net resnet101 --max_epoch 30 --s 0
87- python image_target.py --savename par0.3 -- cls_par 0.3 --zz val -- da uda --output seed2020 --seed 2020 --gpu_id 0 --issave 1 -- dset office-caltech --net resnet101 --max_epoch 30 --s 1
88- python image_target.py --savename par0.3 -- cls_par 0.3 --zz val -- da uda --output seed2020 --seed 2020 --gpu_id 0 --issave 1 -- dset office-caltech --net resnet101 --max_epoch 30 --s 2
89- python image_multisource.py --savename par0 .0 --zz val -- da uda --output seed2020 --seed 2020 --gpu_id 0 --dset office-caltech --net resnet101 --max_epoch 30 --t 3
83+ python image_target.py --cls_par 0.3 --da uda --output_src ckps/source/ --output ckps/target/ --gpu_id 0 --dset office --s 0
84+ python image_target.py --cls_par 0.3 --da uda --output_src ckps/source/ --output ckps/target/ --gpu_id 0 --dset office --s 1
85+ python image_target.py --cls_par 0.3 --da uda --output_src ckps/source/ --output ckps/target/ --gpu_id 0 --dset office --s 0
86+ python image_multisource.py --cls_par 0 .0 --da uda --dset office-caltech --gpu_id 0 --t 3 --output_src ckps/source/ --output ckps/target/
9087 ```
9188
92897 . ##### Unsupervised Multi-target Domain Adaptation (MTDA) on the Office-Caltech dataset
9390 - Train model on the source domain **A** (**s = 0**)
9491 ```python
95- cd object/
96- python image_source.py --trte val --da uda --output seed2020 --seed 2020 -- gpu_id 0 --dset office-caltech --net resnet101 -- max_epoch 30 --s 0
92+ cd object/
93+ python image_source.py --trte val --da uda --output ckps/source/ --gpu_id 0 --dset office-caltech --max_epoch 100 --s 0
9794 ```
9895
9996 - Adaptation to multiple target domains **C and P and R** at the same time
10097 ```python
101- python image_multitarget.py --savename par0.0 --cls_par 0.0 --zz val --da uda --output seed2020 --seed 2020 --gpu_id 0 --dset office-caltech --net resnet101 --max_epoch 30 --s 0
102- python image_multitarget.py --savename par0.3 --cls_par 0.3 --zz val --da uda --output seed2020 --seed 2020 --gpu_id 0 --dset office-caltech --net resnet101 --max_epoch 30 --s 0
98+ python image_multitarget.py --cls_par 0.3 --da uda --dset office-caltech --gpu_id 0 --s 0 --output_src ckps/source/ --output ckps/target/
10399 ```
104-
100+
1051018 . ##### Unsupervised Partial Domain Adaptation (PDA) on the ImageNet-Caltech dataset without source training by ourselves (using the downloaded Pytorch ResNet50 model directly)
106102 - ImageNet -> Caltech (84 classes) [following the protocol in [PADA](https://github.com/thuml/PADA/tree/master/pytorch/data/imagenet-caltech)]
107103 ```python
108- cd object/
109- python image_pretrained.py --savename par0.0 --cls_par 0.0 --output seed2020 --seed 2020 --gpu_id 0 --max_epoch 30
110- python image_pretrained.py --savename par0.3 --cls_par 0.3 --output seed2020 --seed 2020 --gpu_id 0 --max_epoch 30
104+ cd object/
105+ python image_pretrained.py --gpu_id 0 --output ckps/target/--cls_par 0.3
111106 ```
112107
113108** Please refer * run.sh*** for all the settings for different methods and scenarios.
0 commit comments