Text Recognition Fails on Rotated Text (Architectural Drawings) – Detection Box Corner Order Seems Wrong #17325
Unanswered
bananaback
asked this question in
Q&A
Replies: 2 comments 8 replies
-
Beta Was this translation helpful? Give feedback.
8 replies
-
|
Any update on this? I'm having the exact same problem, but with the added complication that my text can be rotated at any angle.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment







Uh oh!
There was an error while loading. Please reload this page.
-
Hi developers,
I’m working on an OCR system for architectural drawings, where text appears at many different angles (not only horizontal).
Horizontal text works fine, but rotated text often becomes flipped or mis-read.

Here is an example of how the rotated labels look in my dataset:
(see image)
And here is how the recognition goes wrong when the text rotates further:

What I Tried
1. Finetuning the recognition model
I first tried finetuning the recognition model, but it did not help.
So I moved on to investigating the detection stage.
2. Investigating the detection model using PPOCRLabel
During annotation in PPOCRLabel, I noticed something important:
When PPOCRLabel auto-draws the box (top-left → bottom-right),

→ Recognition is wrong for rotated text.
When I manually draw the box carefully from bottom-left → top-right,

then click Re-Recognition,
→ The recognition becomes correct.
This made me think the ordering of the 4 points affects the angle/direction, so I labeled my rotated dataset very carefully using this bottom-to-top direction.
I labeled ~500 rotated samples and finetuned the detection model.
3. Testing the finetuned detection model
After finetuning, the real prediction results are still not good — rotated text is still mis-recognized.
So I inspected the output boxes from predict(), and this is what I found:
Every predicted box always follows the same point order
top-left
top-right
bottom-right
bottom-left
This happens for all rotations — vertical, diagonal, upside down, etc.
It seems the detector normalizes every box back into TL–TR–BR–BL and does not preserve any rotation information.
Because of this, the recognition model receives no real “angle” signal.

Current Problems / Questions
1. How can I correctly finetune the detection model for rotated text?
In my dataset, text can rotate freely clockwise.
But when it rotates beyond 270° clockwise, it effectively becomes a 90° counter-clockwise rotation (as shown in the first attached image).
During labeling, for vertical or highly rotated text, I manually draw the box from bottom-left → top-right, then click Re-Recognition — and the recognition becomes correct.
This is why I believed the point order helps the model learn direction.
I labeled ~500 such rotated samples carefully, finetuned the detection model, but the final predictions are still angle-neutral (always TL → TR → BR → BL).
So the recognition model never receives orientation information.
I’m not sure whether:
2. Which module in PaddleOCR is actually responsible for orientation?
Because the detection outputs always normalized corner order, I am unsure where rotation is supposed to be handled:
I’ve searched documentation and online discussions for days, but I still can’t find a clear explanation of which component is responsible for rotation or what the correct training process is for multi-angle text.
Right now I don’t know whether:
Beta Was this translation helpful? Give feedback.
All reactions