Giter VIP home page Giter VIP logo

img_rec_tf_ml_demo's Introduction

Image Recognition Using TensorFlow Machine Learning Demo

Simple Demonstration to Train a Machine Learning Model to recognize Apples from Bananas

Installation (Tested on Ubuntu 18.04 - 8GB Memory - 4 core cpu VM):

git clone https://github.com/chrisjd20/img_rec_tf_ml_demo.git
cd img_rec_tf_ml_demo
sudo apt install python3 python3-pip -y
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install --upgrade setuptools
sudo python3 -m pip install --upgrade tensorflow==1.15
sudo python3 -m pip install tensorflow_hub              #this one may or may not be needed in order to run

Training a TensowFlow ML Model Based on Images in ./training_images/ Folder ( tested on PNG files only ):

python3 retrain.py --image_dir ./training_images/

retrain.py is a slightly modified version of https://raw.githubusercontent.com/tensorflow/hub/master/examples/image_retraining/retrain.py

This will create two files we will be using at:

  1. /tmp/retrain_tmp/output_graph.pb - Trained Machine Learning Model
  2. /tmp/retrain_tmp/output_labels.txt - Labels for Images

Predicting Images in the unknown_images folder based on our trained Model:

chmod 755 predict_images_using_trained_model.py
./predict_images_using_trained_model.py

Remove Temp Cache Files Between Different Retrains

rm -rf /tmp/retrain_tmp /tmp/tfhub_modules

img_rec_tf_ml_demo's People

Contributors

chrisjd20 avatar

Stargazers

Captain avatar  avatar Alice  Villar avatar  avatar  avatar clayha avatar zeroes avatar Raph Suttiyotin avatar Aris L. avatar Johan Guldmyr avatar Flo avatar  avatar Mark avatar Salaheldinaz avatar Travis Lowe avatar  avatar Brad Priller avatar xct avatar Daniel Roberson avatar Brad White avatar Wim avatar Justin Dubs avatar  avatar

Watchers

evandrix avatar James Cloos avatar  avatar  avatar

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.