PyTorch implementation for our NeurIPS 2020 paper: Adversarial Style Mining for One-Shot Unsupervised Domain Adaptation.
In this paper, we aim at the problem named One-Shot Unsupervised Domain Adaptation. Unlike traditional Unsupervised Domain Adaptation, it assumes that only one unlabeled target sample can be available when learning to adapt.
- Python 3.6
- GPU Memory >= 32G
- Pytorch >= 1.5.0
DeepLab_resnet_pretrained_init-f81d91e8.pth and put it under pretrained/
.
Download vgg_normalized.pth/decoder_iter_160000.pth/fc_encoder_iter_160000.pth/fc_decoder_iter_160000.pth and put them under pretrained/
.
Download GTA5 Download Cityscapes
Line 67 in 1dac4bf
Line 83 in 1dac4bf
Line 14 in 1dac4bf
CUDA_VISIBLE_DEVICES=<gpu_id> python ASM_train.py --snapshot-dir ./snapshots/GTA2Cityscapes
CUDA_VISIBLE_DEVICES==<gpu_id> python ASM_evaluate.py
python ASM_IOU.py
We also provide our trained models for direct evaluation. These models are trained using 32G V100.
The first model is consist with our reported IoU result in the paper. IoU = 44.53:
The second model is trained recently, whose performance is slightly higher than the paper. IoU = 44.78:
If you use this code in your research please consider citing
@inproceedings{Luo2020ASM,
title={Adversarial Style Mining for One-Shot Unsupervised Domain Adaptation},
author={Luo, Yawei and Liu, Ping and Guan, Tao and Yu, Junqing and Yang, Yi},
booktitle={Advances in Neural Information Processing Systems},
year={2020}
}
CLAN: One-shot UDA is a realistic but more challenging setting than UDA, which we tried to solve in our CVPR2019 oral paper "Taking A Closer Look at Domain Shift: Category-level Adversaries for Semantics Consistent Domain Adaptation".
Copy and Paste GAN: RAIN is also employed as a strong data augmentation module in our CVPR2020 oral paper "Copy and Paste GAN: Face Hallucination from Shaded Thumbnails".