Giter Club home page Giter Club logo

faceplusplus's Introduction

Face++

Uses Face++ v3 US Server.

Installation

composer require amitkkhanchandani/faceplusplus:dev-master

Examples:

Namespace

use Amitk\Faceplusplus\Facepp;

Get Face Token

$api_key = env('FACEPP_API_KEY',null);
$api_secret = env('FACEPP_API_SECRET',null);
$facepp = new Facepp($api_key, $api_secret);
$params = array(
    'image_url'    =>   '<--Image Absolute URL-->'
);
$response = $facepp->execute('/detect',$params);

$response = json_decode(json_encode($response));
if($response->http_code == 200){
    $data = json_decode($response->body);
    //Token Data is in the $data variable
}
else{
    //Handle if response is not 200.
}

Face Compare

$api_key = env('FACEPP_API_KEY',null);
$api_secret = env('FACEPP_API_SECRET',null);
$facepp = new Facepp($api_key, $api_secret);
$params = array(
    'face_token1'   =>  '<Face Token 1>',
    'face_token2'   =>  '<Face Token 2>'
);
$response = $facepp->execute('/compare',$params);

$response = json_decode(json_encode($response));
if($response->http_code == 200){
    $data = json_decode($response->body);
    /** Data Available
     *  confidence
        request_id
        time_used
        thresholds  */
    $confidence = $data->confidence;
    // Handle Confidence Level.
    return $confidence;
}
else{
    //Handle if response is not 200.
}

More APIS Details on Face++ Doc Center

Copyright and License

Copyright (c) 2018, Amit K Khanchandani and Contributors. All Rights Reserved.

This project is licenced under the MIT License.

faceplusplus's People

Contributors

amitkkhanchandani avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

junker

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.