All Projects → SashiDo → teachablemachine-node

SashiDo / teachablemachine-node

Licence: Apache-2.0 license
Using Teachable Machine Models in Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to teachablemachine-node

frontend-park
哈喽大家好~我是荣顶!这是一个有趣的前端趣味知识公园~该项目是我平时捣鼓前端相关技术的一些案例集合。
Stars: ✭ 66 (+46.67%)
Mutual labels:  tensorflowjs
bodymoji
Draws an emoji on your face! Powered by Nuxt.js, Tensorflow.js and Posenet
Stars: ✭ 21 (-53.33%)
Mutual labels:  tensorflowjs
time-series-forecasting-tensorflowjs
Pull stock prices from online API and perform predictions using Long Short Term Memory (LSTM) with TensorFlow.js framework
Stars: ✭ 96 (+113.33%)
Mutual labels:  tensorflowjs
incogly
Incogly is a video conferencing app aimed to remove any implicit bias in an interview and easing the process of remote collaboration.
Stars: ✭ 24 (-46.67%)
Mutual labels:  tensorflowjs
splat
Motion-controlled Fruit Ninja clone using Three.js & Tensorflow.js
Stars: ✭ 84 (+86.67%)
Mutual labels:  tensorflowjs
pytorch2keras
PyTorch to Keras model convertor
Stars: ✭ 788 (+1651.11%)
Mutual labels:  tensorflowjs
CarDrivingResNet
🚗 Browser game where a vehicle is driven through the camera using the ResNet model (Residual Network) to estimate the position of the hands.
Stars: ✭ 19 (-57.78%)
Mutual labels:  tensorflowjs
Face Api.js
JavaScript API for face detection and face recognition in the browser and nodejs with tensorflow.js
Stars: ✭ 13,258 (+29362.22%)
Mutual labels:  tensorflowjs
tensorflowjs-webcam-transfer-learning
Tensorflowjs Webcam Transfer Learning
Stars: ✭ 49 (+8.89%)
Mutual labels:  tensorflowjs
doctr-tfjs-demo
Javascript demo of docTR, powered by TensorFlowJS
Stars: ✭ 21 (-53.33%)
Mutual labels:  tensorflowjs
color-pop
🌈 Automatic Color Pop effect on any image inspired by Google Photos
Stars: ✭ 21 (-53.33%)
Mutual labels:  tensorflowjs
tictactoe-ai-tfjs
Train your own TensorFlow.js Tic Tac Toe
Stars: ✭ 45 (+0%)
Mutual labels:  tensorflowjs
food-vision-mobile-tensorflowjs
Food Vision project for mobile devices using TensorFlowJS
Stars: ✭ 19 (-57.78%)
Mutual labels:  tensorflowjs
Face-Mask
Real time webcam face detection, protect yourself from COVID19 with a virtual mask
Stars: ✭ 64 (+42.22%)
Mutual labels:  tensorflowjs
angular-tensorflowjs-example
Using TensorflowJS detection models in Angular
Stars: ✭ 24 (-46.67%)
Mutual labels:  tensorflowjs
dark-mode-clap-extension
Chrome extension to toggle dark mode on Netlify by clapping hands 👏
Stars: ✭ 82 (+82.22%)
Mutual labels:  tensorflowjs
lyrics-generator
Generating lyrics with a recurrent neural network
Stars: ✭ 36 (-20%)
Mutual labels:  tensorflowjs
handwritten-digit-recognition-tensorflowjs
In-Browser Digit recognition with Tensorflow.js and React using Mnist dataset
Stars: ✭ 40 (-11.11%)
Mutual labels:  tensorflowjs
Nsfwjs
NSFW detection on the client-side via TensorFlow.js
Stars: ✭ 5,223 (+11506.67%)
Mutual labels:  tensorflowjs
emotion-detector.js
👹 Emotion recognition in Node.js
Stars: ✭ 30 (-33.33%)
Mutual labels:  tensorflowjs

Teachable Machine Node

teachable-machine-cover

About

Teachable Machine Node empowers you to load any image classification model trained with Google's Teachable Machine tool in a Node.Js project.

Teachable Machine makes AI easy for everyone, by offering a fast and fun way to train a real TensorFlow.js Machine Learning Models without any coding required. You can train the computer to recognize images, sounds, & poses, using your camera or your own dataset. Check The Awesome Teachable Machine List full of useful resources and amazing projects to gain some cool ideas.

For now, Teachable Machine Node holds support only for image models, but we won't stop here. Check out the Roadmap of what comes next!

Install

  • Install using npm
npm install @sashido/teachablemachine-node
  • Install using yarn
yarn add @sashido/teachablemachine-node

Usage

Create you own Model with Teachable Machine

  1. Gathering samples is the fundamental first step to your Teachable Machine Model. Use your camera to collect data or upload some preselected images.

  2. Train your Teachable Machine Image Model.

Check the Advanced option for further insights on the model performance and accuracy. Once certain it returns valid results, hit the Export option.

  1. Make sure that you select Tensorflow.js format when exporting. That way your model will be uploaded (for free) and you will receive an access URL.

  1. Pass the URL to the teachablemachine-node to load the model. Next, let it have the image and call classify to get the predictions. You can pass the image URL or deliver it in base 64. It's up to your preference.

Play around with our pre-trained 'Is It A Dog?' model.

SashiDo's team is full of notorious animal lovers and no wonder the sample model was trained to recognize dog pics from other images. 😊 We've collected a dataset of more than 2000 images of dogs, cats, horses, other animals, people and everyday objects and uploaded them into two different classes with Teachable Machine.

A big shoutout to Unsplash.com as a great platform for free photos. Check it out in case you're just starting and do not have raw data yet.

You can load our Is_It_A_Dog model using this URL and following the example below:

https://teachablemachine.withgoogle.com/models/r6BBk-hiN/

Examples

NodeJS

Here's a quick example of how to load the model in your project.

const TeachableMachine = require("@sashido/teachablemachine-node");

const model = new TeachableMachine({
  modelUrl: "https://teachablemachine.withgoogle.com/models/r6BBk-hiN/"
});

model.classify({
  imageUrl: "https://media-blog.sashido.io/content/images/2020/09/SashiDo_Dog.jpg",
}).then((predictions) => {
  console.log("Predictions:", predictions);
}).catch((e) => {
  console.log("ERROR", e);
});

ExpressJS

And the alternative for all Express fans.

const express = require("express");
const TeachableMachine = require("@sashido/teachablemachine-node");

const model = new TeachableMachine({
  modelUrl: "https://teachablemachine.withgoogle.com/models/r6BBk-hiN/"
});

const app = express();
const port = 3000;

app.get("/image/classify", async (req, res) => {
  const { url } = req.query;

  return model.classify({
    imageUrl: url,
  }).then((predictions) => {
    console.log(predictions);
    return res.json(predictions);
  }).catch((e) => {
    console.error(e);
    res.status(500).send("Something went wrong!")
  });
});

app.listen(port, () => {
  console.log(`Example app listening at http://localhost:${port}`);
});

Roadmap

In the long run, we will add more options, so you can train and load all kinds of Teachable Machine Models.

  1. Add support for Pose Models.

  2. Add support for Audio Models.

  3. Add support for Gifs.

  4. Add support for Videos.

We would love to have your opinion which's the one you would like to see supported first. Don't be shy and drop us a line at [email protected].

Contribute

Contributors of any kind are welcome. Share your awesome improvements in a pull request and join our mission to make Machine Learning more affordable & accessible!

License

Copyright © 2020, CloudStrap AD. See LICENSE for further details.

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].