thecoderin/faceplusplus-sdk

该软件包的最新版本(1.0.3)没有可用的许可证信息。

Face++ 面部识别API

1.0.3 2019-02-21 11:12 UTC

This package is not auto-updated.

Last update: 2024-09-29 05:42:13 UTC


README

要求

  • PHP 5.5.9+.
  • cURL 扩展。
  • GD 扩展。

结构

├── FppClient.php              // the api client
└── lib
    ├── Adapter.php            // the http request adapter, all request be sended by it
    ├── ContentTypes.php       // request body content type
    ├── Image.php              // the image process unit
    ├── MimeTypes.php          // the request body mime type
    ├── MultiPartForm.php      // multipart/for-data request class
    ├── Request.php            // the request class
    ├── RequestException.php   // exception
    └── Response.php           // the response class

示例

include_once 'FppClient.php';

use Fpp\FppClient;

$host = 'https://api-cn.faceplusplus.com';
$apiKey = '<Your Key>';
$apiSecret = '<Your Secret>';

$client = new FppClient($apiKey, $apiSecret, $host);

$data = array(
    'image_url' => "https://www.faceplusplus.com.cn/scripts/demoScript/images/demo-pic10.jpg",
    'return_landmark' => '2',
    'return_attributes' => 'age,headpose'
);

$resp = $client->detectFace($data);
var_dump($resp);

许可证

MIT 许可协议下授权