-
TensorFlow with gpu support, my TensorFlow version is 1.80
-
You shold have at least one dataset to run the training FGVC-Aircraft, Caltech-UCSD Birds-200-2011, Cars Dataset
-
Download Pretrained VGG Model
- 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
- Change the tfrecord path in data/dataset_factory.py
Command for training
$ python train.py
Command for testing
$ python test.py
Dataset | CUB200 | FGVC-Aircraft | Standford Cars |
---|---|---|---|
Accuracy | 82.6% | 84.2% | 88.5% |
After training is finished, I visualize some activation maps after vgg/pool5 layer:
@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
I refactor the training/testing code with tf.estimator API