We propose a Multi-Target Active Domain Adaptation (MT-ADA) framework for image classification, named D3GU. It is designed to align source and multiple target domains via
- Decomposed Domain Discrimination (D3) during training to achieve both source-target and target-target domain alignments.
- GU-KMeans during active selection to sample informative images for annotation.
Install conda or miniconda then create new environment with the provided d3gu.yml
file:
conda env create -f d3gu.yml
We use
Office31,
OfficeHome,
and DomainNet
in experiments. Please create a datasets
folder and download the images under it.
The structure of datasets
directory should be:
|-- datasets
| |-- office31
| | |-- amazon
| | |-- dslr
| | |-- webcam
| |-- office-home
| | |-- art
| | |-- clipart
| | |-- product
| | |-- real
| |-- domain-net
| | |-- clipart
| | |-- infograph
| | |-- painting
| | |-- quickdraw
| | |-- real
| | |-- sketch
Training is composed of two stages: unsupervised pretraining stage and active learning stage. Evaluation is automatically applied after training. In parallel, there are 3 domain discrimination methods {disc}:
- binary domain discrimination (bin)
- all-way domain discrimination (aw)
- docomposed domain discrimination (d3)
Select discrimination method {disc}, dataset {dataset}, and find corresponding config file under config/pretrain_dann_{disc}/{dataset}
. Then train on a single gpu with command:
python pretrain_dann_{disc}.py --config_file config/pretrain_dann_{disc}/{dataset}/xxx.yaml
Select discrimination method {disc}, dataset {dataset}, and active selectino algorithm {alg}. Find corresponding config file under config/active_dann_{disc}/{dataset}/target_combined/{alg}/xxx.yaml
and train on a single gpu with command:
python active_dann_{disc}.py --config_file config/active_dann_{disc}/{dataset}/target_combined/alg/xxx.yaml
We provide unsupervised pretrained checkpoints and actively trained checkpoints here:
binary domain discrimination
Method | Dataset | Link |
---|---|---|
Unsupervised Pretrain | Office31 OfficeHome DomainNet |
Google Drive Google Drive Google Drive |
GU-KMeans | Office31 OfficeHome DomainNet |
Google Drive Google Drive Google Drive |
all-way domain discrimination
Method | Dataset | Link |
---|---|---|
Unsupervised Pretrain | Office31 OfficeHome DomainNet |
Google Drive Google Drive Google Drive |
GU-KMeans | Office31 OfficeHome DomainNet |
Google Drive Google Drive Google Drive |
decomposed domain discrimination
Method | Dataset | Link |
---|---|---|
Unsupervised Pretrain | Office31 OfficeHome DomainNet |
Google Drive Google Drive Google Drive |
GU-KMeans | Office31 OfficeHome DomainNet |
Google Drive Google Drive Google Drive |
If you find this repo useful, please cite:
@inproceedings{zhang2024d3gu,
title={D3GU: Multi-target Active Domain Adaptation via Enhancing Domain Alignment},
author={Zhang, Lin and Xu, Linghan and Motamed, Saman and Chakraborty, Shayok and De la Torre, Fernando},
booktitle = {WACV},
year={2024}
}