Donut

Donut

โ˜… 4 ๐Ÿ”– 2500 saves ๐Ÿ’ฐ Free GitHub

Donut is the official implementation of the OCR-free Document Understanding Transformer from NAVER’s CLOVA AI team, presented at ECCV 2022. Instead of running OCR first and language modeling second, Donut reads a document image end-to-end and directly outputs the structured information you asked for. The repository has earned about 6,900 stars on GitHub, is MIT licensed, and was last updated in 2024.

Overview

Classic document AI pipelines chain an OCR engine to a language model, which is brittle: OCR errors cascade, layout information is lost, and each new document type needs new plumbing. Donut replaces that chain with a single vision-encoder/decoder transformer โ€” a Swin Transformer encoder reads the page image, and a BART-style decoder generates JSON-like output for tasks such as document classification, information extraction and visual question answering. Training such a model needs lots of annotated documents, so the repo also includes SynthDoG, a synthetic document generator that creates training data on the fly. Pre-trained and fine-tuned checkpoints are published on Hugging Face, covering tasks like receipt understanding (CORD) and document VQA, and the codebase remains a reference implementation for OCR-free document understanding research.

Key Features

  • End-to-end, OCR-free document understanding with a single transformer model
  • Outputs structured JSON for extraction, classification and document VQA tasks
  • SynthDoG synthetic document generator for training data at scale
  • Pre-trained and fine-tuned checkpoints available on Hugging Face
  • Training and inference code for popular benchmarks such as CORD and DocVQA
  • MIT licensed, from the NAVER CLOVA research team

๐Ÿ’ณ Pricing

Free. Donut is open source under the MIT license, and the model weights are publicly available; there is no paid version.

Who Is It For

ML engineers and researchers building document-processing systems โ€” receipts, forms, invoices and reports โ€” who want a modern, OCR-free baseline that turns page images directly into structured data.

๐Ÿš€ Visit Donut Official Site

๐Ÿšฉ Report an issue