算法说明
本算法为错题本项目用于教师资格证的编号识别检测的算法
算法名称
object_detection
请求参数
| 参数名 |
类型 |
必填 |
说明 |
| oss_file |
string |
是 |
需要识别的图片 |
| process |
string |
否 |
缩放参数 |
响应参数
{ 'result':{ "license_plate":[{ 'left_top': [141, 123], 'right_bottom': [386, 203] }], # 车牌识别结果 "barcode":[{ 'left_top': [88.0, 118.0], 'right_bottom': [245.0, 272.0] }], # 条形码识别结果 "qrcode":[{ 'left_top': [88.0, 118.0], 'right_bottom': [245.0, 272.0] }], # 二维码识别结果 "face_location":[{ 'right_eye_center': [372, 410], # 右眼瞳孔坐标 'left_top': [214, 175], # 左上角坐标 'left_cheek': [232, 448], # 左人脸脸颊坐标 'right_bottom': [443, 568],# 右下角坐标 'chin': [330, 587], # 下巴坐标 'right_top': [443, 200], # 人脸右上角坐标 'pose': { 'pitch': 28, # 头的上下角度 'roll': -5, # 头的歪头角度 'yaw': -8 # 头的左右角度 }, # 人脸姿态 'right_cheek': [420, 445], # 右脸颊坐标 'left_bottom': [214, 543], # 做下角坐标 'left_eye_center': [300, 400], # 左眼瞳孔坐标 'bridge_of_the_nose': [334, 450] # 鼻尖坐标 }] # 人脸识别结果 }, "code": 200 }
请求示例(sdk 1.11.0+)
# 安装SDK pip install leqi-algorithm-mic-sdk# SDK使用文档 https://www.yuque.com/fenfendeyouzhiqingnian/algorithm/zesnvxfrom algorithm_mic_sdk.algorithms.object_detection import ObjectDetectionfrom algorithm_mic_sdk.auth import AuthInfofrom algorithm_mic_sdk.tools import FileInfohost = 'http://gateway.algo.leqi.us' # 算法host地址user_name = 'your name'password = 'password'filename = '1.jpg' # 需要处理的文件名 file_info = FileInfo.for_file_bytes(open(filename, 'rb').read()) # 创建文件对象auth_info = AuthInfo(host=host, user_name=user_name, password=password) # 初始化验证信息object_detection = ObjectDetection(auth_info, file_info) # 创建算法对象resp = object_detection.synchronous_request() # 同步请求算法print(resp.json) # 输出算法响应参数