Giter Site home page Giter Site logo

face's Introduction

The Face Recognition SDK For BAT.

Latest Stable Version Total Downloads License

Feature

  • 自定义缓存支持
  • 符合 PSR 标准,可以很方便的与你的框架结合
  • 支持服务商BAT

Support

Requirement

Installation

composer require biaoqianwo/face

Usage

基本使用(以百度人脸识别为例)

use Biaoqianwo\Face\Application as BiaoFace;

$app = new BiaoFace([
    'appKey' => 'appKey',
    'secretKey' => 'secretKey'
]);
//人脸比对
$result = $app->baidu->match($files);

返回结果
百度AI人脸比对目前支持两张图片

{
    "log_id": 73473737,
    "result_num":1,
    "result": [
        {
            "index_i": 0,
            "index_j": 1,
            "score": 44.3
        }
    ]
}

各平台支持的方法

所有平台支持的方法中,都满足以下结构:

$app->platform->$method($files, $options = [])

$files 的值可以为

  1. 文件路径(完整)
  2. SplFileInfo 对象
  3. Resource
  4. 在线图片地址(部分服务商不支持)
  5. Array

注:options 的值都是可选的

目前采用 AccessToken 作为 API 认证方式,查看鉴权认证机制

人脸比对

$app->baidu->match($files, [
    'max_face_num' => 1,
    'face_fields'  => 'expression',
]);

目前采用 APPCODE 作为 API 认证方式,查看我的APPCODE

use Biaoqianwo\Face\Application as BiaoFace;

$app = new BiaoFace([
      'appcode' => '40bc103c7fe6417b87152f6f68bead2f',
    ]
]);

人脸比对

$app->aliyun->match($files);

可登录 云API密钥控制台查看你的个人 API 密钥

use Biaoqianwo\Face\Application as BiaoFace;

$app = new BiaoFace([
    'appId' => '1254032478',
    'secretId' => 'AKIDzODdB1nOELz0T8CEjTEkgKJOob3t2Tso',
    'secretKey' => '6aHHkz236LOYu0nRuBwn5PwT0x3km7EL',
    'bucket' => 'test1'
]);

人脸比对

$app->tencent->match($files);

LICENSE

MIT

face's People

Contributors

biaoqianwo avatar

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.