简体   繁体   English

人脸验证认知服务

[英]Face verification cognitive services

We have a requirement where we are in need to implement face verification through cognitive services. 我们有一个需要通过认知服务实施面部验证的要求。 I have been following below mentioned link. 我一直在下面提到的链接。

https://code.msdn.microsoft.com/windowsdesktop/Face-Verification-c1995f48 https://code.msdn.microsoft.com/windowsdesktop/Face-Verification-c1995f48

When execution comes at tGet.Wait(), system got hanged and never executed next line. 当执行到达tGet.Wait()时,系统挂起,并且从不执​​行下一行。 enter image description here 在此处输入图片说明

Depending on your application, you may have a synchronization context in play, and the current implementation of the client library will result in the deadlock you describe. 根据您的应用程序,您可能正在使用同步上下文,并且客户端库的当前实现将导致您描述的死锁。 Here's a pretty decent writeup on contexts. 这是有关上下文的相当不错的文章。

The workaround I would suggest is the following: 我建议的解决方法如下:

var task = Task.Run(async () => {
  try {
     await Clnt.GetPersonGroupAsync(groupId);
  } catch {
     await Clnt.CreatePersonGroupAsync(groupId, groupName);
  }
  // Use the PersonGroup
);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM