Cannot use Face API feature "FaceAttributeType.smile or FaceAttributesType.emotion"

Lavan Mahes 20 Reputation points
2024-09-26T02:42:36.7233333+00:00

Hi Team,

I am trying to identify whether a person in an image is happy or angry. I was using the mslearn-ai-vision GitHub repository and attempting to use the Face API to detect the emotion features of the person in the image. However, it throws an error: "Invalid request has been sent." When I limit the features to the ones below, everything works fine.

Python:
features = [FaceAttributeType.occlusion,

          FaceAttributeType.blur,

          FaceAttributeType.glasses

          ]

Is there any limitation applied to the Face API for detecting emotions? If so, is there an alternative way to perform semantic analysis on a person’s emotions in the image?

Azure Face
Azure Face
An Azure service that provides artificial intelligence algorithms that detect, recognize, and analyze human faces in images.
172 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.