tinfot/faceplusplus-laravel

此包已被弃用且不再维护。作者建议使用 tinfot/faceplusplus 包。

Face Plus Plus For Laravel

v0.2.0 2019-08-01 12:35 UTC

This package is not auto-updated.

Last update: 2022-02-01 13:14:53 UTC


README

License

需要在Face ++网站上注册账户。 SDK文档,获取API_KEYAPI_SECRET

安装

在composer.json中要求此包并更新composer。

composer require tinfot/faceplusplus

用法

1. 提供者配置文件。 faceplusplus.php

php artisan vendor:publish --provider="Tinfot\Faceplusplus\FaceplusplusServiceProvider" 

2. 输入你的 APPKEYAPPSECRET

FPP_BASE_URL=https://api-cn.faceplusplus.com # If your location in china.
# FPP_BASE_URL=https://api-us.faceplusplus.com # Or other location.

FPP_API_KEY=xxxx
FPP_API_SECRET=xxx

3. 如何使用它?

use Tinfot\Faceplusplus\Facades\Faceplusplus;

// Get human body by a image(base64).
Faceplusplus::humanBodyByBase64("data:image/jpeg;base64,......");

// Get human body by a image url.
Faceplusplus::humanBodyByImageUrl("https://google.com/image.jpg");

// Human beautify
Faceplusplus::faceBeautifyByBase64("data:image/jpeg;base64,......");

// Human beautify by image url
Faceplusplus::faceBeautifyByImageUrl("https://google.com/image.jpg");

// Compare 2 image(base64). 
Faceplusplus::faceCompareByBase64("data:image/jpeg;base64,......", "data:image/jpeg;base64,......");

// Compare 2 face photo by image url.
Faceplusplus::faceCompareByImageUrl("https://google.com/image1.jpg", "https://google.com/image2.jpg");

支持

仅通过Github提供支持。请不要通过邮件向我们报告问题,而是创建一个Github问题。