// Research / Computer Vision

Document AI& OCR pipelines that survive real scans.

OCR is solved on clean PDFs. Real document processing is layout-aware extraction, invoice line-item parsing, HTR, multilingual scans, and pipelines that know when to ask a human. We shipped the engine behind EasyDocs.

// What we see

Cloud OCR hits 95% on the vendor's demo docs. Yours aren't demo docs.

01

Hosted services fail quietly on your actual document mix

Azure Document Intelligence and Google Document AI quote accuracy on clean invoices. Your mix includes faxed contracts, photographed receipts, handwritten corrections, Polish or German documents no US vendor optimizes for.

02

Table extraction fails exactly where the value is

Free-text fields OCR passably. Line-item invoice tables, multi-column financial statements, and cross-referenced forms are where extraction matters - and where region-based OCR without layout understanding falls apart.

03

The compliance team needs a data residency answer you can't give yet

Healthcare, legal, and government documents can't go to a US API. 'We'll figure out on-prem later' becomes a 6-month retrofit when the security review lands.

// Case Study

We trained EasyDocs' invoice extraction model

EasyDocs is the platform provider - they ship document management software to their own customers. We trained the fine-tuned NLP model that runs inside it, auto-extracting VAT numbers, totals, and addresses from invoices and learning from every user correction. Deployed on their servers, no external dependencies.

  • 98%

    field-level extraction accuracy

  • <300ms

    inference time per invoice

  • On-prem

    deployment with no external dependencies

Read the case study
We trained EasyDocs' invoice extraction model

// What we deliver

OCR, layout, structure, and the LLM glue.

We pick the right model at each stage of the pipeline rather than forcing one model to do everything badly.

OCR engines, picked per task

Chosen by language, script, and image quality after benchmarking on your data.

  • Surya for multilingual OCR, including Polish and Eastern European scripts
  • PaddleOCR for printed-text speed and CJK scripts
  • Docling for born-digital PDFs with native table preservation
  • Custom-finetuned recognizers for handwriting and domain-specific fonts
  • Tesseract baselines as a sanity check

Layout-aware understanding

Position matters. We use models that know where text sits on the page and how regions relate to each other.

  • LayoutLMv3 for token classification and entity extraction
  • Donut for end-to-end document understanding without OCR
  • Nougat for academic papers, formulas, and multi-column scans
  • Custom heads for forms, invoices, and proprietary templates

Tables, forms, and KV

The hard part of document AI - tables and forms as first-class extraction targets.

  • Camelot and pdfplumber for born-digital PDFs
  • Hybrid CV + LLM pipelines for scanned and photographed tables
  • Key-value extraction with schema validation
  • Multi-page document linking and reading-order recovery

OCR + LLM hybrids

OCR anchors the extraction; the LLM verifies and normalizes.

  • OCR output grounds LLM extraction - no hallucinated structured fields
  • Schema-constrained generation with retry and validation loops
  • Vision LLMs (Gemini 2.5 Flash, GPT-4o, Claude) for clean PDFs
  • Per-field confidence aggregation across CV and LLM signals
  • Open-weight VLMs (Qwen-VL, InternVL, Mistral Pixtral) for on-prem

Hardened for poor inputs

Real documents are crumpled, rotated, faxed, photographed, and partially redacted. The pipeline has to survive all of that.

  • Deskew, dewarp, and binarization preprocessing
  • Multi-resolution OCR for low-DPI scans
  • Robustness benchmarks on synthetic degradations
  • Polish and Eastern European script support out of the box

Audit trail and HITL

Every extraction is traceable, every low-confidence field is reviewable, every change is logged.

  • Field-level confidence and provenance back to source pixels
  • Human-in-loop review queues with adjudication
  • Audit logs suitable for SOC 2, HIPAA, and DORA
  • Active learning: corrections feed back into retraining

// Method fit

Custom pipelines earn their cost over hosted APIs at the edges.

skip it if

  • Your documents are English, well-structured, and clean

    Azure, Google Document AI, and Amazon Textract handle standard English invoices well. Custom is for multilingual, regulated, specialized layouts, or on-prem.

  • You need a fast answer at low volume

    For prototyping or low-volume internal tooling, a vision LLM (Gemini 2.5 Flash, GPT-4o, Claude) with direct PDF input is the fastest path.

  • Your volume is below roughly 10K documents per month

    A custom pipeline's fixed engineering cost isn't justified at low volume - hosted APIs plus a human review queue cover most regulated cases.

use it if

Your document mix includes non-English text, domain identifiers, or layouts hosted services don't cover - and the accuracy gap shows up as errors your operators hand-correct.

Data residency rules out sending documents to a US API, or your security team requires extraction to run inside your VPC or air-gapped environment.

Per-page API cost compounds: at 100K pages per month, the difference between $0.015/page (custom on-prem) and $0.10/page (hosted API) is $100K per year.

You need field-level confidence, active learning from operator corrections, and an audit trail for SOC 2, HIPAA, or DORA.

// How we work

Benchmark on your docs first. Architecture decided after.

Every engagement starts with a held-out sample of your actual documents and a baseline measurement. The pipeline design follows the numbers - we don't recommend a layout model or an OCR engine before we've seen your data.

01

Holdout benchmark on your real documents

A stratified sample of your document types, run against your current state, our baseline candidates, and the hybrid OCR + LLM approach - per-field F1, latency, and cost before integration code.

02

Build the pipeline in your environment

OCR engine selected per document type; layout model - LayoutLMv3, Donut, or Nougat - chosen from your actual documents, plus an LLM verification layer. Runs inside your infrastructure when on-prem is required.

03

Hand off the confidence thresholds and the retraining loop

Per-field confidence thresholds calibrated to your operators' review capacity - surface the 5% needing checks. Active learning feeds corrections back into retraining; audit trail per field; runbook for new document types.

Norbert Ropiak

// Expert insight

The biggest mistake in document AI is treating OCR as the whole problem. The real value is in the structure layer - tables, key-value pairs, reading order - and increasingly in the LLM that normalizes the output. OCR is just the first 30 percent.

Norbert Ropiak

Co-founder @ bards.ai

See our open-source work

// Why bards.ai

We built EasyDocs. We can build yours.

Production document AI in regulated industries. On-prem capable, multilingual, and audit-ready by default.

EasyDocs in production

Our document AI platform runs at 98% field-level accuracy under 300ms per page - on-prem, GDPR-clean, and battle-tested in finance and public sector.

Layout and OCR specialists

LayoutLMv3, Donut, Nougat, Surya - we've trained, fine-tuned, and shipped each in production for real customers.

Native Polish + Eastern European

Our team ships OCR and document models that handle Polish, Czech, Ukrainian, and other scripts that English-first vendors stumble on.

On-prem and air-gapped capable

Healthcare, legal, public sector. We've shipped document pipelines into facilities that block outbound traffic and require signed install bundles.

16+ open-source models on Hugging Face

We publish models as well as deploy them. Several of our OCR and embedding models are public, with 80K+ monthly downloads.

The EasyDocs engineers work on your pipeline

The team that ships EasyDocs - 98% field accuracy, in production in finance and public sector - is the team building your extraction stack.

// FAQ

Common questions about document AI pipelines

They're great when your documents look like generic invoices and you're allowed to send data to a US/EU cloud API. They fall over on domain-specific layouts, multilingual content beyond their training mix, and any environment where data residency rules out cloud OCR. Custom pipelines also unlock per-field confidence calibration that hosted services hide.

For clean, born-digital PDFs at low volume, that's often the right call - fast to ship, surprisingly accurate, no infra to run. It breaks down at scale (cost), on degraded inputs (hallucination from low-quality scans), on long multi-page documents (context window pressure distorts structure), and in any environment where the document can't leave your perimeter. Our typical recommendation is: vision LLM for low-volume clean-doc prototyping, custom pipeline for production at scale or in regulated environments.

Yes - that's our default for regulated customers. The full stack (OCR, layout model, optional LLM) runs on customer-controlled GPUs with no outbound network calls. EasyDocs ships this way and so does most of our document work.

For structured forms with clean scans, 97-99% field-level accuracy is realistic. For semi-structured documents (invoices, contracts) with mixed quality, 92-97% with calibrated confidence and human review on uncertain fields. We always benchmark on a holdout of your real data before promising numbers.

Latin scripts including Polish, Czech, Hungarian, German, French, Spanish, Portuguese; Cyrillic for Ukrainian and Russian; CJK via PaddleOCR and Surya. Domain-specific languages (legal Latin, medical jargon, abbreviations) usually need targeted fine-tuning, which we handle.

We've handled everything from one-page forms to 500-page legal contracts with cross-references, tables that span pages, footnotes, and inline annotations. The architecture changes - Donut for short forms, hierarchical models for long contracts - but the framing stays the same.

Output is structured JSON validated against a schema you define, delivered via REST/gRPC or pushed to a queue/database. We've integrated with SAP, Salesforce, custom ERPs, and document management systems. Every field carries confidence and provenance for downstream policy.

Preprocessing (deskew, dewarp, denoise, binarization) plus multi-resolution OCR plus an LLM verification pass that catches OCR errors via context. For fundamentally unreadable inputs we surface them through the human-review queue rather than guessing - silent guesses are worse than asking.

// Let's ship it

Stop hand-keying documents. Ship a pipeline that doesn't.

Send us a document sample and your target accuracy. We'll come back with a benchmark on a holdout slice and a deployment plan, usually within a business day.

Norbert Ropiak

Norbert Ropiak

Co-founder @ bards.ai