Giter Site home page Giter Site logo

food_detection's Introduction

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.

food_detection's People

Contributors

anil912001 avatar kumarkan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

food_detection's Issues

train.py missing

I tried the food detection and found that the train.py in the object_detection folder is missing. however there is a model_main.py is this the file to use ?

error in exporting the inference graph

Hello please can you help me I have an error in exporting inference graph and i searched for hours but can't find a solution this is my error:
python export_inference_graph.py --input_type image_tensor --pipeline_config_path training faster_rcnn_inception_v2_pets.config --trained_checkpoint_prefix training "model.ckpt-2950" --output_directory export

Traceback (most recent call last):
File "export_inference_graph.py", line 151, in
tf.app.run()
File "C:\Users\OctaNet\Miniconda3\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
_sys.exit(main(argv))
File "export_inference_graph.py", line 135, in main
text_format.Merge(f.read(), pipeline_config)
File "C:\Users\OctaNet\Miniconda3\envs\tensorflow\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 125, in read
self._preread_check()
File "C:\Users\OctaNet\Miniconda3\envs\tensorflow\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 85, in _preread_check
compat.as_bytes(self.__name), 1024 * 512, status)
File "C:\Users\OctaNet\Miniconda3\envs\tensorflow\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 528, in exit
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.UnknownError: NewRandomAccessFile failed to Create/Open: training : Acc\udce8s refus\udce9.
; Input/output error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.