We provide PyTorch implementation for "Towards Effective Deep Transfer via Attentive Feature Alignment" (NN2021).
- Python 3.6
- Pytorch 1.1.0
- Dependencies in requirements.txt
-
Clone this repo:
git clone https://github.com/xiezheng-cs/AFA.git cd AFA
-
Install pytorch and other dependencies.
pip install -r requirements.txt
-
First Stage:
ResNet101: python main.py hocon_config/First_stage_AST/resnet101_stanford_dogs_120.hocon MobileNet_V2: python main.py hocon_config/First_stage_AST/mobilenet_v2_stanford_dogs_120.hocon
-
Second Stage:
ResNet101: python main.py hocon_config/Second_stage_ACT/resnet101_Stanford_dogs_120.hocon MobileNet_V2: python main.py hocon_config/Second_stage_ACT/mobilenet_v2_Stanford_dogs_120.hocon
Target Data Set | Model | DELTA Top1 Acc(%) | AFA(Ours) Top1 Acc(%) |
---|---|---|---|
Stanford Dogs 120 | MobileNetV2 | 81.3±0.1 | 82.1±0.1 |
Stanford Dogs 120 | ResNet-101 | 88.7±0.1 | 90.1±0.0 |
Model | Link | Top1 Acc (%) |
---|---|---|
ResNet101 | https://github.com/xiezheng-cs/AFA/releases/tag/models | 90.22 |
MobileNetV2 | https://github.com/xiezheng-cs/AFA/releases/tag/models | 82.17 |
ResNet101: python main.py hocon_config/val/resnet101_Stanford_dogs_120.hocon
MobileNet_V2: python main.py hocon_config/val/mobilenet_v2_Stanford_dogs_120.hocon
If this work is useful for your research, please cite our paper:
@InProceedings{xie2021afa,
title = {Towards Effective Deep Transfer via Attentive Feature Alignment},
author = {Zheng Xie, Zhiquan Wen, Yaowei Wang, Qingyao Wu, and Mingkui Tan},
journal = {Neural Networks},
volume = {138},
pages = {98-109},
year = {2021}
}