Giter VIP home page Giter VIP logo

tfjs-image-classifier-simple-html's Introduction

TFJS-Image-Classifier-Simple-HTML

Implementation of Tensorflow.js using a simple static webpage and a custom ML model. An overview of the project can be found on YouTube.

To run

Download the files, then from the command line, create a local server:

python -m http.server

Navigate to http://localhost:8000/index.html and http://localhost:8000/staticimage_index.html to see the resulting demos. For the webcam demo, you will be asked to share your webcam.

Overview

Data Source

For the creation of the model, I used the Microsoft Kaggle Cats and Dogs Dataset. This dataset contains 12,500 cat images and 12,500 dog images.

Model Creation

Only a subset of the data was used to create the model (1,500 of each class). Google Cloud's AutoML service was used to train the model then it was exported to files to be used in Tensorflow.js.

First Demo: Static Images

The first demo in index.html uses the exported model to make predictions about five images. This is a pretty standard demo that shows the power of Tensorflow.js to make predictions at the time of image load.

Demo #2: Webcam

In the second demo, located in webcam_index.js, uses the webcam to make predictions. This demo is only useful if you can point the camera to a nearby cat or dog. However, this shows how you could make continuous predictions using Tensorflow.js using the webcam as an edge device.

tfjs-image-classifier-simple-html's People

Contributors

mcgovey avatar

Stargazers

Prachurya Nath avatar

Watchers

James Cloos 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.