调用Microsoft.Azure.CognitiveServices.Vision.Face.FaceClient.DetectWithStreamAsync返回“操作返回了无效的状态码'NotFound'”

时间:2018-10-04 17:01:57

标签: c# face

遵循此处的教程:https://docs.microsoft.com/en-us/azure/cognitive-services/face/tutorials/faceapiincsharptutorial

我打给

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

正在抛出一个异常:

  

“操作返回了无效的状态码'NotFound'”

我已经检查了键,端点,但是它们看起来还不错。我也似乎无法弄清楚呼叫失败的原因。

该错误含糊不清,但我认为“未找到”表示在图片中未发现人脸。图片的确有非常明显的面孔,因此应该易于检测。

faceClient在类的顶部实例化如下:

私有只读IFaceClient faceClient = new FaceClient(             新的ApiKeyServiceClientCredentials(subscriptionKey),             新的System.Net.Http.DelegatingHandler [] {});

任何人都可以阐明可能导致此错误的原因吗?

0 个答案:

没有答案