[Azure]Face model doesn't work

LoaKang 5 Reputation points
2024-01-22T19:07:23.43+00:00

I can detecting faces but when finding similar faces, it has request error. key, locations, images were all set correctly. Even if i try few sec or min later, also has same error. How can i fix it?

Traceback (most recent call last):

  File "/Users/loa/Desktop/Code/azure-python/face_api.py", line 61, in <module>

    similar_faces = find_similar_faces(face_client, face_ID, list(map(lambda x: x.face_id, faces_2)))

                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/Users/loa/Desktop/Code/azure-python/face_api.py", line 39, in find_similar_faces

    return face_client.face.find_similar(face_id=face_ID, face_ids=face_IDs)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/Users/loa/anaconda3/envs/codezero/lib/python3.11/site-packages/azure/cognitiveservices/vision/face/operations/_face_operations.py", line 136, in find_similar

    raise models.APIErrorException(self._deserialize, response)

azure.cognitiveservices.vision.face.models._models_py3.APIErrorException: (InvalidRequest) Invalid request has been sent.
Azure AI Face
Azure AI Face

An Azure service that provides artificial intelligence algorithms that detect, recognize, and analyze human faces in images.


1 answer

Sort by: Newest
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    7 deleted comments

    Comments have been turned off. Learn more

Your answer

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