Kingonion 2019-06-26
'baidu' => [ 'app_id' => '10542071', 'app_key' => '8s6SsRRSqSEBGbHET5yQWWgT', 'secret_key' => 'AYBUKYByCBDdaSWijinZl24WZnbCpAtt', ],
根目录下执行:
composer require hahaxixi/ai
项目目录config下面添加配置文件ai.php,内容如下
return [ 'face_plus' => [...], 'baidu' => [...], 'youtu' => [...], ];
一行代码调用人脸检测示例
$result = Entry::Baidu(config('ai')) ->face ->select('detect') ->where(['image' => file_get_contents(__DIR__ . '/file/face_detect.jpeg'), 'id_card_side' => 'front']) ->get();
根目录下执行:
composer require hahaxixi/ai
在配置文件params-local.php添加
'ai'=>[ 'face_plus' => [...], 'baidu' => [...], 'youtu' => [...], ],
一行代码调用人脸检测示例
$result = Entry::Baidu(config('ai')) ->face ->select('detect') ->where(['image' => file_get_contents(__DIR__ . '/file/face_detect.jpeg'), 'id_card_side' => 'front']) ->get();