IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

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

    csharp25发表于 2017-01-21 15:59:32
    love 0

    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的。


沪ICP备19023445号-2号
友情链接