Use the object detection model in Power Automate
Sign in to Power Automate.
Select My flows in the left pane, and then select New flow > Instant cloud flow.
Name your flow, select Manually trigger a flow under Choose how to trigger this flow, and then select Create.
Expand Manually trigger a flow, and then select +Add an input > File as the input type.
Replace File Content with My image (also known as the title).
Select + New step > AI Builder, and then select Detect and count objects in images in the list of actions.
Select the object detection model you want to use.
In the Image input, select My Image from the Dynamic content list:
To retrieve the name of the detected object or objects on the image:
- Select New step.
- Search for the successive action you want your flow to perform, for example add a row into an Excel table or send an email.
- Select any of the successive actions' inputs, and then select Detected object name in the Dynamic content list.
Congratulations! You've created a flow that uses an object detection AI Builder model. Select Save on the top right, and then select Test to try out your flow.
Example object detection flow
The following example shows the creation of a flow that is triggered by an image. This flow counts the number of green tea bottles in the image.
To learn more about the triggers and actions you can use, see the Power Automate documentation.
|AI Model||Yes||model||Object detection model to use for analysis||Trained and published object detection models|
|Image||Yes||file||Image to process|
|Detected object name||string||The detected object name||Among the tags defined at model creation|
|Detected object ID||string||The detected object ID|
|Confidence score||float||How confident the model is in its prediction||Value in the range of 0 to 1. Values close to 1 indicate greater confidence that the extracted value is accurate|
|Coordinates height||float||Coordinates left of the object|
|Coordinates left||float||Coordinates left of the object|
|Coordinates top||float||Coordinates top of the object|
|Coordinates width||float||Coordinates width of the object|