人脸识别应用

Face Recognition app

我正在尝试制作一个应用程序,当有人解锁 phone 并点击用户照片(如果不是所有者)时会触发实时人脸识别,但我找不到合适的 API是为了它

您可以使用普通的人脸检测或人脸识别API,请确保APP可以将带有内容(图像)的url发送到以下API。

您需要订阅 API 他们每月提供 100 次免费请求,试一试:

API 订阅/文档 https://market.mashape.com/zyanyatech1/face-recognition

请求如下:

# These code snippets use an open-source library. http://unirest.io/python
response = unirest.post("https://zyanyatech1-face-recognition-v1.p.mashape.com/facebox/check",
  headers={
    "X-Mashape-Key": "{subscription_key}",
    "Content-Type": "application/json",
    "Accept": "application/json"
  },
  params=("{\"url\":\"https://upload.wikimedia.org/wikipedia/commons/d/df/The_Fabs.JPG\"}")
)

响应将是:

 {
  "success": true,
  "facesCount": 4,
  "faces": [
    {
      "rect": {
        "top": 737,
        "left": 117,
        "width": 223,
        "height": 223
      },
      "matched": false
    },
    {
      "rect": {
        "top": 171,
        "left": 735,
        "width": 268,
        "height": 268
      },
      "matched": false
    },
    {
      "rect": {
        "top": 762,
        "left": 687,
        "width": 223,
        "height": 223
      },
      "matched": false
    },
    {
      "rect": {
        "top": 134,
        "left": -44,
        "width": 356,
        "height": 321
      },
      "matched": false
    }
  ]
}