Giter Club home page Giter Club logo

dfl-cnn's Introduction

DFL-CNN : a fine-grained classifier

This is a simple pytorch re-implementation of CVPR 2018 Learning a Discriminative Filter Bank Within a CNN for Fine-Grained Recognition.

Introduction:

This work still need to be updated. The features are summarized blow:

  • Use VGG16 as base Network.
  • Dataset CUB-200-2011, you can split trainset/testset by yourself.Or you can download dataset which has been split directly from BaiduYun Link.
  • This work has been trained on 4 Titan V after epoch 120 with batchsize 56, Now I got best result Top1 85.140% Top5 96.237% which is lower than author's. You can download weights from weights.
  • Part FCs is replaced by Global Average Pooling to reduce parameters.
  • Every some epoches, ten best patches is visualized in vis_result directory, you can put images you want to visualize in vis_img named number.jpg.
  • Update: ResNet-101 DFL-CNN and Multi-scale DFL-CNN need to be done.

Algorithms Introduction:

Display

Display

Results and Visualization of ten boxes for discriminative patches:

  • This work has been trained on 4 Titan V after epoch 120 with batchsize 56, Now I got best result Top1 85.140% Top5 96.237% which is lower than author's. You can download weights from weights. If use TenCrop transform in code, result can improve further.

  • Test Results:

  • Visualization:

Usage:

  • Download dataset, you can split trainset/valset by yourself
wget http://www.vision.caltech.edu/visipedia-data/CUB-200-2011/CUB_200_2011.tgz
  • Or you can directly get it from BaiduYun Link
  • Then link original dataset to our code root/dataset
 ln -s ./train path/to/code/dataset/train 
 ln -s ./test  path/to/code/dataset/test
  • Finally, Train and Test.
  • Check you GPU resources and modify your run.sh.
sh run.sh

Note:

  1. Visualization of ten best boxes is saved in vis_result/, img you want to visualize should be put in vis_img/.
  2. Weight(checkpoint.pth.tar, model_best.pth.tar) is in weight/.
  3. Loss info is saved in log/.

dfl-cnn's People

Contributors

songdejia avatar

Watchers

 avatar paper2code - bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.