算法说明
本算法为我读你默项目所有的标题检测
算法名称
title_detector
请求参数
| 参数名 |
类型 |
必填 |
说明 |
| oss_file |
string |
是 |
需要识别的图片 |
| process |
string |
否 |
缩放参数 |
响应参数
{ "params":{ 'type': "xxx", 'title': "xxxx", 'context': "xxxxxx" }, # 返回结果 "code": 200 }
请求示例(sdk 1.16.0+)
# 安装SDK pip install leqi-algorithm-mic-sdk# SDK使用文档 https://www.yuque.com/fenfendeyouzhiqingnian/algorithm/zesnvxfrom algorithm_mic_sdk.algorithms.title_detector import TitleDetectorfrom 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) # 初始化验证信息title_detector = TitleDetector(auth_info, file_info) # 创建算法对象resp = title_detector.synchronous_request() # 同步请求算法print(resp.json) # 输出算法响应参数