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:
![image](https://private-user-images.githubusercontent.com/132662436/344746814-066b6f85-f5ef-42d9-a50e-20d1f6aa00b9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwOTQyOTAsIm5iZiI6MTcyNDA5Mzk5MCwicGF0aCI6Ii8xMzI2NjI0MzYvMzQ0NzQ2ODE0LTA2NmI2Zjg1LWY1ZWYtNDJkOS1hNTBlLTIwZDFmNmFhMDBiOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxOVQxODU5NTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wNDhiYTA0ZWQyZjdjMDA3YjVhOGJlM2QwY2M4NGRiZmViODIyYWExNDJlNmFkYWFmZmQ4OTI2NTY3MDAwYTA1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.L9loZdbjj4SwwhFva9TQ_vcnSdLWqAQe9jAQGt1xDbA)
(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: