0

PaddleOCR seems to support different algorithms/models for text detection, as written in their algorithms overview. However, when trying to load a different model from "DB" (for example "SAST" or "EAST") an error is encountered (I get the following error: ppocr ERROR: det_algorithm must in ['DB']). From the code it seems that only the "DB" model is supported - see here. I have downloaded the models from the links posted in the documentation, is there a way to use them in a python script? I don't intend to use them as illustrated in the tutorial, for example running python3 tools/infer/predict_det.py --image_dir="./doc/imgs_en/img_10.jpg" --det_model_dir="./inference/det_r50_east/" --det_algorithm="EAST".

I have tried something like the following:

from paddleocr import PaddleOCR

ocr = PaddleOCR(use_angle_cls=True, lang="en", det_algorithm="DB")
result = ocr.ocr(img, cls=True)

1 Answer 1

2

This looks like you have installed the paddleOCR using the whl package. The whl package currently only supports the DB algorithm. For predictions of other models, it is recommended to clone the entire project. You can view this discussion here

Sign up to request clarification or add additional context in comments.

1 Comment

wouldn't you need to re-train the detection model for another algorithm anyway?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.