Azure AI Vision – Image Analysis – People Detection in Optimizely CMS

This article will explore the identification of people associated with an image which is being uploaded in Optimizely CMS.

Azure AI services for Vision, powered by Microsoft’s Florence large foundation model, offer a range of features for image analysis and advanced customisation. Specifically, the people detection feature, a key component of this service, returns the bounding box coordinates of each identified person, along with a confidence score. This feature has the potential to enhance data enrichment and image-related capabilities.

Another practical application is to enforce compliance with privacy laws by preventing content editors from uploading images of individuals to Optimizely CMS. This can be accomplished by introducing a boolean property in the CMS to manage the uploading of images depicting people.

The image shown above , will be used for the people detection process.

Below is a screenshot of a code snippet used for the people detection process.

Response from the API

Image Analysis- People Detection Operation has finished :
Image height = 1366
Image width = 2048
Model version = 2023-02-01-preview
People Detected Count = 24

When the people detection process has finished, this will return a summary of the number of people detected within a image. An example of this is shown above. In this demonstration, the people detection feature, detected 24 people.

If the option to upload images of people has not been enabled, the image will be prevented from being added to the CMS and an error message will be displayed. A video demonstration illustrating this process is provided below.

If the boolean property has been selected, the Image’s people field will be automatically filled with the number of people detected from the feature. A screenshot showing this is provided below.