All application logic and services used on edge devices are encapsulated in Docker containers. To configure these containers on Viso Suite, the visual programming interface called Viso Builder is used.
General nodes that are provided by Node-RED, other 3rd parties or developed by yourself: Node-RED community and freely available 3rd party nodes can be used on Viso Suite without any modification. If functionality is required that is not available, you can develop Node-RED nodes for any purpose by following this guide and import them to Viso Suite. If the tasks required by your computer vision application can be done on the node directly, then this is the best approach!
Complex nodes e.g. to perform computer vision tasks: If your use case is more complicated and difficult to do via a single node, you may want to develop a module that uses one or more docker containers. In this case, your Node-RED node is used to define and configure the parameters of your containers.
This tutorial is for the complex nodes and assumes knowledge of the following:
[
{
'disabled': False,
'id': '47ed5c46.b85244',
'info': '',
'label': 'Flow 1',
'type': 'tab'
},
{
'id': '813f8d7f.be7c1',
'name': 'my person detector',
'type': 'person-detection',
'detection_threshold': 0.5,
'model_name': 'ssd_mobilenet_v1_coco_2018_01_28',
'wires': [['5c828fca.9dc5']],
'x': 570,
'y': 460,
'z': '47ed5c46.b85244'
},
{
'id': 'eb2a3e76.aeb2b',
'name': 'web camera',
'type': 'camera-feed',
'camera_source': '/dev/video0',
'camera_type': 'web',
'frame_height': 480,
'frame_rate': 30,
'frame_width': 640,
'wires': [['813f8d7f.be7c1']],
'x': 240,
'y': 300,
'z': '47ed5c46.b85244'
},
{
'active': True,
'complete': 'false',
'console': False,
'id': '5c828fca.9dc5',
'name': '',
'statusType': 'auto',
'statusVal': '',
'tosidebar': True,
'tostatus': False,
'type': 'debug',
'wires': [],
'x': 860,
'y': 320,
'z': '47ed5c46.b85244'
}
]
Find a node that is streaming video feeds to the person-detection node: As you could see in the above flow, our person-detection node is connected to a Camera Feed node which supplies the video frames from a camera. By reviewing the JSON configuration, we can easily figure out that Node-RED manages the connected nodes using the wires field. In other words, you can see the id of the person-detection node is in the wires field of the Caemra Feed node.
Grab the video frame from the Camera Feed node to perform Person Detection: All Viso Suite containers use Redis to transfer the video frames. Hence, the Camera Feed node reads the video frame from the camera and outputs the frame to redis_<VideoFeed Node ID>_<output number>. In our flow, the Camera Feed node has only one output, so the output redis key would be redis_eb2a3e76.aeb2b_0.
Once a module is imported, you need to link the container to this module. Prepare the full URI of your container on docker hub or AWS ECR, and navigate to the imported module to link the container to your node. A detailed guide can be found here.