face
Version 1.1 Release
Microsoft의인지 서비스를 위해 구축 된 PHP 라이브러리.
인지 서비스 : 얼굴 API
Microsoft의인지 서비스 API 페이지에 API 키를 구독하십시오.
composer.json 파일을 열고 require 키에 다음을 추가하십시오.
"ridvanbaluyos/face": "v1.1"
키를 추가 한 후 명령 줄에서 작곡가 업데이트를 실행하여 패키지를 설치하십시오.
composer install또는
composer update src/Ridvanbaluyos/Face/config.json 파일에 가입 키를 추가하십시오
{
"url" : " https://westus.api.cognitive.microsoft.com/face/v1.0/detect " ,
"subscriptionKey" : " zWwPD7BGWYEArX6u6QxvS25TTsNge2Qw "
}
<?php
// namespace and autoloaders
use Ridvanbaluyos Face FaceDetection as FaceDetection ;
require_once __DIR__ . ' /vendor/autoload.php ' ;
// let's use Justin Bieber's photo
$ image = array (
' url ' => ' http://img2.timeinc.net/people/i/2014/database/140831/justin-bieber-300.jpg ' ,
);
// instantiate face detection object
$ face = new FaceDetection ( $ image );
?> $ face -> getFaces (); $ face -> analyzeFaceLandmarks ()-> getFaces (); $ face -> analyzeFaceAttributes ()-> getFaces (); $ face -> analyzeFaceLandmarks ()-> analyzeFaceAttributes ()-> getFaces (); $ face -> analyzeAll ()-> getFaces ();