Scale an Azure Percept DK configuration to multiple devices

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.

Azure Percept DK is an easy-to-use platform for creating edge AI solutions. It combines different Azure services (e.g., Azure Cognitive Services and Machine Learning) to deliver real-time audio and vision insights. The device comes pre-built with Azure Percept Studio, a service which makes deploying on this device even easier to do. To find out more about the Azure Percept DK visit this page.


Previously, we successfully managed deploying a custom azure stream analytics edge module on the Azure Percept DK. Now, our question was – how do we replicate the modules with their configuration on multiple Azure Percept DK at large scale? One way is to deploy and configure each module on devices separately - but this would be very time consuming. The answer to this is: Azure IoT Edge automatic deployments.


Azure IoT Edge provides two different methods to configure modules for IoT Edge devices. The method we are outlining today is to create a deployment manifest and then apply the configuration to a particular device by its name. The configuration can be applied on multiple devices at the same time by using device twin tags.


All you need to do is to provide the device connection string (from IoT Hub) to your end Azure Percept DK user. You can go through the Azure Percept DK setup and use this connection string to get connected to Azure IoT hub. The reference architecture containing the AzureEye, StreamAnalytics, HostIp, ImageCapturing and WebStream modules is showed in the diagram below:




We can talk hours about the features of Azure Percept DK, but now it’s time to get things working. In order to get started, log onto the Azure portal, navigate to your IoT Hub resource and follow the below instructions:


  1. In IoT Hub main page, under Automatic Device Management section click on ‘IoT Edge’
  2. Select ‘IoT Edge Deployments’ tab and click on ‘Add Deployment’
  3. Specify the deployment name and add labels if needed



4. Go on the ‘modules’ tab

5. Under IoT Edge Modules click on add and select ‘IoT Edge Module’. Give it a name, in this case: azureeyemodule and paste the Image URI under ‘Module Settings’ tab (links available at the end of the document)



6. Select ‘Container Create Option’ tab and paste the Docker container configuration




7. Select the ‘Module Twin Settings’ tab and paste the module twin desired properties. Set the property to “properties.desired”


8. Save the newly created IoT Edge Module by selecting the ‘add’ button


9. If deploying ASA Edge follow this step, otherwise skip this step: Add the Azure Stream Analytics Edge module by selecting the ‘Azure Stream Analytics’ Module option, select the Edge Job you want to deploy and click ‘Save’




10. Add the ImageCapturingModule by following the same steps shown for azureyeemodule




11. Select the ‘Environment Variables’ tab and specify 3 variables as shown in the screenshot below


12. Press on ‘Add’ to save the module


13. Add the HostIpModule by following the same steps as for the ImageCapturingModule




14. Select ‘Container Create Option’ tab and paste the Docker container configuration




15. Click ‘Add’


16. Add the WebStreamModule by following the same steps as shown above









17. Click ‘Add’ to save the module


18. Select the ‘Routes’ tab to specify how the device will route the data (we are specifying two routes – one route from azureeyemodule to the ASA job and the second route from ASA job to IoT Hub)



19. Optionally, you can specify some metrics to monitor IoT Edge deployments. In our case we have specified one metric to state if the device has been successfully configured




20. Click on ‘Target Devices’ tab and specify the priority number for the deployment (higher values indicate higher priority) and the target condition by specifying the device/s you want to apply the deployment manifest on (in our case deviceid = ‘Percept_Excalibur’). You can click on view devices to check if the target condition is correct.



21. Select ‘Review + create’ tab – if the validation passed, you are ready to create the deployment manifest by clicking on the create button.




22. Now you can get the IoT Edge Device Connection string, using Azure IoT Hub, and pass it on to the Azure Percept DK user. The user will need to configure the Azure Percept DK to use the connection string


23. You should see the newly created deployment listed in ‘IoT Edge Deployments’ tab – wait a few minutes for the deployment manifest to be applied to the target device





24. If successfully, the system metrics will report success




25. The modules should be deployed on the device up and running showing no errors







Learn how to create automatic deployments on Azure Percept DK:


Azureeyemodule settings

IoT Edge Module Name: azureeyemodule

Image URI:


Container Create Options:



{ "ExposedPorts": { "8554/tcp": {} }, "HostConfig": { "Binds": [ "/dev/bus/usb:/dev/bus/usb" ], "DeviceCgroupRules": [ "c 189:* rmw" ], "PortBindings": { "8554/tcp": [ { "HostPort": "8554" } ] } } }




Module Twin Settings:



{ "ExposedPorts": { "8554/tcp": {} }, "HostConfig": { "Binds": [ "/dev/bus/usb:/dev/bus/usb" ], "DeviceCgroupRules": [ "c 189:* rmw" ], "PortBindings": { "8554/tcp": [ { "HostPort": "8554" } ] } } }





IoT Edge Module Name: ImageCapturingModule

Image URI:

Environment Variables:

RTSP_IP – azureeyemodule

RTSP_PORT – 8554




IoT Edge Module Name: HostIpModule

Image URI:


Container Create Options:



{ "NetworkingConfig": { "EndpointsConfig": { "host": {} } }, "HostConfig": { "NetworkMode": "host" } }





IoT Edge Module Name: WebStreamModule

Image URI:

Environment Variables:

RTSP_IP – azureeyemodule

RTSP_PORT – 8554


Container Create Options:



{ "ExposedPorts": { "2999/tcp": {}, "3000/tcp": {}, "3002/tcp": {}, "3004/tcp": {}, "3006/tcp": {}, "3008/tcp": {}, "3010/tcp": {} }, "HostConfig": { "PortBindings": { "2999/tcp": [ { "HostPort": "2999" } ], "3000/tcp": [ { "HostPort": "3000" } ], "3002/tcp": [ { "HostPort": "3002" } ], "3004/tcp": [ { "HostPort": "3004" } ], "3006/tcp": [ { "HostPort": "3006" } ], "3008/tcp": [ { "HostPort": "3008" } ], "3010/tcp": [ { "HostPort": "3010" } ] } } }





Now Try out Azure Percept yourself


To get started on building your own solutions with Azure Percept, it’s easy to purchase a developer kit to try out pilot projects before deciding to deploy at scale. You also can visit the Azure Percept YouTube channel for videos about getting started with the developer kit.

REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.