cognitive-services系列 -- 使用微软cognitive-services中的人脸识别模块


1.注册Cognitive Services账号,获取一个APIkey。





2.打开在线调试console
https://dev.projectxford.ai/docs/services/563879b61984550e40cbbe8d/operations/563879b61984550f30395236/console


api地址:
https://api.projectoxford.ai/face/v1.0/detect?returnFaceId=true&returnFaceLandmarks=false




请求:
POST https://api.projectoxford.ai/face/v1.0/detect?returnFaceId=true&returnFaceLandmarks=false HTTP/1.1
Content-Type: application/json
Host: api.projectoxford.ai
Ocp-Apim-Subscription-Key: ••••••••••••••••••••••••••••••••


{
    "url":"https://news.usc.edu/files/2016/03/Sample_Steven-1-824x549.jpg"
}





返回:
Pragma: no-cache
apim-request-id: 292aa39c-4ffd-41bd-87fe-b947af1ae71d
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Cache-Control: no-cache
Date: Sun, 15 Jan 2017 10:38:34 GMT
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Content-Length: 115
Content-Type: application/json; charset=utf-8
Expires: -1


[
  {
    "faceId": "99cfe413-6410-4305-a460-8b50c748d35f",
    "faceRectangle": {
      "top": 149,
      "left": 298,
      "width": 228,
      "height": 228
    }
  }
]








返回值默认只包含人脸的矩形坐标以及长宽。可以添加更多参数。





4. copy faceid (用于其他相关API)







人脸识别模块中的其他相关 api:
创建Person
删除Person
创建Group
添加Person到Group
获取Group
获取Group列表
创建FaceList
删除FaceList
获取FaceList的列表
创建Face
添加Face到FaceList
找到相似的Face
验证Face(参数:FaceId,PersonId,personGroupId)


可以说是一个完整的module,并且所有服务是Cloud based,扩展性和HA都是有保障的,API也都是restful的。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值