kumarkan / Food_Detection

Food detection using Tensorflow Object Detection API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Screenshot

Food_Detection

Food detection using Tensorflow Object Detection API

[Instructions are adapted from https://github.com/wagonhelm/TF_ObjectDetection_API/blob/master/README.md ] [Follow my blogpost for step by step instructions - https://blog.goodaudience.com/food-detection-app-using-tensorflow-object-detection-apis-1b9302a9aad2 ]

Required Packages [system requirements]

  1. Install system requirements
sudo apt-get install -y git-core wget protobuf-compiler 
  1. Download and unzip this entire repo from GitHub, either interactively, or by entering
git clone https://github.com/kumarkan/Food_Detection.git
  1. Install Python Requirement. Make use of requirements.txt file
cd Food_Detection
# Requires sudo if not in a virtual environment
pip3 install -r requirements.txt
pip3 install tensorflow jupyter
  1. Clone TensorFlow Models Into Repository Directory and Install Object Detection API
cd Food_Detection
git clone https://github.com/tensorflow/models.git

You will have to run this command every time you close your terminal unless you add the the path to slim to your .bashrc file

cd models/research/
protoc object_detection/protos/*.proto --python_out=.
export PYTHONPATH=$PYTHONPATH:`pwd`:`pwd`/slim
cd ..
cd ..
Note: If you're getting errors while compiling, you might be using an incompatible protobuf compiler. If that's the case, use the following manual installation

Manual protobuf-compiler installation and usage
Download and install the 3.0 release of protoc, then unzip the file.

From tensorflow/models/research/ --> 
wget -O protobuf.zip https://github.com/google/protobuf/releases/download/v3.0.0/protoc-3.0.0-linux-x86_64.zip
unzip protobuf.zip
Run the compilation process again, but use the downloaded version of protoc

From tensorflow/models/research/ -->
./bin/protoc object_detection/protos/*.proto --python_out=.
  1. Launch Jupyter
jupyter notebook
  1. Launch Tensorboard In New Terminal
tensorboard --logdir='data'

Once both jupyter and tensorboard are running, using your browser, navigate to the URLs shown in the terminal output if those don't work try http://localhost:8888/ for Jupyter Notebook and http://localhost:6006/ for Tensorboard.

About

Food detection using Tensorflow Object Detection API


Languages

Language:Python 98.4%Language:Jupyter Notebook 1.6%