OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Donut

Donut is an OCR-free document-understanding transformer implementation for classifying document images and extracting structured information, accompanied by SynthDoG, a synthetic document generator.

Independent OpenViST project profile, based on linked sources.

Donut — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Donut when a document-image workflow needs classification or structured extraction without a separate OCR stage, or when exploring synthetic data generation for document-model pretraining.

Who it is for

  • Researchers exploring visual document understanding.
  • Developers prototyping document classification or information extraction from images.
  • Teams preparing synthetic document data for model pretraining.

Documented uses

  • Turn document images into structured JSON predictions without a separate OCR engine or API.
  • Classify document images, such as reports or presentations.
  • Generate synthetic document datasets with SynthDoG.
Before you choose

Requirements & limits

The implementation is a public GitHub repository released under the MIT license. The README also lists hosted Gradio and Google Colab demos.

  • Training and inference use JSON predictions, with task targets prepared as gt_parse or gt_parses in a JSON Lines dataset.
  • The repository lists pretrained examples for CORD receipts, train tickets, RVL-CDIP classification and document visual question answering.
  • The documented local setup uses Python 3.7 and specifies tested versions for its main deep-learning dependencies.
  • The repository warns that changes in key dependencies can make the testing environment more difficult to configure and points to Colab demos.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install Donut from the repository

Set up the Donut Python package using the repository's documented Conda installation path.

Before you start

  • Git and Conda are available.
  • The documented environment uses Python 3.7.

Steps

  1. Clone the repository: the command below.

    Documented command
    git clone https://github.com/clovaai/donut.git
  2. Enter the repository directory: cd donut/.

  3. Create and activate the environment: conda create -n donut_official python=3.7 followed by conda activate donut_official.

  4. Install the package and its dependencies with the command below.

    Documented command
    pip install .

Expected outcome

The repository package and dependencies are installed in the `donut_official` Conda environment.

Guide limitations

  • The README reports configuration challenges with recent dependency updates; the listed tested versions are donut-python 1.0.1, torch 1.11.0+cu113, torchvision 0.12.0+cu113, pytorch-lightning 1.6.4, transformers 4.11.3, and timm 0.5.4.
  • This recipe documents installation only, not model execution or training.
Source-based practical guide

Prepare a dataset in Donut's documented structure

Arrange document images and JSONL metadata for Donut training or inference.

Before you start

  • Document images and corresponding ground-truth parses are available.
  • The task's ground truth can be represented as JSON.

Steps

  1. Create train, validation, and test directories under the dataset directory.

  2. Place each split's metadata.jsonl and image files in its respective directory.

  3. In each JSONL line, provide file_name as a relative image path and ground_truth as a JSON-dumped string containing gt_parse or gt_parses.

  4. Format each parse for the task; for classification, use a class field, and for information extraction, provide the document information as a JSON object.

Expected outcome

The dataset follows the directory and metadata format expected by the documented Donut pipeline.

Guide limitations

  • The instructions cover data preparation, not commands for starting training or inference.
  • Other metadata fields may be included but are not used by Donut.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
15 October 2026
Original website title
clovaai/donut · Official homepage title · retained in its source language