node-red-contrib-teachable-machine 1.4.1

Simplifies integration with Teachable Machine models from Google

npm install node-red-contrib-teachable-machine

node-red-contrib-teachable-machine

Node-RED node pre-commit.ci status CI npm latest release npm total downloads Package Quality JavaScript Style Guide Code Climate maintainability GitHub license donate PayPal

A Node-RED node based in tensorflow.js that enables to run custom image classification trained models using Teachable Machine tool. All notable changes to this project will be documented in the CHANGELOG.md file.

Install

You have two options to install the node.

  • Use Manage palette option in Node-RED Menu (recommended) manage_pallete

  • Run the following command in your Node-RED user directory - typically ~/.node-red

    npm install node-red-contrib-teachable-machine
    

Note: If you run the command you will need to restart Node-RED after installation. If installation goes wrong please open a new issue.

Node usage

Step 1

Go to Teachable Machine and follow the steps to train your custom classification model. Once trained click on the Export Model button.

teachable_machine_export

Step 2

Select Tensorflow.js format and upload your trained model (for free). Once it is uploaded, copy the generated URL.

use_teachable_machine

Once the URL is generated it will show the stored files.

model_files

Step 3

Online Mode

Select Online Mode and paste the saved URL in the node configuration. That URL hosts all the information to load your trained model. Make sure you copy all the given URL including the https://... and the / in the end.

online-config

Local Mode

Download all three files from the generated URL and save them locally in a folder maintaning the original filenames.

Select Local Mode and write down the absolute path of the folder that contain the three downloaded files in the node configuration. Make sure it ends with a / noting it is a folder.

local-config

Step 4

In Node-RED send a buffered image (jpeg or png) to the node. Check the example in the Import section.

Node Status Information

Shape

  • dot: node is idle
  • ring: node is working

Color

  • 🟩 green: model is available
  • 🟨 yellow: preparing model
  • 🟥 red: node error

Requirements

  • Node-RED v2.1.0+
  • Node.js v16.20.0+

Warning: Only the official Docker nodered/node-red image based on Debian v3.1.0+ image works since it needs ld-linux-x86-64.so.2. This necessary library is not present in the default Alpine Docker image version.

Node Info

Version: 1.4.1
Updated 1 year, 3 months ago
License: Apache-2.0
Rating: 5.0 8

Categories

Actions

Rate:

Downloads

47 in the last week

Nodes

  • teachable machine

Keywords

  • node-red
  • tensorflow
  • tensorflowjs
  • classification
  • teachable machine
  • google

Maintainers