paddleOCR 识别弯曲文本 报错的解决办法

将paddlepaddle 的版本从 2.2.0 降低到2.1.3 就行了。注意要运行两个命令:

python  tools/export_model.py -c configs/det/det_r50_vd_sast_totaltext.yml -o Global.checkpoints="./models/sast_r50_vd_total_text/best_accuracy" Global.save_inference_dir="./inference/det_sast_tt"

python3 tools/infer/predict_det.py --det_algorithm="SAST" --image_dir="./doc/imgs_en/img_10.jpg" --det_model_dir="./inference/det_sast_tt/" --det_sast_polygon=True --use_gpu=False

 /home/PaddleOCR {release/2.3} python3 tools/infer/predict_det.py --det_algorithm="SAST" --image_dir="./doc/imgs_en/img623.jpg" --det_model_dir="./inference/det_sast_tt/" --det_sast_polygon=True --use_gpu=False
grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
/usr/local/lib/python3.8/site-packages/setuptools/depends.py:2: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
---    Fused 0 subgraphs into layer_norm op.
---    fused 0 pairs of fc gru patterns
Traceback (most recent call last):
  File "tools/infer/predict_det.py", line 242, in <module>
    res = text_detector(img)
  File "tools/infer/predict_det.py", line 218, in __call__
    post_result = self.postprocess_op(preds, shape_list)
  File "/home/PaddleOCR/ppocr/postprocess/sast_postprocess.py", line 341, in __call__
    poly_list = self.detect_sast(
  File "/home/PaddleOCR/ppocr/postprocess/sast_postprocess.py", line 237, in detect_sast
    instance_count, instance_label_map = self.cluster_by_quads_tco(
  File "/home/PaddleOCR/ppocr/postprocess/sast_postprocess.py", line 164, in cluster_by_quads_tco
    pred_tc = xy_text - tco
ValueError: operands could not be broadcast together with shapes (43093,2) (43093,8)

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值