agile-fc/facex-api

Facex API 包

v1.2 2019-09-10 12:12 UTC

This package is not auto-updated.

Last update: 2024-10-03 10:23:41 UTC


README

关于

Facex api 是一个帮助您使用 Facex(面部识别API)的包。

安装

composer require agile-fc/facex-api

使用

计算置信度

<?php

require  __DIR__  .  '/vendor/autoload.php';    

use AgileFC\FacexApi\FacexApi;

$faceX = new FacexApi("YOUR_APP_ID", "YOUR_APP_KEY");

echo $faceX->compare(__DIR__.'/your_first_image.png', __DIR__.'/your_second_image.png');

// return 0.75664

检查人脸是否相同。

 <?php

require  __DIR__  .  '/vendor/autoload.php';    

use AgileFC\FacexApi\FacexApi;

$faceX = new FacexApi("YOUR_APP_ID", "YOUR_APP_KEY");

echo $faceX->check(__DIR__.'/your_first_image.png', __DIR__.'/your_second_image.png', 0.700);

// return true or false