smartdog23/php-azure-face-api

SmartDog23 - PHP Azure FaceAPI - Facial Recognition Software

0.2.0 2020-03-12 17:55 UTC

This package is auto-updated.

Last update: 2024-05-17 06:36:39 UTC


README

The PHP Azure Face API makes it easy for developers to access Azure Face API in their PHP code.

SmartDog23 - PHP Azure Face API

License Latest Stable Version Total Downloads

PHP Azure Face API is a PHP Client that make easy to use Azure's Face Recognition API

$azureFaceApi = new AzureFaceApi('YOUR_KEY', AzureRegions::EAST_US);
$result = $azureFaceApi->largePersonGroup()->create()->execute('test-group', 'description of the group');

echo $result->getBody()->getContents();

Help and docs

Sample Laravel Project

Installation

The recommended way to install LaravelAzureFaceAPI is through Composer.

composer require smartdog23/php-azure-face-api

Usage

Using the simple mode

$azureFaceApi = new AzureFaceApi('YOUR_KEY', AzureRegions::EAST_US);
$result = $azureFaceApi->largePersonGroup()->create()->execute('test-group', 'description of the group');

echo $result->getBody()->getContents();

Using the advanced mode

$azureFaceApi = new AzureFaceApi('YOUR_KEY', AzureRegions::EAST_US);

$options = new CreateOptions();
$options->parameters()->largePersonGroupId('test-group');
$options->body()->name('description of the group');
$result = $azureFaceApi->largePersonGroup()->create()->executeWithOptions($options);
echo $result->getBody()->getContents();