curl -i -XPOST -H 'Content-Type: application/json' \
-H 'Authorization: your Authorization code here' \
-d '{"url": "https://img-blog.csdnimg.cn/740c26c2b20d4ea9acf2ebc7def9b3f5.png#pic_center"}' \
https://open.datastory.com.cn/api/thanos/ocr-layout
{"bboxes":[{"bbox":[701,3,1278,854],"confidence":1.0,"label":"Table","polygon":[[701,3],[1278,3],[1278,854],[701,854]]},{"bbox":[21,41,593,815],"confidence":1.0,"label":"Table","polygon":[[21,41],[593,41],[593,815],[21,815]]}],"image_bbox":[0.0,0.0,1280.0,876.0],"page":1}
{"error": 403, "msg": "图片无法正常下载"}
{"error": 404, "msg": "未知错误,可能是输入的文件不合理"}
{"error": 405, "msg": "输入的 url 有误"}
为避免输入的图片过于极端(例如尺寸过大,以及长宽比不合理等),导致显存溢出,进而导致服务崩溃。这里将输入的尺寸面积约束在 397 X 14784(实测解决显存极限的输入最大面积) 以内,同时长宽比要小于 40:1
产品咨询
020-38061725
微信扫描二维码在线咨询