All Projects → wwoo → Tf_box_classify

wwoo / Tf_box_classify

A simple TensorFlow example for training CNN models using input queues and labelled JPEGs

Projects that are alternatives of or similar to Tf box classify

Changepoint Detection
Online Change-point Detection Algorithm for Multi-Variate Data: Applications on Human/Robot Demonstrations.
Stars: ✭ 10 (-9.09%)
Mutual labels:  jupyter-notebook
Idiomatic Robotframework
Stars: ✭ 10 (-9.09%)
Mutual labels:  jupyter-notebook
Neurally Embedded Emojis
Convolutional variational autoencoders and text-question, emoji-answer models
Stars: ✭ 11 (+0%)
Mutual labels:  jupyter-notebook
Python And Spark For Data Analysis
A four-day course on Python, the Scientific Python stack and PySpark, adapted from a training course given by Patrick Varilly to one of our clients in December 2015
Stars: ✭ 10 (-9.09%)
Mutual labels:  jupyter-notebook
Data Science Toolbox Bootcamp
A 4 week program to get started with Data Science. Useful for beginners who want to get started by themselves.
Stars: ✭ 10 (-9.09%)
Mutual labels:  jupyter-notebook
Pytorch Everybodydancenow
Implementation of Everybody Dance Now by pytorch
Stars: ✭ 861 (+7727.27%)
Mutual labels:  jupyter-notebook
Movielens Recommender
Course project for Programing Machine Learnings Applications class
Stars: ✭ 10 (-9.09%)
Mutual labels:  jupyter-notebook
Advanced pymc3
A talk illustrating some of the Advanced features of PyMC3
Stars: ✭ 11 (+0%)
Mutual labels:  jupyter-notebook
Wikipediagenderinequality
Stars: ✭ 10 (-9.09%)
Mutual labels:  jupyter-notebook
Adlawithr Gettingstarted
Getting Started with ADLA with R
Stars: ✭ 11 (+0%)
Mutual labels:  jupyter-notebook
Pandas jupyter
Laboranyagok
Stars: ✭ 10 (-9.09%)
Mutual labels:  jupyter-notebook
Convolutional Pose Machines Release
Code repository for Convolutional Pose Machines, CVPR'16
Stars: ✭ 857 (+7690.91%)
Mutual labels:  jupyter-notebook
Marketing campaign response prediction
Stars: ✭ 11 (+0%)
Mutual labels:  jupyter-notebook
Tensorflow Tutorial
Basics of Tensorflow
Stars: ✭ 10 (-9.09%)
Mutual labels:  jupyter-notebook
Awesome Google Colab
Google Colaboratory Notebooks and Repositories (by @firmai)
Stars: ✭ 863 (+7745.45%)
Mutual labels:  jupyter-notebook
Deeplearningcameraapp
Deep Learning Capstone Project. Live camera app that can interpret number strings in real-world images.
Stars: ✭ 10 (-9.09%)
Mutual labels:  jupyter-notebook
Cs224u
Code for Stanford CS224u
Stars: ✭ 857 (+7690.91%)
Mutual labels:  jupyter-notebook
Pandas Tutorials
How To's and Tutorials in Jupyter Notebook
Stars: ✭ 11 (+0%)
Mutual labels:  jupyter-notebook
Data Science On Gcp
Source code accompanying book: Data Science on the Google Cloud Platform, Valliappa Lakshmanan, O'Reilly 2017
Stars: ✭ 864 (+7754.55%)
Mutual labels:  jupyter-notebook
Optimization Cookbook
Stars: ✭ 11 (+0%)
Mutual labels:  jupyter-notebook

Classifying boxes using TensorFlow

This is a simple example of how to build a convolutional neural network (CNN) with TensorFlow. It extends existing MNIST convnet examples with TensorFlow input queues for reading training and validation data in common image formats like JPEG. You should be able to easily change the sample code and text files to use your own training data.

Link to YouTube Video

The sample training data and code classifies images of a toy box into four states:

  1. Upright (box is upright)
  2. Tilted (box is tilted on its side)
  3. Open (box is upright and open)
  4. Spilled (box is tilted on it's side, open with contents spilled)

115 images for each class is used to train the model.

tf_convnet_test.ipynb is a Jupyter notebook which runs through the training example.

The main code samples are:

tf_convnet_test.py reads the training and validation data from train.txt and valid.txt, then builds and executes the TensorFlow graph. Run it with no arguments:

python tf_convnet_test.py

tf_convnet_export.py does all the above, and also exports the trained model. You'll need to install or build TensorFlow Serving to run this. Run it with no arguments:

python tf_convnet_export.py

tf_convnet_inference.cc serves the trained TensorFlow Serving. You'll need to install or build TensorFlow Serving to compile it. The code is slightly modified from the MNIST inference sample included with the TensorFlow SDK, most notably changing the shape of the input data and number of output classes. Run it by specifying the port and location of the exported model.

tf_convnet_inference --port=9000 location/to/model/dir/

web_server.py is a simple Flask application that takes images using a webcam and sends them to the inference server for classification. It has only been "tested" on Chrome. Run it with no arguments:

python web_server.py

I don't have a pattern for the box, but if you want to build your own, it is

  • 50x50x50mm
  • made of balsa wood
  • has white electrical tape on the sides to hold it together
  • has an articulating "lid"
  • filled coloured pom poms on the inside
  • marked on four sides with a "this side up" decal
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].