本次人脸识别主要采用的是百度云人脸识别接口
精准定位图中人脸,获得眼、口、鼻等72个关键点位置,分析性别、年龄、表情等多种人脸属性
获取Access——token
function access_token(){
$file = __DIR__ . '\access_token';
if(file_exists($file)){
$str = file_get_contents($file);
try{
$arr = json_decode($str,true);
if(is_array($arr)){
$totime = $arr['totime'];
if($totime>time()){
return $arr['access_token'];
exit;
}
}
}catch(Exception $e){
}
}
$apikey = "******";
$secretkey = "*****"