agile-fc / facex-api
Facex api package
v1.2
2019-09-10 12:12 UTC
Requires
- php: ^7.1
Requires (Dev)
- phpunit/phpunit: ^7.0
This package is not auto-updated.
Last update: 2025-04-03 12:46:32 UTC
README
About
Facex api is a package that help you to use Facex, an api for the face recognition.
Installation
composer require agile-fc/facex-api
Usage
Calculate the confidence
<?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
Check if the faces are the same.
<?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