Thanks to visit codestin.com
Credit goes to github.com

Skip to content

RoyalVane/ASM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 

Repository files navigation

ASM

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.

Usage

Prerequisites

  • Python 3.6
  • GPU Memory >= 32G
  • Pytorch >= 1.5.0

Download ImageNet-pretained DeepLab:

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

DATA_DIRECTORY = '/data02/yawei/Data/GTA5/'
DATA_DIRECTORY_TARGET = '/data02/yawei/Data/Cityscapes/'
DATA_DIRECTORY = '/data02/yawei/Data/Cityscapes/'

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 trained Model

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:

Citation

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}
}

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".

About

( NeurIPS 2020 ) Adversarial Style Mining for One-Shot Unsupervised Domain Adaptation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages