> For the complete documentation index, see [llms.txt](https://doc.crisen.org/ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.crisen.org/ai/baidu/face/match.md).

# 人脸对比

```
// 使用url图片进行对比
$res = $ai->face()->url('http://domain/some.jpg')->match();

// 使用base64编码图片进行对比
$res = $ai->face()->base64('Y3Jpc2VuY2hvdQ==')->match();

// 使用本地路径进行对比
$res = $ai->face()->path('/path/to/some.jpg')->match();

// 兼容官方可选参数
$res = $ai->face()->path('/path/to/some.jpg')->match([
    'face_type'        => 'LIVE',
    'quality_control'  => 'NONE'
    'liveness_control' => 'NONE'      
]);

if($res->success()){
    // do something
}
```
