Awesome
ASM
Introduction
This is an official 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.
Presentation Video
Usage
Prerequisites
- Python 3.6
- GPU Memory >= 32G
Download ImageNet-pretained DeepLab:
- Download DeepLab_resnet_pretrained_init-f81d91e8.pth and put it under
pretrained/
.
Download Pretained RAIN
- Download vgg_normalized.pth/decoder_iter_160000.pth/fc_encoder_iter_160000.pth/fc_decoder_iter_160000.pth and put them under
pretrained/
.
Download DataSets
- Download GTA5
- Download Cityscapes
Modify data path to your own
- https://github.com/RoyalVane/ASM/blob/1dac4bfc702da7aaff342683cad628b73807ab2e/ASM/ASM_train.py#L67
- https://github.com/RoyalVane/ASM/blob/1dac4bfc702da7aaff342683cad628b73807ab2e/ASM/ASM_train.py#L83
- https://github.com/RoyalVane/ASM/blob/1dac4bfc702da7aaff342683cad628b73807ab2e/ASM/ASM_evaluate.py#L14
Train
CUDA_VISIBLE_DEVICES=<gpu_id> python ASM_train.py --snapshot-dir ./snapshots/GTA2Cityscapes
Test
CUDA_VISIBLE_DEVICES==<gpu_id> python ASM_evaluate.py
Compute IOU
python ASM_IOU.py
Our Pretrained Model
We also provide our Pretrained ASM models for direct evaluation. These models are trained using 32G V100.
-
The first model is consist with our reported IoU result in the paper. mIoU = 44.53:
-
The second model is trained recently, whose performance is slightly higher than the paper. mIoU = 44.78:
Citation
- If you find this code useful, 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}
}
Related Works
-
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".