Skip to content

Transfer Learning: Training a food image classifier using pretrained weights with TensorFlow

Notifications You must be signed in to change notification settings

dkorobchenko/transfer-learning-food

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transfer Learning Example

This demo shows how to train a ConvNet on your own data using pretrained weights. In the example we will train an image classifier to recognize food. The demo is implemented using TensorFlow 1.10

Main components

  1. Model definition
    • In the demo we will use VGG19 model
    • The model is defined in model.py using TensorFlow Slim
  2. Training pipeline
    • The pipeline contains train/val dataset pipelines, train/val graphs definition, train loss, validation accuracy, loading of pretrained weights from a snapshot, various TF training structures and training loop
    • The procedure is defined in train.py
    • To run the training use train.py or run_train.sh
    • Check "Settings" section in both files before running
  3. Inference pipeline
    • The pipeline contains inference graph definition, loading trained weights, loading and preprocessing an input test image and inference procedure
    • To run the inference use inference.py
    • Check "Settings" section before running
  4. Pretrained weights
  5. Dataset

Docker

To avoid problems with various versions of the frameworks, it is recommended to execute everything in a docker container.

  • To build the docker container execute ./docker/docker_build.sh
  • To run the docker container in bash mode execute ./docker/docker_run_bash.sh

About

Transfer Learning: Training a food image classifier using pretrained weights with TensorFlow

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published