Datasets:

Modalities:
Tabular
Text
Formats:
parquet
ArXiv:
Libraries:
Datasets
Dask
License:

OCR or not classifier

#6
by MaartenMarx - opened

Could you provide the details of the OCR or not binary classifier? I'd love to see the precise features. Or better, could you make the whole dataset available? Thanks!

FineData org

Hi, yes we will definitely release that. We will be releasing the full code in upcoming week :)

Hi @hynky ,
I'd really like to see how you identified if a document needed to be OCRed or not with the XGBoost classifier - can you make the code, and that dataset available, please?

FineData org

Hi, we have released the classifier today!
Check it out here: https://github.com/huggingface/finepdfs

Thanks a lot!

Indeed, thanks a lot. Very useful indeed, both the dataset and the notebook!

Hi @hynky ,

You used a really creative feature set. This looks really cool. I wondered, whether you also tried to predict OCRed per page and then somehow aggregate the scores. I am working with PDFs which have this feature, parts are OCRed and parts not, and the parts are separated at page-level. The reason is that they OCR a page when they have done some text-redacting on the page. Basically, when redacted, they have removed all text, probably just to be sure.
Also, when you look at the top-k used features, the top looks somehow arbitrary and maybe trainset dependent, with certain pages being used more than others.

Cheers!
Maarten

FineData org
โ€ข
edited 4 days ago

The reason is that they OCR a page when they have done some text-redacting on the page. Basically, when redacted, they have removed all text, probably just to be sure.

I see your point, one of the prime reason, why we decided to treat is document classifier instead of per page is because it vastly simplifies the logic as well as resource allocation (we really strived to maximize gpu usage as we didn't want to waste hours).

Also, when you look at the top-k used features, the top looks somehow arbitrary and maybe trainset dependent, with certain pages being used more than others.

Good point, i actually never checked cross pages (only if there are document level features that would be totally useless). Interesting we should have probably shuffled the pages more. We did test using just one page (without any mixing) and it was worse (unsupringly), but we should have probably try majority voting using random pages, prob would work/the same better.

Sign up or log in to comment