Clairic graduates from preview, while Clairic-flash joins the repertoire on Workers AI. We’re doing an open-weight release for both extraction models.
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: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.
EDIT: formatting (list items were not on new lines)
[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.htmlOpenRouter uses cloudflare as it's api provider for the file parsing for LLMs that may not support files natively, but in some personal benchmarks the mistral's version of the OpenRouter file processing performed better (with GLM 5.3 Flash as the "backend").
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
Read the full thread on Hacker News →
Related stories
- DEV Community · 1 points · 2 months ago
- Hacker News · 1 points · 2 months ago
- Amazon releases its first open-weight model, Ergotechcrunch.comHacker News · 117 points · about 16 hours ago
- The Economics of Open-Weight Inferencedata.ornn.comHacker News · 36 points · 2 months ago
- Hacker News · 2 points · 2 months ago
- Hacker News · 1 points · 4 days ago