'baidu' => [ 'app_id' => '10542071', 'app_key' => '8s6SsRRSqSEBGbHET5yQWWgT', 'secret_key' => 'AYBUKYByCBDdaSWijinZl24WZnbCpAtt', ],
根目錄下執行:php
composer require hahaxixi/ai
項目目錄config下面添加配置文件ai.php,內容以下git
return [ 'face_plus' => [...], 'baidu' => [...], 'youtu' => [...], ];
一行代碼調用人臉檢測示例github
$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添加app
'ai'=>[ 'face_plus' => [...], 'baidu' => [...], 'youtu' => [...], ],
一行代碼調用人臉檢測示例composer
$result = Entry::Baidu(config('ai')) ->face ->select('detect') ->where(['image' => file_get_contents(__DIR__ . '/file/face_detect.jpeg'), 'id_card_side' => 'front']) ->get();