Skip to content
/ AFN Public
forked from jihanyang/AFN

(ICCV'19 Best Paper Nomination) Larger Norm More Transferable: An Adaptive Feature Norm Approach for Unsupervised Domain Adaptation

Notifications You must be signed in to change notification settings

OneOneLiu/AFN

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AFN

PyTorch implementation for Larger Norm More Transferable: An Adaptive Feature Norm Approach for Unsupervised Domain Adaptation.

Requirements

  • Platform : Linux

  • Hardware : Nvidia GPU

  • Others:

    • CUDA 9.0.176
    • PyTorch 0.4.1
    • tqdm

Datasets

Please follow the README.md in subfolder Data to organize datasets

Training and Evaluation

  • Make sure you have organized datasets and satisfied the requirements.

  • According to the hierarchy in following block, enter corresponding setting ,dataset and method folder.

  • Modify parameters: data_root, result and snapshot in main.sh,and can switch model through changing model.

  • If you want to run the IAFN+ENT mothod on Office-31 or ImageCLEF-DA, you have to modify the command CUDA_VISIBLE_DEVICES=${gpu_id} python train.py \ to CUDA_VISIBLE_DEVICES=${gpu_id} python train_ent.py \

  • run bash main.sh in your terminal

.
β”œβ”€β”€ README.md
β”œβ”€β”€ data
β”‚Β Β  β”œβ”€β”€ ImageCLEF
β”‚Β Β  β”œβ”€β”€ Office31
β”‚Β Β  β”œβ”€β”€ OfficeHome
β”‚Β Β  β”œβ”€β”€ README.md
β”‚Β Β  └── Visda2017
β”œβ”€β”€ partial
β”‚Β Β  β”œβ”€β”€ OfficeHome
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ HAFN
β”‚Β Β  β”‚Β Β  └── SAFN
β”‚Β Β  β”œβ”€β”€ README.md
β”‚Β Β  └── Visda2017
β”‚Β Β      β”œβ”€β”€ HAFN
β”‚Β Β      └── SAFN
β”œβ”€β”€ resources
└── vanilla
    β”œβ”€β”€ ImageCLEF
    β”‚Β Β  β”œβ”€β”€ HAFN
    β”‚Β Β  └── SAFN
    β”œβ”€β”€ Office31
    β”‚Β Β  β”œβ”€β”€ HAFN
    β”‚Β Β  └── SAFN
    β”œβ”€β”€ README.md
    └── Visda2017
        β”œβ”€β”€ HAFN
        └── SAFN

Here are some description of parameters :

  • data_root : the directory of data.
  • snapshot : the directory to store and load state dicts.
  • result : the directory that store evaluating results.
  • post : distinguish each experiment.
  • repeat : distinguish each repeated result in a experiment.
  • gpu_id : the GPU ID to run experiments.
  • model : switch model between resnet101 and resnet50

Citation

If you use AFN in your research, please consider citing:

@InProceedings{Xu_2019_ICCV,
author = {Xu, Ruijia and Li, Guanbin and Yang, Jihan and Lin, Liang},
title = {Larger Norm More Transferable: An Adaptive Feature Norm Approach for Unsupervised Domain Adaptation},
booktitle = {The IEEE International Conference on Computer Vision (ICCV)},
month = {October},
year = {2019}
}

About

(ICCV'19 Best Paper Nomination) Larger Norm More Transferable: An Adaptive Feature Norm Approach for Unsupervised Domain Adaptation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 93.0%
  • Shell 7.0%