微信小程序开发:人脸检测请求协议
发布:管理员 日期:2022-11-06 阅读: 次
微信小程序兼了几乎所有的APP功能,其中就包括现在经常使用的人脸检测识别技术,下面就和“拓客云”一起来看看微信小程序开发:人脸检测请求协议!
Request:
{
"command": "detection",// 算法类型
"image": imageBase64Str,// 待检测图片base64字符串码
"max_face_num": 1,// 最大检测人脸数
"image_url": "",// 待检测图片URL
"face_attribute": 1,// 是否进行人脸属性检测
"face_quality": 1// 是否进行人脸质量检测
}
Response:
{
"face_num": 1,//人脸个数
"face_list": [
{
"location": {//人脸位置
"x1": 132,
"y1": 305,
"x2": 259,
"y2": 493
},
"score": 0.999789,
"attributes": {//人脸属性
"mask": 0,//是否戴口罩
"eyeopen": 1,//是否睁眼
"expression": 0,//是否正常表情
"yaw": 5,//偏转角
"pitch": 6,//俯仰角
"roll": 7//翻滚角
},
"quality": {
"brightness": 0,//亮度是否合格
"blur": 0,//清晰度是否合格
"occlusion": {//人脸7区域遮挡情况
"left_eye": 1,
"right_eye": 1,
"nose": 1,
"mouth": 1,
"left_cheek": 1,
"right_cheek": 1,
"chin": 1
}
}
}
],
"request_id": "123456" //请求ID
}