I’ve spent way too much time writing OCR post-processing code.
Not the OCR itself, that part is easy nowadays. It’s everything that comes after.
I have been working in Data Science & Data Engineering for more than 7 years now. I worked on lots of Data projects, Data Pipeline, etc... with OCR. It is everywhere. Unfortunately, there is still no library to represent those basic Objects.
So I decided to resolve this pain point.
Otary, an open-source Python Library, resolves all those following common tasks and more:
- handles different output formats for every OCR engine,
- drawing détections bbox,
- working with either rotated or straight bounding boxes (Axis-Aligned Bounding Boxes / AABB),
- searching for words in a given region,
- finding words by regex or string,
- looking for words on the left or right of a given one,
- having real objects (meaning classes) representing the OCR & the Bounding Boxes with properties, methods, etc...
- the bbox is a Rectangle or a AxisAlignedRectangle and those objects have their own methods, properties and you can do so much with it for free... like finding intersection points with other geometry objects, rotate, expand, shift and so much so much more.
- so much more (again!)...
So I added a Vision component to Otary to handle all of that.
It works with outputs from Tesseract, EasyOCR, DocTR, Azure Document Intelligence, Textract, and others, so the rest of your code doesn’t have to care where the OCR came from.
1 comment
[ 0.30 ms ] story [ 10.2 ms ] threadNot the OCR itself, that part is easy nowadays. It’s everything that comes after.
I have been working in Data Science & Data Engineering for more than 7 years now. I worked on lots of Data projects, Data Pipeline, etc... with OCR. It is everywhere. Unfortunately, there is still no library to represent those basic Objects.
So I decided to resolve this pain point.
Otary, an open-source Python Library, resolves all those following common tasks and more: - handles different output formats for every OCR engine, - drawing détections bbox, - working with either rotated or straight bounding boxes (Axis-Aligned Bounding Boxes / AABB), - searching for words in a given region, - finding words by regex or string, - looking for words on the left or right of a given one, - having real objects (meaning classes) representing the OCR & the Bounding Boxes with properties, methods, etc... - the bbox is a Rectangle or a AxisAlignedRectangle and those objects have their own methods, properties and you can do so much with it for free... like finding intersection points with other geometry objects, rotate, expand, shift and so much so much more. - so much more (again!)...
So I added a Vision component to Otary to handle all of that.
It works with outputs from Tesseract, EasyOCR, DocTR, Azure Document Intelligence, Textract, and others, so the rest of your code doesn’t have to care where the OCR came from.