thuml / Transferable-Query-Selection

Code Release for "Transferable Query Selection for Active Domain Adaptation"(CVPR2021)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transferable-Query-Selection

Code Release for "Transferable Query Selection for Active Domain Adaptation"(CVPR2021)

Waiting for code update and document.

The adversarial-examples refs to https://github.com/sarathknv/adversarial-examples-pytorch

  • Dataset Download

Dataset download:
Office-31: http://people.eecs.berkeley.edu/~jhoffman/domainadapt/
Office-Home: http://hemanthdv.org/OfficeHome-Dataset/
VisDA: https://github.com/VisionLearningGroup/taskcv-2017-public/tree/master/classification
Download the dataset according to the instructions on the above, and update the path in each file in the 'data' folder

  • Specification of dependencies

We use the following libraries: pytorch 1.7, torchvision 0.6, numpy 1.18 and matplotlib 3.2.
Pre-trained models resnet-50 can be automatically downloaded from the pytorch community.

  • Command

For Office-31 command:
python3 main.py --gpu 0 --lr 0.1 --batch-size 32 --epochs 50 --source data/office/amazon.txt --source-val data/office/amazon.txt --target data/office/dslr.txt --target-val data/office/dslr.txt --class-num 31 | tee "A_D.log"

For Office-Home command:
python3 main.py --gpu 0 --lr 0.1 --epochs 40 --batch-size 32 --source data/office-home/Art.txt --target data/office-home/Clipart.txt --target-val data/office-home/Clipart.txt --class-num 65 | tee "A_C.log"

For VisDA command:
python3 main.py --gpu 0 --lr 0.1 --batch-size 32 --epochs 20 --source data/visda2017/train_list.txt --target data/visda2017/validation_list.txt --target-val data/visda2017/validation_list.txt --class-num 12 | tee "vis.log"

About

Code Release for "Transferable Query Selection for Active Domain Adaptation"(CVPR2021)


Languages

Language:Python 100.0%