Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 02:27 AM   #16
NurViewer
Member
NurViewer began at the beginning.
 
NurViewer's Avatar
 
Posts: 24
Karma: 10
Join Date: Nov 2026
Device: Windows PC / Android tablet (Lenovo Xiaoxin Pad Pro 12.7)
Quote:
Originally Posted by notimp View Post
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.


- 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.
notimp, you are right on both counts, and I'll take the criticism plainly.

My earlier replies were polite and long but gave you nothing you could check. That is on me. I'll keep this one short and concrete.

What your posts changed in our plan (written down before this reply, not as a thank-you gesture):

1. Whitening without eating glyph edges. We ran our pipeline on real CamScanner-processed pages and found exactly what you describe: our "remove show-through" step thinned fine print and left blocks in photos, so it is now off by default. The paper whitening that replaced it works per colour channel against a locally estimated paper level and keeps text and picture areas as they were.
2. Double pages. We crop the neighbouring page away by default; after your post we are adding "keep the double page / split into two pages / keep only this page", since double pages are what makes phone scanning fast.
3. Page numbers and running heads. We are adding a detection step before OCR that marks lines at the top/bottom that are only numbers, so they can be confirmed and removed before paragraphs are merged.
4. The manual check is 4/5 of your time. We are building a side-by-side page-image / recognised-text view that marks low-confidence words and the warped zones near the spine, instead of leaving you to read every page.
5. Your post-processing order (drop page numbers, merge paragraphs that do not end in sentence punctuation, tag "first paragraph on a page", leave a manual pass for hyphens) is how we are shaping a scan-to-reflowable-EPUB step, which we do not have yet. Our current output is a searchable PDF, which is exactly the "pages left as pictures" problem.
6. Not reducing to black and white: noted; our B/W filter stays an optional output, not an OCR input.

On the MinerU point: it is already inside the app, running on CPU through llama.cpp (a quantised GGUF). It is slow: about 1.5 minutes for one Japanese vertical-text page on a 2014 laptop, about 2.5 minutes on a mid-range phone. So your conclusion about a CPU-only app is fair for whole books, and I will not claim otherwise. I have not yet run your "worst of 50 double pages" test image through it; if you can attach it to the thread, I will post the actual output, including where it fails.

Thank you for the detailed workflow notes; they were more useful than anything else in the thread.
NurViewer is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub to PDF - specific letters are transparent and MISSING Jam Conversion 14 05-31-2024 02:31 PM
PDF to EPUB - Missing bookmarks / index miral Calibre 1 03-17-2023 11:39 AM
ePUB -> PDF: Table of Contents Missing enigmalea Conversion 2 12-21-2021 09:09 AM
PDF to EPUB conversion missing text Marvinator Conversion 3 04-23-2021 01:37 PM
PDF to EPUB missing illustrations dpeace Calibre 1 01-01-2011 01:27 PM


All times are GMT -4. The time now is 12:21 PM.


MobileRead.com is a privately owned, operated and funded community.