https://github.com/cloud-annotations/node-red-contrib-cloud-annotations
Node-RED nodes for making predictions with Cloud Annotations models
https://github.com/cloud-annotations/node-red-contrib-cloud-annotations
Last synced: 2 months ago
JSON representation
Node-RED nodes for making predictions with Cloud Annotations models
- Host: GitHub
- URL: https://github.com/cloud-annotations/node-red-contrib-cloud-annotations
- Owner: cloud-annotations
- License: mit
- Created: 2020-07-23T01:22:45.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-23T02:08:04.000Z (almost 5 years ago)
- Last Synced: 2025-01-25T18:17:29.150Z (5 months ago)
- Language: HTML
- Size: 642 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-red-contrib-cloud-annotations
[](http://www.npmjs.org/package/node-red-contrib-cloud-annotations)
[](https://david-dm.org/cloud-annotations/node-red-contrib-cloud-annotations)A [Node-RED](http://nodered.org) node for making predictions with Cloud Annotations models.

## 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:
```js
[{
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:
```js
[
{ label: 'dog', score: 0.92 },
{ label: 'cat', score: 0.72 }
]
```