alt.hn

1/20/2026 at 1:10:08 PM

Show HN: Ocrbase – pdf → .md/.json document OCR and structured extraction API

https://github.com/majcheradam/ocrbase

by adammajcher

1/20/2026 at 4:12:15 PM

This is essentially a (vibe-coded?) wrapper around PaddleOCR: https://github.com/PaddlePaddle/PaddleOCR

The "guts" are here: https://github.com/majcheradam/ocrbase/blob/7706ef79493c47e8...

by sync

1/20/2026 at 6:34:18 PM

Most production software is wrappers around existing libraries. The relevant question is whether this wrapper adds operational or usability value, not whether it reimplements OCR. If there are architectural or reliability concerns, it’d be more useful to call those out directly.

by M4R5H4LL

1/20/2026 at 7:21:48 PM

Sure. The self host guide tells me to enter my github secret, in plain-text, in an env file. But it doesn't tell me why I should do that.

Do people actually store their secrets in plain text on the file system in production environments? Just seems a bit wild to me.

by tuwtuwtuwtuw

1/20/2026 at 8:22:44 PM

well, you can use secrets manager as well

by adammajcher

1/20/2026 at 4:59:53 PM

Claude is included in the contributors, so the OP didn’t hide it

by Oras

1/20/2026 at 5:46:54 PM

At this point it feels like HN is becoming more like Reddit, most people upvote before actually checking the repo.

by Tiberium

1/20/2026 at 4:18:11 PM

What matters most is how well OCR and structured data extraction tools handle documents with high variation at production scale. In real workflows like accounting, every invoice, purchase order, or contract can look different. The extraction system must still work reliably across these variations with minimal ongoing tweaks.

Equally important is how easily you can build a human-in-the-loop review layer on top of the tool. This is needed not only to improve accuracy, but also for compliance—especially in regulated industries like insurance.

Other tools in this space:

LLMWhisperer/Unstract(AGPL)

Reducto

Extend Ai

LLamaparse

Docling

by constantinum

1/20/2026 at 8:03:22 PM

This is admittedly dated but even back in December 2023 GPT-4 with it's Vision preview was able to very reliably do structured extraction, and I'd imagine Gemini 3 Flash is much better than back then.

https://binal.pub/2023/12/structured-ocr-with-gpt-vision/

Back of the napkin math (which I could be messing up completely) but I think you could process a 100 page PDF for ~$0.50 or less using Gemini 3 Flash?

>560 input tokens per page * 100 pages = 56000 tokens = $0.028 input ($0.5/m input tokens) >~1000 output tokens per page * 100 pages = $0.30 output ($3/m output tokens)

(https://ai.google.dev/gemini-api/docs/gemini-3#media_resolut...)

by binalpatel

1/20/2026 at 8:18:01 PM

sure, in some small projects I recommend my friends to use gemini 3 flash. ocrbase is aimed more at scale and self-hosting: fixed infra cost, high throughput, and no data leaving your environment. at large volumes, that tradeoff starts to matter more than per-100-page pricing

by adammajcher

1/20/2026 at 3:20:25 PM

How this is better over Surya/Marker or kreuzberg https://github.com/kreuzberg-dev/kreuzberg.

by v3ss0n

1/20/2026 at 3:53:52 PM

Sounds like someone needs to run their own test cases and report back on which solution does a better job...

by jadbox

1/20/2026 at 6:16:57 PM

Let me fire up Claude code.

by kspacewalk2

1/20/2026 at 6:18:37 PM

Let me fire up Tesseract.

https://github.com/tesseract-ocr

by sixtyj

1/20/2026 at 7:17:51 PM

I fought with Tesseract for quite a while. Its good if high accuracy doesn't matter. Transcribing a book from clean, consistent non-skewed data its fine and an LLM might even be able to clean it up. But for legal or accounting data from hand scanned documents, the error rate made it untenable. Even clean, scanned documents of the same category have all sorts of density and skew anomalies that get misinterpreted. You'll pull your hair out trying to account for edge cases and never get the results you need even with numerous adjustments and model retraining on errors.

Flash 2.5 or 3 with thinking gave the best results.

by Jimmc414

1/20/2026 at 9:02:23 PM

Thanks. I was surprised that Tesseract had recognized poorly scanned magazines and with some Python library I was able to transcribe two-columns layout with almost no errors.

Tesseract is a cheap solution as it doesn’t touch any LLM.

For invoices, Gemini flash is really good, for sure, and you receive “sorted” data as well. So definitely thumbs up. I use it for transcription of difficult magazine layout.

I think that for such legally problematic usage as companies don’t like to share financial data with Google, it is be better to use a local model.

Ollama or HuggingFace has a lot of them.

by sixtyj

1/22/2026 at 3:16:36 PM

Surya is a lot better in that.

by v3ss0n

1/20/2026 at 2:19:59 PM

I have a flow where i extract text from a pdf with pdf-parse and then feed that to an ai for data extraction. If that fails i convert it to a png and send the image for data extraction. This works very well and would presumably be far cheaper as i'm generally sending text to the model instead of relying on images. Isn't just sending the images for ocr significantly more expensive?

by hersko

1/20/2026 at 3:27:12 PM

I always render an image and OCR that so I don’t get odd problems from invisible text and it also avoids being affected by anything for SEO.

by trollbridge

1/20/2026 at 2:47:06 PM

By definition, OCR means optical character recognition. It depends on the contents of the PDF what kind of extraction methodology can work. Often some available PDFs are just scans of printed documents or handwritten notes. If machine readable text is available your approach is great.

by mimim1mi

1/20/2026 at 6:21:34 PM

I have seen this flow in what people in some startups call "Agentic OCR", its essentially a control flow that is coded that tries pdf-parse first or a similar non expensive approach, and if it fails a threshold then use screenshot to text extraction.

by unrahul

1/20/2026 at 2:55:43 PM

How does this compare to dots.ocr? I got fantastic results when I tested dots.

https://github.com/rednote-hilab/dots.ocr

by sgc

1/20/2026 at 3:15:31 PM

Ocrbase is CUDA only while dots.ocr uses vLLM, so should support ROCm/AMD cards?

by mjrpes

1/20/2026 at 4:05:35 PM

How about CPU?

by actionfromafar

1/21/2026 at 5:06:46 AM

dots.ocr requires requires a considerable amount of computational resources. If you have Mac device with ARM CPU(M series), you can try my dots.ocr.runner(https://github.com/jason-ni/app.dots.ocr.runner).

There is a pipeline solution with multiple small specific models that can run only with CPU: https://github.com/RapidAI/RapidOCR

by jasonni

1/21/2026 at 7:22:49 AM

Jason, your runner looks interesting. I am using debian linux on my laptop with an intel cpu and nvidia gpu (proprietary nvidia cuda drivers). Should I be able to get it working? What is your speed per page at this point? Thank you

by sgc

1/20/2026 at 7:17:21 PM

Why is 12GB+ VRAM a requirement? The OCR model looks kind of small, https://huggingface.co/PaddlePaddle/PaddleOCR-VL/tree/main, so I'm assuming it is some processing afterwards it would be used for.

by cess11

1/20/2026 at 8:36:40 PM

fixed

by adammajcher

1/20/2026 at 9:29:51 PM

OK, thanks, so it runs on a couple GB of CUDA?

by cess11

1/20/2026 at 9:36:59 PM

having worked with paddleocr, tesseract and many other ocr tools before this is still one of the best and smoothest ocr experiences ive ever had, deployed in minutes

by fmirkowski

1/20/2026 at 2:10:27 PM

Is only bun supported or also regular node?

by mechazawa

1/20/2026 at 8:26:25 PM

it's bun first because of performance

by adammajcher

1/22/2026 at 12:28:40 PM

performance for a tool like this isn't really a huge priority imho. Libraries should have compatibility as a priority over performance unless it's the stated goal.

by mechazawa

1/21/2026 at 10:06:38 AM

Awesome idea!

by woocash99

1/21/2026 at 10:06:53 AM

Very useful!

by woocash99