darmen/php-azure-face-api-client

PHP client for Microsoft Azure Face API.

v1.1.0 2021-07-29 07:21 UTC

This package is auto-updated.

Last update: 2024-10-29 05:54:09 UTC


README

A PHP library that utilizes Azure Face REST API.

Build status Latest Stable Version Total Downloads

Requirements

  • PHP >= 7.4

Installation

composer require darmen/php-azure-face-api-client

Use the autoloader in your projects:

require 'vendor/autoload.php';

Next steps

Face resource

  • Detect with stream
  • Detect with URL
  • Find similar
  • Group
  • Identify
  • Verify Face to Face
  • Verify Face to Person

Other resources

  • Face List resource
  • Large Face List resource
  • Large Person Group resource
  • Large Person Group Person resource
  • Person Group resource
  • Person Group Person resource
  • Snapshot resource

Usage

All following examples assume this step.

use Darmen\AzureFace\Client;

$client = new Client('<endpoint>', '<subscription key>');

Working with resources

$client->faceList()->create('test-id', 'test-name');
$client->largeFaceList()->create('test-id-large', 'test-name-large');

$client->faceList()->get('test-id');
$client->largeFaceList()->get('test-id-large');

$client->faceList()->delete('test-id');
$client->largeFaceList()->delete('test-id-large');

// ...

Since the library wraps Face API REST interface, feel free toe read the sources in src/Resources directory to find out more methods.

Contribution

Happy to get your feedback, but also you are feel free to raise a pull request.

License

This library is released under the MIT License.