yoonik / face-api
Functionalities for biometric processing (detection, verification and identification) for Youverse.Face.
Installs: 3 219
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.5
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: >=6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.12
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2025-05-23 20:29:05 UTC
README
Youverse Face API Client SDK PHP
This repository implements an integration SDK to facilitate the consumption of the Youverse.Face API, an Youverse Services offering.
For more information please contact us.
Requirements
PHP 5.5 and later
Getting Started
composer require youverse/face-api
Example
Verifies the faces similarity between two images in base 64
require dirname(__DIR__) . '/vendor/autoload.php'; $apiKey = "YOUR-X-API-KEY"; $baseUrl = "YOUR-API-ENDPOINT"; $image1 = "<IMAGE_PATH>"; $image2 = "<IMAGE_PATH>"; $client = new Youverse\Face\Client\Face( $apiKey, $baseUrl ); $payload = new Youverse\Face\Model\VerifyImages(); //convert image 1 to base64 $img = file_get_contents($image1); $imgdata = base64_encode($img); $payload->setFirstImage($imgdata); //convert image 2 to base64 $img = file_get_contents($image2); $imgdata = base64_encode($img); $payload->setSecondImage($imgdata); try { $result = $client->verifyImages($payload); print_r($result); } catch (Exception $e) { echo 'Exception when calling FaceApi->verifyImages: ', $e->getMessage(), PHP_EOL; }
If you're interested in using Youverse.Face API for identification purposes, please visit our examples.