Automatic BIB detection from photos using Text Recognition Model of Power Automate AI Builder

Extracting text from images is possible only with OCR (Optical Character Recognition). With the launch of Power Automate AI Builder now it is easy to automate extraction of text from images.

In the following example, we will remove Bib number from runner’s photos using text recognition model.

I have implemented it on www.scoutfoto.com wherein I have removed Bib number from runner’s photos and stored in database which provide the facility for runner to search their photo by using Bib Number.

In this example we have uploaded all the photos on web site and their details stored in SQL database. Let’s start by fetching all the data from SQL.

Now create a new flow in Power Automate and add manual trigger. You can trigger it based on event as I have taken manual trigger exhibited in the example.

manually trigger flow

Then get all the photo details from SQL table.

Get Rows

We can extract one by one bib number from photo creating data loop for each action.

apply to each

Then for each action, add HTTP action to get photo from web. Use specify photo URL to URI field to fetch the photo.

add HTTP Action

Now add Predict action from Common Data Service connector as below and select “TextRecognition model” from the drop-down list. Enter the output of HTTP action mention in previous step in the image field.

Predict

The above steps of Predict will extract text from image and will return to output for next action. The outcome from Predict model will be in form of Json Array so we need to loop through the result.

If you run the flow and see the response of Predict action, you will see the below output

response of predict action

I have then stored the result as a variable and for each action respectively and updated in SQL table simultaneously:

Execute SQL Query

So, now you can see that how easy it is to extract text from image using Power Automate AI Builder. You can automate the processes or can schedule it as well.

Related Posts