首页 Paddle Serving 帖子详情
paddlepaddle2.5.2 使用paddleocr 推理预测时返回None
收藏
快速回复
Paddle Serving 问答推理学习资料 508 0
paddlepaddle2.5.2 使用paddleocr 推理预测时返回None
收藏
快速回复
Paddle Serving 问答推理学习资料 508 0

paddlepaddle2.5.2 使用paddleocr 推理预测时返回None     

if det and rec:
ocr_res = []
for idx, img in enumerate(imgs):
img = preprocess_image(img)
dt_boxes, rec_res, _ = self.__call__(img, cls)
if not dt_boxes and not rec_res:

###好像是从这里出现的问题###

ocr_res.append(None)
continue
tmp_res = [[box.tolist(), res]
for box, res in zip(dt_boxes, rec_res)]
ocr_res.append(tmp_res)
return ocr_res

 

发送图片过来后  服务器也已经接受到数据了

[2023/12/18 03:23:27] ppocr DEBUG: dt_boxes num : 1, elapsed : 0.16293978691101074
[2023/12/18 03:23:28] ppocr DEBUG: rec_res num : 1, elapsed : 0.8547172546386719
[2023-12-18 03:23:28,676] [ INFO] _internal.py:96 - 127.0.0.1 - - [18/Dec/2023 03:23:28] "POST / HTTP/1.1" 200 -

0
收藏
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户