Text detection boxes warping so I can't create mask #16049
-
|
I would like to create masks over the detected text so I can use inpainting over the image but paddleocr returns the 'rec_polys' on a warped version of the image, with the sides cropped. Anyone knows how would I solve that so Paddle doesnt crop the sides of the image. |
Beta Was this translation helpful? Give feedback.
Answered by
liuhongen1234567
Jul 14, 2025
Replies: 1 comment
-
|
Hello, if you don’t want to use the document orientation classification and document unwarping models, you can turn them off by setting use_doc_orientation_classify=False, use_doc_unwarping=False, and use_textline_orientation=False. from paddleocr import PaddleOCR
ocr = PaddleOCR(
use_doc_orientation_classify=False,
use_doc_unwarping=False,
use_textline_orientation=False,
)
result = ocr.predict("./general_ocr_002.png")
for res in result:
res.print()
res.save_to_img("output")
res.save_to_json("output") |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gustavoribeiro88
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, if you don’t want to use the document orientation classification and document unwarping models, you can turn them off by setting use_doc_orientation_classify=False, use_doc_unwarping=False, and use_textline_orientation=False.