How to run only detection model to get the bounding boxes. (Handwritten text) #1734
-
Is there any way to run only the detection model and get the bounding boxes. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 16 replies
-
Hi @sanjay-nit 👋, Here you go (example code):
|
Beta Was this translation helpful? Give feedback.
-
Hi @felixdittrich92, This may not be directly related to this discussion, but I wanted to express my satisfaction with the auto-rotating pages feature. I have some rotated images on which I want to apply OCR, and I also need to straighten the pages. I'm pleased with the results when I use Is it possible to get the rotation angle? Additionally, it would be great if I could obtain the auto-rotated image that the OCR model processed so I can apply the bounding boxes generated by the Thank you! |
Beta Was this translation helpful? Give feedback.
-
Hi @sanjay-nit 👋, Glad to hear you like it 🤗 You can pass To get the straightened page you can do the following:
This results in a list of numpy arrays which can easily saved with Hope this helps 👍 Best regards, |
Beta Was this translation helpful? Give feedback.
-
@sanjay-nit Do you deal with "random" rotated documents and images where the text can also have any direction (horizontal, vertical) or it's more like small rotations (range: -45 to 45 degrees) and only horizontal text ? :) |
Beta Was this translation helpful? Give feedback.
-
Is there any TrOCR integration planned for docTr or other support for handwritten texts? |
Beta Was this translation helpful? Give feedback.
Hi @sanjay-nit 👋,
Sure the
ocr_predictor
instance is at the end only a wrapper around thedetection_predictor
/recognition_predictor
andcrop_orientation_predictor / page_orientation_predictor
.Here you go (example code):