-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
xiebinhui
committed
Dec 15, 2020
0 parents
commit 6f20fde
Showing
41 changed files
with
32,531 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# BCDM | ||
code release for "Bi-Classifier Determinacy Maximization for Unsupervised Domain Adaptation" (AAAI2021)\ | ||
[Paper (arXiv)](https://arxiv.org/abs/2012.06995) | ||
|
||
## One-sentence description | ||
|
||
In this paper we prove that BCDM can generate discriminative representations by encouraging target predictions to be consistent and determined enough, meanwhile, preserve the diversity of predictions in an adversarial manner, which outperforms the state-of-the-arts on a wide range | ||
of unsupervised domain adaptation scenarios. | ||
|
||
|
||
## Tasks | ||
We apply BCDM to unsupervised domain adaptation (UDA) on both | ||
image classification and semantic segmentation tasks. | ||
|
||
Training instructions for image classification and semantic segmentation are in the README.md of [classification](https://github.com/BIT-DA/BCDM/tree/master/classification) and [segmentation](https://github.com/BIT-DA/BCDM/tree/master/segmentation) respectively. | ||
|
||
## Citation | ||
If you use this code for your research, please consider citing: | ||
|
||
``` | ||
@inproceedings{Li21BCDM, | ||
title = {Bi-Classifier Determinacy Maximization for Unsupervised Domain Adaptation}, | ||
author = {Shuang Li and Fangrui Lv and Binhui Xie and Chi Harold Liu and Jian Liang and Chen Qin}, | ||
booktitle = {Thirty-Fifth AAAI Conference on Artificial Intelligence (AAAI-21)}, | ||
year = {2021} | ||
} | ||
``` | ||
Supplementary materials could be found in the [corresponding arXiv version](https://arxiv.org/abs/2012.06995). | ||
|
||
|
||
## Acknowledgements | ||
Some codes are adapted from [MCD](https://github.com/mil-tokyo/MCD_DA) and [FADA](https://github.com/JDAI-CV/FADA). We thank them for their excellent projects. | ||
|
||
## Contact | ||
|
||
If you have any problem about our code, feel free to contact | ||
|
||
[email protected] | ||
|
||
or describe your problem in Issues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
## Bi-Classifier Diversity Maximization for Unsupervised Domain Adaptation | ||
This is a [pytorch](http://pytorch.org/) implementation of BCDM. | ||
|
||
|
||
### Prerequisites | ||
- Python 3.6 | ||
- Pytorch >= 1.2.0 | ||
- torchvision | ||
- numpy | ||
- argparse | ||
- random | ||
- PIL | ||
- CUDA >= 9.0 | ||
|
||
|
||
### Step-by-step installation | ||
```bash | ||
conda create --name bcdm -y python=3.6 | ||
conda activate bcdm | ||
|
||
# this installs the right pip and dependencies for the fresh python | ||
conda install -y ipython pip | ||
|
||
# follow PyTorch installation in https://pytorch.org/get-started/locally/ | ||
# we give the instructions for CUDA 9.2 | ||
conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=9.2 -c pytorch | ||
``` | ||
|
||
## Dataset | ||
### VisDA-2017 | ||
VisDA 2017 dataset can be found [here](https://github.com/VisionLearningGroup/taskcv-2017-public) in the classification track. | ||
|
||
|
||
### Train | ||
Train on VisDA2017 with ResNet101 | ||
``` | ||
cd pytorch | ||
python train_visda.py --gpu 0 --resnet 101 --train_path .../data//visda2017/clf/train --val_path .../data/visda2017/clf/validation | ||
``` | ||
|
Oops, something went wrong.