agile-fc/facex-api

Facex api package

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

This package is not auto-updated.

Last update: 2024-05-30 08:35:25 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