All Projects → PRIS-CV → AP-CNN_Pytorch-master

PRIS-CV / AP-CNN_Pytorch-master

Licence: MIT license
Weakly Supervised Attention Pyramid Convolutional Neural Network for Fine-Grained Visual Classification (TIP2021)

Programming Languages

python
139335 projects - #7 most used programming language
c
50402 projects - #5 most used programming language
Cuda
1817 projects
shell
77523 projects

Projects that are alternatives of or similar to AP-CNN Pytorch-master

Fine-Grained-or-Not
Code release for Your “Flamingo” is My “Bird”: Fine-Grained, or Not (CVPR 2021 Oral)
Stars: ✭ 32 (-11.11%)
Mutual labels:  fine-grained, fine-grained-visual-categorization
PFNet-FGVC
PFNet: A Novel Part Fusion Network for Fine-grained Visual Categorization
Stars: ✭ 26 (-27.78%)
Mutual labels:  fine-grained-visual-categorization
Solid
A declarative, efficient, and flexible JavaScript library for building user interfaces.
Stars: ✭ 13,115 (+36330.56%)
Mutual labels:  fine-grained
thisisfine
T̶̘̊h̷̙͘į̸̀ș̷͌ ̴̳̀r̴̬̕e̷̬͐p̵͍̚o̵̧̎s̶̗͂i̷͚̿t̷̟͝õ̴͙ř̵̘y̷̛̪ ̴̮͌i̶͊͜s̴̠̊ ̴̼͗f̶͘͜i̵̮͊n̴̨̊e̶̖̍!̷̝͋ ̴̨͛T̷̐͜h̷̺̔e̶̩̍r̸̰͒é̶̥ ̸̻̇ȉ̶͍s̵̡̍ ̴̛̫n̶̼̓ọ̷̀t̸̊ͅh̵̙͑ĩ̶͚n̵͙̋g̴̫̃ ̸̼͊w̷̘̿r̶̩̓o̷̠͝n̷͉͌g̶̞͒ ̷̛̼ọ̸̓v̶͍̈́e̵̺͑r̸̻̄ ̴̲̀h̸̉ͅé̶͙r̷̻̾e̷̠͛.̸̨̌
Stars: ✭ 18 (-50%)
Mutual labels:  fine-grained
CLUEmotionAnalysis2020
CLUE Emotion Analysis Dataset 细粒度情感分析数据集
Stars: ✭ 3 (-91.67%)
Mutual labels:  fine-grained
PartNet
The source code for the TMM paper: Part-Aware Fine-grained Object Categorization using Weakly Supervised Part Detection Network
Stars: ✭ 17 (-52.78%)
Mutual labels:  fine-grained-visual-categorization
ePillID-benchmark
ePillID Dataset: A Low-Shot Fine-Grained Benchmark for Pill Identification (CVPR 2020 VL3)
Stars: ✭ 54 (+50%)
Mutual labels:  fine-grained-visual-categorization
ProtoTree
ProtoTrees: Neural Prototype Trees for Interpretable Fine-grained Image Recognition, published at CVPR2021
Stars: ✭ 47 (+30.56%)
Mutual labels:  fine-grained-visual-categorization

AP-CNN

Code release for Weakly Supervised Attention Pyramid Convolutional Neural Network for Fine-Grained Visual Classification (TIP2021).

Dependencies

Python 3.6 with all of the pip install -r requirements.txt packages including:

  • torch == 0.4.1
  • opencv-python
  • visdom

Data

  1. Download the FGVC image data. Extract them to data/cars/, data/birds/ and data/airs/, respectively.
  -/cars/
     └─── car_ims
             └─── 00001.jpg
             └─── 00002.jpg
             └─── ...
     └─── cars_annos.mat
  -/birds/
     └─── images.txt
     └─── image_class_labels.txt
     └─── train_test_split.txt
     └─── images
             └─── 001.Black_footed_Albatross
                       └─── Black_Footed_Albatross_0001_796111.jpg
                       └─── ...
             └─── 002.Laysan_Albatross
             └─── ...
   -/airs/
     └─── images
             └─── 0034309.jpg
             └─── 0034958.jpg
             └─── ...
     └─── variants.txt
     └─── images_variant_trainval.txt
     └─── images_variant_test.txt
  1. Preprocess images.
  • For birds: python utils/split_dataset/birds_dataset.py
  • For cars: python utils/split_dataset/cars_dataset.py
  • For airs: python utils/split_dataset/airs_dataset.py

Training

Start:

  1. python train.py --dataset {cars,airs,birds} --model {resnet50,vgg19} [options: --visualize] to start training.
  • For example, to train ResNet50 on Stanford-Cars: python train.py --dataset cars --model resnet50
  • Run python train.py --help to see full input arguments.

Visualize:

  1. python -m visdom.server to start visdom server.

  2. Visualize online attention masks and ROIs on http://localhost:8097.

Pretrained Checkpoints

Pretrained checkpoints with following settings are available on download link, with access code "kjqu".

Dataset base model accuracy(%)
CUB-200-2011 resnet50 88.4
Stanford-Cars resnet50 95.3
FGVC-Aircraft resnet50 94.0

Citation

If you find this paper useful in your research, please consider citing:

@ARTICLE{9350209,
author={Y. {Ding} and Z. {Ma} and S. {Wen} and J. {Xie} and D. {Chang} and Z. {Si} and M. {Wu} and H. {Ling}},
journal={IEEE Transactions on Image Processing},
title={AP-CNN: Weakly Supervised Attention Pyramid Convolutional Neural Network for Fine-Grained Visual Classification},
year={2021},
volume={30},
number={},
pages={2826-2836},
doi={10.1109/TIP.2021.3055617}}

Contact

Thanks for your attention! If you have any suggestion or question, you can leave a message here or contact us directly:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].