node-red-contrib-cloud-annotations

0.0.2 • Public • Published

node-red-contrib-cloud-annotations

NPM version Dependencies Status

A Node-RED node for making predictions with Cloud Annotations models.

example

Install

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

npm install node-red-contrib-cloud-annotations

Usage

Feed the model an image and get a list of predictions.

Configuration

  • Model path: The path to the Cloud Annotations model.

Input

  • msg.payload: The payload can either be a string path to an image file or a buffer object holding the image bytes.

Output

  • msg.payload: A list of predictions.

The prediction array varies depending on the type of model loaded.

Object detection model example:

[{
  label: 'dog',
  bbox: [
    330.9269714355469, // x coordinate
    281.0324728488922, // y coordinate
    374.56329345703125, // width
    550.1768910884857 // height
  ],
  score: 0.92
},
{
  label: 'cat',
  bbox: [
    1168.9867401123047, // x coordinate
    431.68705701828003, // y coordinate
    412.3546600341797, // width
    522.2745037078857 // height
  ],
  score: 0.72
}]

Classification model example:

[
  { label: 'dog', score: 0.92 },
  { label: 'cat', score: 0.72 }
]

Readme

Keywords

Package Sidebar

Install

npm i node-red-contrib-cloud-annotations

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

831 kB

Total Files

10

Last publish

Collaborators

  • bourdakos1