View Single Post
Old Today, 02:29 AM   #13
notimp
Addict
notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.notimp ought to be getting tired of karma fortunes by now.
 
Posts: 260
Karma: 892441
Join Date: Jul 2010
Device: K2i
No, I'm not acting in a PR position for any software company. Much less one that has people out there so focused on pampering every feedback from others just to namedrop their product a few more times -


https://old.reddit.com/r/LocalLLaMA/...d_paddleocrvl/

Our conversations distinctly had the feel of talking to an AI at times, and I'm not particularly interested in moving that forward.

Quote:
once recognition accuracy becomes sufficiently high, the remaining bottleneck may shift from OCR itself to document structure, proofreading, paragraph reconstruction, and intelligent post-processing
- document structure recognition gets better alongside OCR capabilities if you are comparing VLM models
- proofreading becomes less important as recognition accuracy becomes sufficiently high (also this is independent from structural errors which you usually catch in a manual pass before proof reading)
- Paragraph reconstruction doesnt exist outside the blackbox of the VLM that is either capable of dealing with warped text or not, or tagging a textblock as one unit (paragraph) or not. Paragraph catregorisation based on page position (aka first paragraph on a page?) afterwards is an advanced user "nice to have". But no one in here worked with it for the better part of seven years - because they werent using the better workflows (out of finereader) that the german scene was capable of using. Because they didnt compare the capability of OCR software even once, critically.

and

- and intelligent post-processing, is a nothing burger, if you dont differenciate it in regex based or LLM based. The regex based one will always be closely married to the OCR engine you picked, while LLM based one will run into issues on low end devices with a max of 5GB of VRAM as soon as you even start thinking about it. And even if you feed it chapters will take ages, be hallucination prone, ... (the smaller the model) -- So I usually have stuck to regex based "intelligent post processing" for the time being.

Regex in itself isnt built for parsing large volumes of text. But with the help of "sentence end marks (see other thread)" and paragraph end and paragraph start html tags you can make it to even more complicated task like pulling together paragraphs. (Does that qualify as paragraph reconstruction?)

But then again - even Regex based intelligent post processing has its limits.

But yes - in workflows with proper OCR, pulling together hyphenated words, that were missed by auto de-hyphanation in the VLM now does more for "text integrity" that checking the high likelyhood of failure sections (i.e. warped parts of the page where the VLM has to do predictive text reconstruction) manually. That was the point I was trying to make.

If the input quality is good enough - which it is, even in Smartphone photos > Cam Scanner (dewarping, whitening) based workflows.

To be precise on the previous users point. Headlines not being recognized as headlines happens, but they usually never get recognized as Plain Text by MinerU, MistralOCR, or Finereader either. So they usually always carry some form of special formating. Which makes them easier to recognize in a manual control pass.

Sigil then has the tools to pull them to a unified headline "hirarchy" (h2) and insert the missing chapter splits (that the md to epub tool only did on recognized headlines).

This step MAY be easier to do on the md file itself if you try to apply "intelligent postprocessing" using anything like regex based pattern recognition, because at that point it is one file still, and not split into several htmls as it would be in an epub. (Hadnt mentioned that before.)

Also let me emphasize once more, that it is necessary to be able to get GPU (cuda usually) acceleration for VLM models - or you can forget to make the workflow to work in any reasonable timeframes. Which is a stumbling block for "a unified mobile workflow".

But the workflow I made at least was concept tested on a Macbook Neo with a mobile processor and only 5GB of VRAM use, so we are very close.

The difference between Paddle-OCR and MinerU is kind of large in terms of recognized text quality and might be larger than the one benchmark score suggests, but if you need it to be run on CPU i guess you are stuck with Paddle-OCR.

If you need to compare them quality wise for warped pages - use this text image:
https://github.com/hexgrad/kokoro/is...ent-5699959920

And of you are interested in finding out where your stumbling blocks are with the workflow you implemented in the tool you are promoting - just test it already. Shortcomings will become apparent during use.

Last edited by notimp; Today at 06:21 PM.
notimp is offline   Reply With Quote