320 points · by reddmachine · 3d ago · 62 comments
0) some preprocessing steps (contrast/brightness)
1) layout detection by paddle [0]
2) layout detection by granite docling heron [1]
3) a smart merging algorithm, eg non overlapping surface maximization. Just ask your llm and iterqte a bit.
4) Custom models for table areas [3] and text nodes [4]
-
5) Optional: postprocessing with gemma for structured output
I am now reaching >99% accuracy for invoice and receipt scanning. Even low quality pictures in bad light usually come out fine. 0: https://www.paddleocr.ai/main/en/version3.x/algorithm/PP-StructureV3/PP-StructureV3.html
1: https://docling-project.github.io/docling/usage/model_catalog/#stages-and-models-overview
3: currently mobile, I will complete these later, don't know the exact models by heart
4:I would love to have an internal stack.
Speed and cost are an issue right now.
For the preprocessing, I forgot to mention that I also DO use paddle here: I combine usage of (paddle) PP-LCNet and (paddle) UVDoc for page rotation and straightening. [0] [1]
For OCR of detailed text fragments, I use MinerU2.5-Pro-2605-1.2B (Q8_0) with some blank detection (i.e. if the response is blank, I try some variations with widening pixels at each edge and brightness/contrast). [2]
For tables, the full pipeline looks as follows: - (paddle) PP-LCNet for detecting which kind of table: bordered or borderless [3] - (paddle) SLANet Plus is used to propose a cell grid. However results here are not always adequate, as such: we also run MinerU's UnetStructure for bordered tables or if SLANet plus output is bad (low cell count). [3] [4] - For the text extraction step, we use (paddle) PP-OCRv6 Small to detect the areas, then the regular mineru for the real text extraction. [5] [2] - A final step is to reassemble the tables in to html, this is more procedural/code based.
If interested, I can maybe extract relevant parts into a custom pipeline and push it, though the code is not polished.
[0] https://huggingface.co/PaddlePaddle/PP-LCNet_x1_0_doc_ori_onnx
[1] https://huggingface.co/PaddlePaddle/UVDoc_onnx
[2] https://huggingface.co/mradermacher/MinerU2.5-Pro-2605-1.2B-GGUF
[3] https://www.paddleocr.ai/v3.3.1/en/version3.x/module_usage/table_structure_recognition.html
[4] https://github.com/opendatalab/MinerU/blob/79d6d8d79fb8f3ddba5cc34c07a16f0ec36f56c7/mineru/model/table/rec/unet_table/table_structure_unet.py
[5] https://www.paddleocr.ai/main/en/version3.x/module_usage/text_detection.htmlMight be a bit clearer than my stacked comments that are all over the place.
Basically the gist of it is, use paddle for most stuff, improve where relevant with some mineru and heron detections. Build in fallbacks - at every step.
I’m excited to try this out with an ocr pipeline using a lightweight decision engine (not decision model) to route to either general ocr or know table schema extraction) like in legal where you know evidence might satisfy some schema but other stuff is just pdfs
According to the announcement 1080 × 1920 px = 2,042 input tokens and a receipt would just cost $0.00049 @ $0.24 per million. Or like 1000 pages is like $0.49
That is like 8x cheaper than something like Mistral OCR 4.1 @ $4 per 1000 pages
The benchmarks also look good. have to try it out
e.g. with their receipt example I'd like to extract all the unique items with counts + whatever other metadata.
I've read this and their previous preview post, but couldn't find any information about the forecasting capabilities of these models. Do they explain anywhere what are the forecasts based on? How was the model trained for forecasting? Is it just using whatever pretraining data Qwen3.8b was trained on, or did they post-train specifically for forecasting?
Just te-ran the basic tests that I had made and it is quite comparable now (both make very few errors). Though flash and full are 2x and 5x more expensive.
I was somewhat off-put by inconsistencies in Scaledown's docs and messaging about ZDR (the docs say they send to AWS textract), and their responses in discord and email were slow and lazy. Though they did say that it's all in-house now, but still haven't updated the docs.
It left me uneasy about the whole thing - even questioning the claims, and whether they have SOC II etc...
The prices are sufficiently low that I'm more comfortable going with one of the Clairic models for now.
for those interested
ScaleDown Extract
Task Specific Model built for extraction task
Finished · 4.66s
GPT-6 Astra
General Purpose Frontier LLM
Finished · 2.28s
also, they didn't ask me for any credentials so I presume they even paid OpenAI for that comparison, tooAnd they have Cloudflare/Google levels of support (seemingly almost non-existent, which they don't have the reputation to justify). I just told them this in their Discord...
Unfortunately I'm woefully under-resourced to self-host even a quantized version yet (though an M-series Max with 32GB of RAM is sufficient for very low-volume uses with clairic-flash or a quantized clairic, and 64GB with Ultra is where you can start looking at low-volume uses with the full model, unquantized)
But cloudflare provides limited, free access to clairic via their AI workers service, and the price for using it in excess of the free tier seems pretty reasonable to me.
It supports images, but not video.
Does anyone know similiar model that works best for general-purpose?
I can open multiple PDFs on my screen, take a picture of it with my phone and then ask it to analyze all documents visible. I've never had it not handle something a human would be expected to.
Being strongly typed means that once you define a schema, you know you'll get a response back in that shape (syntax is fixed, semantics varies with model strength).
Bit surprised at the pricing though. More than double Jev?
Guessing that's because of wider document support?
First of all, everyone is using a different POS system, which makes it difficult for something like a QR code to be integrated, which at times needs to be fetched using an api endpoint. Second of all, where are these invoices being hosted, then? Invoices often have private information like names and digits of card numbers, and we don't want that leaking. A company like Stripe could do it. For others it would create a dependency like a link shortener. There's not a lot of information that can be stored in the qr code itself.
I think, atleast here in the US, the government doesn't mandate any specific format for invoices, just that it has certain information like those required by IRS recordkeeping rules.
Essentially, the reason this product niche around invoice/receipt scanning exists is because the person receiving it doesn't have control over the format and can't require (within reason anyways) that it has this QR code on it
QR codes are pretty wasteful, there are better options.
The only way to change this imho is by changing the structural politics of the US. This was the Business Plot just executed more slowly over time (or evolved into it naturally).
On the contrary, I think companies calling standard AI products “superintelligence” are risking future lawsuits for misleading investors.