Add descriptions to your images with Azure Computer Vision

To recognize images in SharePoint Azure Computer Vision can be a great help. In this post an example.

What is Azure Computer vision

Azure Computer Vision can be used to recognize the content of images. Within the Azure platform, images can be processed and the Computer Vision services will give you text describing the image.

in my example today I will create a list of images in SharePoint, but the images could be stored anywhere.

Just imagine your security camera recognizing your family and the alarm going off when someone else approaches your property. Poor old milkman, delivering the milk to your door step.

Setup Azure Computer Vision

Before you can create a flow you will have to setup an Azure Computer Vision service in Azure.

To do this go to https://portal.azure.com and then create your Computer Vision setup

Azure Computer Vision service

This isn’t too complicated. Once your done. you will need to collect a key and an endpoint within the Keys and Endpoints section found in the left hand menu.

Use Azure Computer Vision to name your images with Power Automate Microsoft Azure, Microsoft Power Automate Azure Computer Vision service

And that is it. time to setup SharePoint.

Setup your library in SharePoint

Within SharePoint I created an Image library and called this list fruit. For me this looks like this. Are you getting hungry yet?

Use Azure Computer Vision to name your images with Power Automate Microsoft Azure, Microsoft Power Automate Fruit list

My files are called 1,2,3,4,5,6.jpg and that of course isn’t very helpful. I want to give these files all some metadata that describes the images.

Create a flow with Azure Computer Vision

The first part of the flow is reading the images.

Use Azure Computer Vision to name your images with Power Automate Microsoft Azure, Microsoft Power Automate image 83

I’m using the Get Files to read my images and then when I have all the images I will collect the image’s content.

Use Azure Computer Vision to name your images with Power Automate Microsoft Azure, Microsoft Power Automate image 84

In the above Apply to each we will step through all the images supplied by the Get files action.

And now we get to the image recognition part of the flow.

Using the Describe Image Content we can now analyse the image that we retrieved from each file.

Use Azure Computer Vision to name your images with Power Automate Microsoft Azure, Microsoft Power Automate image 85

Then the flow can be completed and the title property is set on each of the files.

Use Azure Computer Vision to name your images with Power Automate Microsoft Azure, Microsoft Power Automate A flow that names images using Computer Vision

Once this flow has run the title of my red apple image is changed to “an apple sitting on a table”

Use Azure Computer Vision to name your images with Power Automate Microsoft Azure, Microsoft Power Automate An apple with a description

As all the fruit is being processed, the other images are also labeled with their descriptions.

Use Azure Computer Vision to name your images with Power Automate Microsoft Azure, Microsoft Power Automate All images given a title

Avatar for Pieter Veenstra

By Pieter Veenstra

Business Applications Microsoft MVP working as a Principal Architect at HybrIT Services Ltd. You can contact me using contact@sharepains.com

Leave a Reply

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

Discover more from SharePains by Microsoft MVP Pieter Veenstra

Subscribe now to keep reading and get access to the full archive.

Continue Reading

%d