关于Python的MS Face API身份/分组的问题 [英] Question about MS Face API Identity/Grouping by Python

查看:64
本文介绍了关于Python的MS Face API身份/分组的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


您好,我正在尝试使用python创建基于MS API的图像分类器。
Hi, I am trying to create image classifier based on MS API by using python.

推荐答案

您好

感谢您使用Face服务。

Thank you for using Face services.

对于Q1,实际上,"Anna","Bill"等等。和"克莱尔"是三个人而不是团体。每个人可能有不止一个面孔。因此,如果您需要创建此人,只需调用人员 - 创建一个人  API
来创建他们,然后调用
  Person - 添加Person Face API以为它们添加面。这两个API的调用就像创建人员组的API一样。 

For Q1, actually, "Anna", "Bill" and "Clare" are three person instead of group. And every person may have more than one faces. So if you need to create the person, just call the Person - Create a Person API to create them, and then call Person – Add a Person Face API to add faces for them. These two APIs are called just like Create Person Group API. 

对于Q2,对于存储在磁盘上的图像,需要将图像文件读取为字节数组,并将数组作为请求体传递。请务必将 ""Content-Type"设置为"application / octet-stream"。在请求 标题中。

For Q2,  for image stored on disk, you need to read the image file to byte array, and pass the array as request body. Remember to set "Content-Type" as "application/octet-stream" in the request header.

谢谢


这篇关于关于Python的MS Face API身份/分组的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆