1

I am calling Azure Face API using its python sdk. I am getting the following response :-

enter image description here

I have also checked Monetring in Azure portal it shows this:-

enter image description here

When i check it in the Azure price calculator it shows:-

enter image description here

I am using Azure Cognitive Services for Computer Vision, everything works fine, but don't know why only Face API throws exception.
I have also tried similar images with the same code, it works fine with my other account's credentials but still I am facing this error.

Thanks

Shubham Tomar
  • 166
  • 1
  • 9
  • Does this answer your question? [Azure Face Service Invalid Request API Error On Running Quickstart Code](https://stackoverflow.com/questions/72776677/azure-face-service-invalid-request-api-error-on-running-quickstart-code) – Ecstasy Jul 07 '22 at 06:57
  • @DeepDave-MT No, this is not a solution – Shubham Tomar Jul 07 '22 at 07:00
  • Demo and Quikstart code works but only throws exception in Face API. Becuse i can use the same code with other credentials. But unable to do with newly created Face API credentials. – Shubham Tomar Jul 07 '22 at 07:02
  • @DeepDave-MT I am not using Face identification or Face verification, it requires special permission, i am using face_attributes. Please read the question carefully. – Shubham Tomar Jul 07 '22 at 07:07

1 Answers1

2

I think the issue you are facing is due to the latest updates of Face API product, which is detailed in this blog post.

In a few words, some features have been disabled.

In particular:

In another change, we will retire facial analysis capabilities that purport to infer emotional states and identity attributes such as gender, age, smile, facial hair, hair, and makeup. We collaborated with internal and external researchers to understand the limitations and potential benefits of this technology and navigate the tradeoffs. In the case of emotion classification specifically, these efforts raised important questions about privacy, the lack of consensus on a definition of “emotions,” and the inability to generalize the linkage between facial expression and emotional state across use cases, regions, and demographics. API access to capabilities that predict sensitive attributes also opens up a wide range of ways they can be misused—including subjecting people to stereotyping, discrimination, or unfair denial of services.

To mitigate these risks, we have opted to not support a general-purpose system in the Face API that purports to infer emotional states, gender, age, smile, facial hair, hair, and makeup. Detection of these attributes will no longer be available to new customers beginning June 21, 2022, and existing customers have until June 30, 2023, to discontinue use of these attributes before they are retired.

In your code, you are asking for some of these attributes (gender & age) so you should remove those attributes and try again.

Nicolas R
  • 13,812
  • 2
  • 28
  • 57
  • Hi Dear, I am still facing the same issue even without face attributes `detected_faces = face_client.face.detect_with_stream(byte_io ,detection_model='detection_01')` – Shubham Tomar Jul 08 '22 at 05:40
  • Sorry but it's impossible to go deeper without more details. Can you check the APIErrorException: if it has a body, it might include more details about the incorrect request – Nicolas R Jul 11 '22 at 11:05