DANIEL
End-to-end reader of handwritten pages that outputs text, layout and named entity tokens.
Documents and OCR · 313 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Documents and OCR
- Parameters
- 148.6M
- Operations
- 313
- Framework
- PyTorch
- Recurrent
- No
- Published
- International Journal on Document Analysis and Recognition (IJDAR) (arXiv 2024)
- Cited by
- 10 (as of 28 October 2026)
- Authors
- Thomas Constum, Pierrick Tranouez, Thierry Paquet
- Source
- GitHub: Shulk97/daniel
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m15536
- Graph hash
- 4301ed831995a6017289e45c5a9494f54f6cd3b5b7746eb05ff532f0f1c87a88
- Skeleton hash
- 10ace217d151e2ba553106560bb16423167fa47da053d517cea1c42c90a5f38f
- Architecture hash
- 93129e338ecf7ac5685ff8293679052c691e7d52205ddcf995f0518c1d660df3
- Diagram SHA-256
- 08eb898f5237f20f6dce72d41b21780f4d1c193517d480bd437177419270e6ed
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
DANIEL reads a full page of handwriting and produces its text, layout and named entities with a single end-to-end model, in place of separate layout analysis, text recognition and entity recognition steps. It takes two inputs, an image and a start token that tells the model which task to perform, and outputs a sequence of subword, layout and named entity tokens.
The encoder is fully convolutional, an up-scaled version of the DAN encoder, so it can handle document images of any size and aspect ratio without resizing. Its feature map is summed with a 2D positional encoding and flattened before it reaches the decoder. The decoder is the first 4 transformer blocks of the mBART decoder, and it predicts subwords, not single characters.
Predicting subwords means fewer tokens for the same text, which the paper gives as the likely reason DANIEL is at least 4.8 times faster than DAN at inference. Pre-training uses a synthetic page generator with 600 handwritten fonts and texts in English, French and German. DANIEL has been evaluated for handwritten text recognition on READ 2016, RIMES 2009, IAM and M-POPP, and for named entity recognition on IAM NER and M-POPP NER.
Key idea. DANIEL pairs a fully convolutional encoder that accepts any image size with a pre-trained transformer language model decoder to recognize layout, handwriting and named entities on full pages.
- DANIEL
- Document Attention Network for Information Extraction and Labelling
- handwritten text recognition
- HTR
- named entity recognition
- handwritten document understanding
- full-page handwriting recognition
- information extraction
- layout recognition
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{constum2024danielfastdocumentattention,
title={DANIEL: A fast Document Attention Network for Information Extraction and Labelling of handwritten documents},
author={Thomas Constum and Pierrick Tranouez and Thierry Paquet},
year={2024},
eprint={2407.09103},
archivePrefix={arXiv},
primaryClass={cs.AI},
doi={https://doi.org/10.1007/s10032-024-00511-9},
url={https://arxiv.org/abs/2407.09103},
}