Tag Archives: paddleOCR

How to Solve paddleOCR recognition of curved text Error

Lower the version of paddlepaddle from 2.2.0 to 2.1.3 and you’re done. Note that there are two commands to run:

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)