PHPackages                             biaoqianwo/face - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. biaoqianwo/face

ActiveLibrary[Image &amp; Media](/categories/media)

biaoqianwo/face
===============

The Best Image Ocr SDK For BAT.

1.0.0(8y ago)0108MITPHP

Since Nov 2Pushed 8y agoCompare

[ Source](https://github.com/biaoqianwo/face)[ Packagist](https://packagist.org/packages/biaoqianwo/face)[ Docs](http://github.com/biaoqianwo/face)[ RSS](/packages/biaoqianwo-face/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (2)Used By (0)

The Face Recognition SDK For BAT.
=================================

[](#the-face-recognition-sdk-for-bat)

[![Latest Stable Version](https://camo.githubusercontent.com/6810ea5c4c3a9a882be5597443cea74d08faa85d1e30609e5a43753a132d3686/68747470733a2f2f706f7365722e707567782e6f72672f6269616f7169616e776f2f666163652f762f737461626c65)](https://packagist.org/packages/biaoqianwo/face)[![Total Downloads](https://camo.githubusercontent.com/576baf83bae90d7fca3444d23de4016ea5f3a0e957627c2e542e0aac9374076f/68747470733a2f2f706f7365722e707567782e6f72672f6269616f7169616e776f2f666163652f646f776e6c6f616473)](https://packagist.org/packages/biaoqianwo/face)[![License](https://camo.githubusercontent.com/fc2bfbb0c3a4b884a8a23e34c0f3b4a9d7fedb2094408e89a2b405ddfa7fcdb7/68747470733a2f2f706f7365722e707567782e6f72672f6269616f7169616e776f2f666163652f6c6963656e7365)](https://packagist.org/packages/biaoqianwo/face)

- [百度AI人脸识别](#baidu-face)
    - [人脸比对](#baidu-match)

Feature
-------

[](#feature)

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

Support
-------

[](#support)

- [百度AI人脸识别](http://ai.baidu.com/tech/face)
- [阿里云人脸识别](https://data.aliyun.com/product/face)
- [腾讯云万象优图](https://cloud.tencent.com/product/FaceRecognition)

Requirement
-----------

[](#requirement)

- PHP &gt; 5.6
- [composer](https://getcomposer.org/)

Installation
------------

[](#installation)

```
composer require biaoqianwo/face
```

Usage
-----

[](#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` 的值都是可选的

### [百度AI人脸识别](http://ai.baidu.com/tech/face)

[](#百度ai人脸识别)

目前采用 `AccessToken` 作为 `API` 认证方式，查看[鉴权认证机制](http://ai.baidu.com/docs#/Auth/top)

#### 人脸比对

[](#人脸比对)

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

### [阿里云人脸识别](https://data.aliyun.com/product/face)

[](#阿里云人脸识别)

目前采用 `APPCODE` 作为 `API` 认证方式，[查看我的APPCODE](https://market.console.aliyun.com/imageconsole/index.htm)

```
use Biaoqianwo\Face\Application as BiaoFace;

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

#### 人脸比对

[](#人脸比对-1)

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

### [腾讯云人脸识别](https://cloud.tencent.com/product/FaceRecognition)

[](#腾讯云人脸识别)

> 可登录 [云API密钥控制台](https://console.cloud.tencent.com/capi)查看你的[个人 API 密钥](https://console.cloud.tencent.com/capi)

```
use Biaoqianwo\Face\Application as BiaoFace;

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

#### 人脸比对

[](#人脸比对-2)

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

LICENSE
-------

[](#license)

MIT

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3114d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/65043553783e26857146cd82158daf7f77db1d2ad7117cfe342716b3ff4740db?d=identicon)[biaoqianwo](/maintainers/biaoqianwo)

---

Top Contributors

[![biaoqianwo](https://avatars.githubusercontent.com/u/3367795?v=4)](https://github.com/biaoqianwo "biaoqianwo (5 commits)")

---

Tags

faceaiface

### Embed Badge

![Health badge](/badges/biaoqianwo-face/health.svg)

```
[![Health](https://phpackages.com/badges/biaoqianwo-face/health.svg)](https://phpackages.com/packages/biaoqianwo-face)
```

###  Alternatives

[opentok/opentok

OpenTok is a platform for creating real time streaming video applications, created by TokBox.

1413.0M10](/packages/opentok-opentok)[daun/statamic-placeholders

Generate low-quality image placeholders for lazyloading Statamic assets

106.6k](/packages/daun-statamic-placeholders)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
