Your data should follow this directory structure:

office-31/
├── amazon/
│   ├── backpack
│   ├── bike
│   ├── bike_helmet
│   └── ...
├── dslr/
│   ├── backpack
│   ├── bike
│   ├── bike_helmet
│   └── ...
└── webcam/
    ├── backpack
    ├── bike
    ├── bike_helmet
    └── ...

Place the dataset in the following path:
data/datasets/

Alternatively, you can specify the path to the dataset using the --data_path argument.


Link to Office-31 dataset:
https://www.kaggle.com/datasets/african66666/office31

Link to Office-Home dataset:
https://drive.google.com/file/d/0B81rNlvomiwed0V1YUxQdC1uOTg/view?usp=sharing&resourcekey=0-2SNWq0CDAuWOBRRBL7ZZsw


###
Argument Settings:

Set the source domain name using:
--src

Set the target domain name using:
--tar

Set the batch size using:
--bs (default = 32)

Set the number of classes using:
--num_classes (default = 31)

Set the number of training epochs using:
--stop_epoch (default = 200)

Set the random seed for reproducibility using:
--seed

Set the log file output path using:
--log 

Set the target test domain name (if different from target train domain) using:
--tar_t (default value is the value of --tar argument)

Set architecture using:
--arch (default = 'resnet50')
if the model is not pretrained then also use:
--no_pretrain

Set the base augmentation index for target train data using:
--bai

Set the transformation index (pre-processing) of target test data using:
--tti

Set the second augmentation index for target train data using:
--aug_g_i

Set the augmentation index for source data using:
--src_aug_idx

Set the normalization statistics used for pre-processing:
--ns (default: 'imagenet')
If the model is pretrained on ImageNet, this should remain as 'imagenet'.
If the model is not pretrained, set this to 'src' to use the statistics of the source dataset.



Example:
To run an adaptation task from Amazon to DSLR on the Office-31 dataset:
python main.py --src amazon --tar dslr --stop_epoch 50 --seed 1 --log './results/office31/'


To run an adaptation task from art to clipart on the Office-Home dataset:
python main.py --src art --tar clipart --num_classes 65 --stop_epoch 50 --bs 64 --seed 1 --log './results/officehome/'


To run an adaptation task from MNIST to USPS on the digit datasets (similar for USPS to MNIST):
python main.py --src mnist --tar usps --tar_t usps_test --num_classes 10 --arch digit_usps --no_pretrain --bai 2 --tti 2 --ns src --aug_g_i 3 --src_aug_idx 3 --seed 1 --log './results/digits' 


To run an adaptation task from SVHN to MNIST on the digit datasets:
python main.py --src svhn_train --tar mnist_train --tar_t mnist_test --num_classes 10 --arch digit_svhn --no_pretrain --bai 4 --tti 4 --ns src --aug_g_i 6 --src_aug_idx 7 --seed 1 --log './results/digits'
