Skip to content

Keras pretrained models (VGG16 and InceptionV3) + Transfer Learning for predicting classes in the Oxford 102 flower dataset

License

Notifications You must be signed in to change notification settings

gpostelnicu/keras-transfer-learning-for-oxford102

This branch is 1 commit ahead of, 15 commits behind Arsey/keras-transfer-learning-for-oxford102:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

51cb072 · Jun 16, 2017
Jun 16, 2017
Jan 20, 2017
Dec 7, 2016
Jun 14, 2017
Jun 16, 2017
Nov 10, 2016
Oct 27, 2016
Jun 14, 2017
Jun 14, 2017
Jun 12, 2017
Jun 14, 2017
Jun 14, 2017
Jun 14, 2017
Jun 16, 2017

Repository files navigation

See my application for identifying plants - Plant Care. It works using the code from the model implemented in this repo.

Keras pretrained models (VGG16, InceptionV3, Resnet50, Resnet152) + Transfer Learning for predicting classes in the Oxford 102 flower dataset (or any custom dataset)

This bootstraps the training of deep convolutional neural networks with Keras to classify images in the Oxford 102 category flower dataset.

Train process is fully automated and the best weights will be saved.

This code can be used for any dataset, just follow the original files structure in data/sorted directory after running bootstrap.py. If you want to store your dataset somewhere else, you can do it and run train.py with setting a path to dataset with a special parameter --data_dir==/full/path/to/your/sorted/data

Notice: for ResNet152 you should download weights manually here and put them under the project_directory/weights

Overview

  • bootstrap.py: downloads the Oxford 102 dataset and prepare image files
  • train.py: starts end-to-end training process
  • server.py: a small python server based on sockets and designed to keep a model in memory for fast recognition requests
  • client.py: a client that sends requests to server.py

Usage

Step 1: Bootstrap

python bootstrap.py

Step 2: Train

python train.py --model=resnet50

Step 3: Get predictions using predict.py or server.py + client.py

Using predict.py:

python predict.py --path "/full/path/to/image" --model=resnet50

Using server.py + client.py:

  1. run server and wait till model is loaded. Do not break server, it should be run and listen for incoming connections
python server.py --model=resnet50
  1. send requests using client
python client.py --path "/full/path/to/image"

About

Keras pretrained models (VGG16 and InceptionV3) + Transfer Learning for predicting classes in the Oxford 102 flower dataset

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%