项目作者: dkorobchenko-nv

项目描述 :
Transfer Learning: Training a food image classifier using pretrained weights with TensorFlow
高级语言: Python
项目地址: git://github.com/dkorobchenko-nv/transfer-learning-food.git
创建时间: 2018-10-26T18:24:11Z
项目社区:https://github.com/dkorobchenko-nv/transfer-learning-food

开源协议:

下载


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