/face

A PHP Library for face detection (age, gender, smile, etc.) on image.

Primary LanguagePHPMIT LicenseMIT

Face Detection

A PHP Library for face detection (and age, gender, etc.) on image.

Used: Microsoft's Face API

Installation

composer install

Add your subscription key in the FaceDetection.php class

private $subscriptionKey = '';

Usage

use Khrigo\Face\FaceDetection as FaceDetection;
require_once __DIR__ . '/vendor/autoload.php';

$image = array(
    'url' => '' // url on image
);

$face = new FaceDetection($image);

Set attributes

$face->setAttributes(['gender', 'age']);

Detecting a face

$face->getFaces();