lubaogui/yii2-face

Face Recognization

Installs: 18

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 4

Open Issues: 0

Type:yii2-extension

dev-master 2015-07-28 02:46 UTC

This package is not auto-updated.

Last update: 2024-05-25 14:15:51 UTC


README

Face Recognization

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist lubaogui/yii2-face "*"

or add

"lubaogui/yii2-face": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

use lubaogui\face\FaceRepository;

$faceRepo = new FaceRepository();
//create image array or single image, image column should be the content of the image file
$images = [
    
    'url'=> [
        'targetid'=>xxx,
        'callback'=>xxx,
        'overrite'=>0|1,
        'image'=>file_content,
    ],

];
//save images to face repository
$faceRepo->saveImages($images);


//query image 

$result = [];
$image = '@webroot/images/xxxx.jpg'; 
$faceRepo->searchByImage($image, $result);

//search result will passed to $result