Top Banner
AI-enabled IoT with Node-RED and TensorFlow.js Paul Van Eck @pvaneckw va barbosa @vabarbosa
15

AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context

Jun 19, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context

AI-enabled IoT with Node-RED and TensorFlow.js—Paul Van Eck@pvaneckw

va barbosa@vabarbosa

Page 2: AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context

IoT Challenges

Different scaleVariety of edge devices

Quantity of edge devices

Edge devices restrictions

Page 3: AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context

Node-RED is an open source flow-basedprogramming toolwiring together IoT devices

https://nodered.org/

Page 4: AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context

TensorFlow.js is an open source library to train and deploymachine learning models with JavaScript

https://www.tensorflow.org/js

Page 5: AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context

ML to IoT with ease

– Intuitive visual programming model

– Lower barrier to entry

Privacy

– Data security

– Data does not leave device

Connectivity

– Offline, unreliable

– Low bandwidth

Why add TensorFlow.js to Node-RED?

Page 6: AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context

TensorFlow.jsNode-RED nodes

Page 7: AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context

flows.nodered.org / GitHub

node-red-contrib-tf-model

custom Node-RED node to retrieve/execute a Tensorflowmodel

node-red-contrib-tf-function

Node-RED custom node which mimic the original function node but provide tf in the global context

node-red-contrib-bert-tokenizer

Node-RED module to implement bert-tokenizer

node-red-contrib-post-object-detection

Node-RED module to handle prediction results of an object detection model.

Node-RED TFJS Object Detection

Node-RED module for TensorFlow.js object detection model

Node-RED for ML with TFJS

Node-RED nodes with TensorFlow.js to enable machine learning in Node-RED

… and more

Page 8: AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context

Creating your own custom TFJS nodes

Page 9: AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context

Components of a Node-RED module

JavaScriptpackage.json

HTML

JavaScript

What a node does

Node's properties, edit dialog, help text

Package as npm module

https://medium.com/codait/a-low-code-approach-to-incorporating-machine-learning-into-your-iot-device-24f3f2a70717

Page 10: AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context

Example Flow & Use Case

Page 11: AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context

Worker safety withhard hat detection

Photo by CEphoto, Uwe Aranas or alternatively © CEphoto, Uwe Aranas

Page 12: AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context

Node-RED

– Low-code platform for IoT

– Flexible and extensible– Visual programming

TensorFlow.js

– Machine Learning in JavaScript

– Data Privacy– Network connectivity

Node-RED + TensorFlow.js

– Easy packaging of TF.js models for Node-RED usage– Rapid building of AI-enabled IoT applications– Leverage TensorFlow.js, Node-RED, Node.js, and NPM

communities– Democratize AI

Recap

Page 13: AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context

Links

https://js.tensorflow.orghttps://nodered.org

https://github.com/yhwang/node-red-contrib-tf-modelhttps://github.com/vabarbosa/tfjs-node-redhttps://github.com/IBM/node-red-tensorflowjs

https://medium.com/codait/a-low-code-approach-to-incorporating-machine-learning-into-your-iot-device-24f3f2a70717

Page 14: AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context

Thank you

Paul Van Eck | IBM Cognitive OpenTechtwitter.com/@pvaneckwgithub.com/pvaneck

va barbosa | IBM CODAITtwitter.com/@vabarbosagithub.com/vabarbosa

Page 15: AI-enabled IoT with Node-RED and TensorFlow€¦ · AI-enabled IoT with Node-RED and ... Node-RED custom node which mimic the original function node but provide tfin the global context