Coder Social home page Coder Social logo

tf-bilinear-cnn's Introduction

tf-bilinear-cnn

Requirements

  1. TensorFlow with gpu support, my TensorFlow version is 1.80

  2. You shold have at least one dataset to run the training FGVC-Aircraft, Caltech-UCSD Birds-200-2011, Cars Dataset

  3. Download Pretrained VGG Model

Build the Dataset

  1. Change the dataset path in data/aircraft_data.py, data/cub200_data.py and data/standford_cars.py
$ python data/build_aircraft_data.py 
$ python data/build_cub200_data.py
$ python data/build_standford_cars.py

Training & Testing

  1. Change the tfrecord path in data/dataset_factory.py

Command for training

$ python train.py

Command for testing

$ python test.py

My Results

Dataset CUB200 FGVC-Aircraft Standford Cars
Accuracy 82.6% 84.2% 88.5%

Something interesting!

After training is finished, I visualize some activation maps after vgg/pool5 layer:

demo_1

demo_2

demo_3

demo_4

demo_5

References

@inproceedings{lin2015bilinear,
    Author = {Tsung-Yu Lin, Aruni RoyChowdhury, and Subhransu Maji},
    Title = {Bilinear CNNs for Fine-grained Visual Recognition},
    Booktitle = {International Conference on Computer Vision (ICCV)},
    Year = {2015}
}

I also steal some ideas from https://github.com/HaoMood/bilinear-cnn and https://github.com/abhaydoke09/Bilinear-CNN-TensorFlow

Recent Change

I refactor the training/testing code with tf.estimator API

tf-bilinear-cnn's People

Contributors

rranddom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tf-bilinear-cnn's Issues

Issues compiling code

When 'Building the Dataset', what do you mean by Change the dataset path in data/aircraft_data.py?
I'm not sure and at the moment I'm getting the error "ModuleNotFoundError: No module named 'data'" from line 10 when attempting to run aircraft_data.py.

Also what do I do with the downloaded VGG model?

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.