unstructured icon indicating copy to clipboard operation
unstructured copied to clipboard

ocr metadata

Open hakankaraoguz opened this issue 1 year ago • 5 comments

Hi,

When using auto partitioning to partition pdfs, is it possible to get ocr metadata (quality, used or not etc) when pdf parser falls back to ocr strategy?

hakankaraoguz avatar Feb 21 '24 08:02 hakankaraoguz

Hi @hakankaraoguz

Can you please share the code you're trying and more details about the OCR metadata you want to get?

christinestraub avatar Feb 21 '24 20:02 christinestraub

Hi @christinestraub According to documentation if auto strategy is used , there is no indicator in the element metadata when unstructured falls back to OCR strategy. However here I can see that OCR confidence is extracted in pytesseract. I would like to have the OCR confidence information present along with a strategy flag in the element metadata so that I can filter out low quality text after parsing stage.

hakankaraoguz avatar Feb 21 '24 23:02 hakankaraoguz

Any updates on this?

hakankaraoguz avatar Mar 05 '24 08:03 hakankaraoguz

@hakankaraoguz Did you try with hi_res strategy? Is the detection_class_prob metadata field not working for your case?

christinestraub avatar Mar 05 '24 18:03 christinestraub

I will try it out but according to this Article detection_class_prob is about the class confidence of the extracted section (Table, Header etc) in the PDF. I am more interested in having the OCR quality result if the algorithm falls back to OCR. Thank you @christinestraub

hkaraoguz avatar Mar 08 '24 10:03 hkaraoguz