You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Easyocr does a pretty good job in giving back bboxes. But recently I noticed that bboxes are not in order. I figured out that when the texts are slightly disoriented, the bbox for the text at the higher level is placed first in order. For example, this is my sample output:
(box number is the index of each bbox)
In this:
Boxing order should have been: ([[25, 215], [97, 215], [97, 229], [25, 229]], 'Education:', 0.999906885180935), ([[134, 200], [286, 200], [286, 226], [134, 226]], 'BA in Psychology', 0.9998934803292433)]])
and when i concat I should get: Education: BA in psychology
But I actually get:
([[134, 200], [286, 200], [286, 226], [134, 226]], 'BA in Psychology', 0.9998934803292433), ([[25, 215], [97, 215], [97, 229], [25, 229]], 'Education:', 0.999906885180935))]
and if concat the text: I get BA psychology Education:
So I wanted to know if there is any way I can sort the bboxes left to right line by line.
The text was updated successfully, but these errors were encountered:
PrathibhaPA
changed the title
OCR boxes: is there a way to sort boxes left to right via line to line
OCR boxes: is there a way to sort boxes left to right
Jul 1, 2024
Easyocr does a pretty good job in giving back bboxes. But recently I noticed that bboxes are not in order. I figured out that when the texts are slightly disoriented, the bbox for the text at the higher level is placed first in order. For example, this is my sample output:
(box number is the index of each bbox)
In this:
Boxing order should have been: ([[25, 215], [97, 215], [97, 229], [25, 229]], 'Education:', 0.999906885180935), ([[134, 200], [286, 200], [286, 226], [134, 226]], 'BA in Psychology', 0.9998934803292433)]])
and when i concat I should get: Education: BA in psychology
But I actually get:
([[134, 200], [286, 200], [286, 226], [134, 226]], 'BA in Psychology', 0.9998934803292433), ([[25, 215], [97, 215], [97, 229], [25, 229]], 'Education:', 0.999906885180935))]
and if concat the text: I get BA psychology Education:
So I wanted to know if there is any way I can sort the bboxes left to right line by line.
The text was updated successfully, but these errors were encountered: