Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
.babelrc
README.md Fix the local development steps for KNN classifier. (#49) Jul 23, 2018
camera.js Remove postinstall script from models that we publish on npm (#47) Jul 19, 2018
index.html
package.json
yarn.lock

README.md

KNN Image Classifier Demo

Contents

Demo: Camera

The camera demo shows how to create a custom classifier with 3 classes that can be trained in realtime using a webcamera. Hold down the train button to add samples to the classifier, and then let it predict which of the 3 classes that is closest.

Setup

cd into the demos folder:

cd knn-classifier/demos

Install dependencies and prepare the build directory:

yarn

To watch files for changes, and launch a dev server:

yarn watch

If you are developing the classifier locally, and want to test the changes in the demos

cd into the knn-classifier/ folder:

cd knn-classifier

Install dependencies:

yarn

Publish knn-classifier locally:

yarn publish-local

cd into this directory, knn-classifier/demos and install dependencies:

cd demos
yarn

Link the package published from the publish step above:

yarn link-local

Start the dev demo server:

yarn watch