Giter Site home page Giter Site logo

face's Introduction

ridvanbaluyos/face

A PHP Library built for the Microsoft's Cognitive Services.

Cognitive Services: Face API

Actively Maintained Latest Stable Version Total Downloads Scrutinizer Code Quality Build Status Codacy Badge License

Table of contents

Requirements

Kindly subscribe for an API key to Microsoft's Cognitive Services API page.

Installation

Open your composer.json file and add the following to the require key:

"ridvanbaluyos/face": "v1.1"

After adding the key, run composer update from the command line to install the package

composer install

or

composer update

Configuration

Add your subscription key in src/Ridvanbaluyos/Face/config.json file

{
	"url" : "https://westus.api.cognitive.microsoft.com/face/v1.0/detect",
	"subscriptionKey" : "zWwPD7BGWYEArX6u6QxvS25TTsNge2Qw"
}

Usage

<?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);
?>

Detecting a face

$face->getFaces();

Analyzing Face Landmarks

$face->analyzeFaceLandmarks()->getFaces();

Analyzing Face Attributes

$face->analyzeFaceAttributes()->getFaces();

Chaining options

$face->analyzeFaceLandmarks()->analyzeFaceAttributes()->getFaces();

Alternatively, you can analyze all possible options

$face->analyzeAll()->getFaces();

References

face's People

Contributors

codacy-badger avatar ridvanbaluyos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

face's Issues

(bool)false

I have tried install and there is no error but return always (bool) false

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.