0

While following the tutorial here: https://learn.microsoft.com/en-us/azure/cognitive-services/face/tutorials/faceapiincsharptutorial

My call to

IList<DetectedFace> faceList = await faceClient.Face.DetectWithStreamAsync(
                        imageFileStream, true, false, faceAttributes);

Is throwing an exception that says:

"Operation returned an invalid status code 'NotFound'"

I've checked the keys, endpoint but they seem fine. I and can't seem to figure out why the call is failing.

The error is vague, but I assume that "NotFound" means that no face was found in the picture. The picture does have a very obvious face in it, so it should be easily detected.

faceClient is instantiated at the top of the class as follows:

private readonly IFaceClient faceClient = new FaceClient( new ApiKeyServiceClientCredentials(subscriptionKey), new System.Net.Http.DelegatingHandler[] { });

Can anyone shed some light on what might cause this error?

catalyst
  • 1
  • 2

0 Answers0