AFN
(ICCV'19 Best Paper Nomination) Larger Norm More Transferable: An Adaptive Feature Norm Approach for Unsupervised Domain Adaptation
Install / Use
/learn @jihanyang/AFNREADME
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,resultandsnapshotinmain.sh,and can switch model through changingmodel. -
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 \toCUDA_VISIBLE_DEVICES=${gpu_id} python train_ent.py \ -
run
bash main.shin 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 betweenresnet101andresnet50
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}
}
Related Skills
node-connect
334.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
82.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
334.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
82.1kCommit, push, and open a PR
