Skip to content
Discussion options

You must be logged in to vote

You are right — there is no polygon switch on PaddleOCR()
the wrapper forwards only these detection params paddleocr/_pipelines/ocr.py:145-152

box_type is not an init arg at all
it comes from the model config

paddlex/inference/models/text_detection/predictor.py:118

post_op = self.build_postprocess(**self.config["PostProcess"])

:213

box_type=kwargs.get("box_type", "quad"),

and it picks the DB decoder paddlex/inference/models/text_detection/processors.py:531-540

if self.box_type == "poly":
    boxes, scores = self.polygons_from_bitmap(...)
elif self.box_type == "quad":
    boxes, scores = self.boxes_from_bitmap(...)

so flip it on the detector

from paddleocr import TextDetection

det = TextD…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by test3211234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants