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.
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.
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
Clone the repository: the command below.
git clone https://github.com/clovaai/donut.gitEnter the repository directory:
cd donut/.Create and activate the environment:
conda create -n donut_official python=3.7followed byconda activate donut_official.Install the package and its dependencies with the command below.
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.
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
Create
train,validation, andtestdirectories under the dataset directory.Place each split's
metadata.jsonland image files in its respective directory.In each JSONL line, provide
file_nameas a relative image path andground_truthas a JSON-dumped string containinggt_parseorgt_parses.Format each parse for the task; for classification, use a
classfield, 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.
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

