Skip to content

This is a PyTorch implementation of the paper "Multi-branch and Multi-scale Attention Learning for Fine-Grained Visual Categorization (MMAL-Net)" (Fan Zhang, Meng Li, Guisheng Zhai, Yizhao Liu).

Notifications You must be signed in to change notification settings

ZF4444/MMAL-Net

Repository files navigation

MMAL-Net

This is a PyTorch implementation of the paper"Multi-branch and Multi-scale Attention Learning for Fine-Grained Visual Categorization (MMAL-Net)"(Fan Zhang, Meng Li, Guisheng Zhai, Yizhao Liu), and the paper has been accepted by the 27th International Conference on Multimedia Modeling (MMM2021). Welcome to discuss with us in issues!

avatar

Table of Contents

Requirements

  • Python 3.7
  • pytorch 1.3.1
  • numpy 1.17.3
  • scikit-image 0.16.2
  • Tensorboard 1.15.0
  • TensorboardX 2.0
  • tqdm 4.41.1
  • imageio 2.6.1
  • pillow 6.1.0

Datasets

Download theCUB-200-2011datasets and copy the contents of the extractedimagesfolder intodatasets/CUB 200-2011/images.

Download theFGVC-Aircraftdatasets and copy the contents of the extracteddata/imagesfolder intodatasets/FGVC_Aircraft/data/images)

You can also try other fine-grained datasets.

Training TBMSL-Net

If you want to train the MMAL-Net, please download the pretrained model ofResNet-50and move it tomodels/pretrainedbefore runPython train.py.You may need to change the configurations inconfig.pyif your GPU memory is not enough. The parameterN_listisN1, N2, N3in the original paper and you can adjust them according to GPU memory. During training, the log file and checkpoint file will be saved inmodel_pathdirectory.

Evaluation

If you want to test the MMAL-Net, just runPython test.py.You need to specify themodel_pathintest.pyto choose the checkpoint model for testing.

Model

We also provide the checkpoint model trained by ourselves, you can download if fromGoogle DriveforCUB-200-2011or download fromhereforFGVC-Aircraft.If you test on our provided model, you will get 89.6% and 94.7% test accuracy, respectively.

Reference

If you are interested in our work and want to cite it, please acknowledge the following paper:

@misc{zhang2020threebranch,
title={Multi-branch and Multi-scale Attention Learning for Fine-Grained Visual Categorization},
author={Fan Zhang and Meng Li and Guisheng Zhai and Yizhao Liu},
year={2020},
eprint={2003.09150},
archivePrefix={arXiv},
primaryClass={cs.CV}
}

About

This is a PyTorch implementation of the paper "Multi-branch and Multi-scale Attention Learning for Fine-Grained Visual Categorization (MMAL-Net)" (Fan Zhang, Meng Li, Guisheng Zhai, Yizhao Liu).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages