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.
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.