All models

DAN

An end-to-end network that reads whole handwritten pages into characters and layout tokens without line segmentation.

Documents and OCR · 681 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (29 KB)

Open in a new tab

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

Family
DAN
Parameters
7M
Operations
681
Framework
PyTorch
Recurrent
No
Published
IEEE TPAMI 2023
Cited by
2 (as of 28 October 2026)
Authors
Denis Coquenet, Clément Chatelain, Thierry Paquet
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m15533
Graph hash
004d303ba6572b3ab3cc1c929f52487b83dbebbfeedad072d0bee8bde7654a0d
Skeleton hash
b33e0d4d49ca656eeea1d6a8ae60a16e647490f700697aa0a89bd74f3654ba8d
Architecture hash
5c31958aabf92015d3c7eadeec3dc4452a17dd4da2428cc7d4d8ab015dcbb038
Diagram SHA-256
a774017d962444d20bec650b3ac990d9f7fadad0460d5a7efeb7fd249cc64b9e
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

DAN, the Document Attention Network, takes a whole handwritten document image and writes out its text one character at a time, without first cutting the page into lines. Handwritten text recognition is traditionally handled in two steps, line segmentation followed by text line recognition. The authors present DAN as the first end-to-end segmentation-free architecture for handwritten document recognition.

The model is made up of an FCN encoder for feature extraction and a stack of transformer decoder layers that predict one token after another. Besides recognizing text, it is trained to label text parts using begin and end tags in an XML-like fashion. It is trained without using any segmentation label. The README adds that the model uses a character-level attention to handle slanted lines.

On the READ 2016 dataset the paper reports a CER of 3.43% at page level and 3.70% at double-page level. On the RIMES 2009 dataset at page level it reports a CER of 4.54%. The training recipe in the repository pre-trains on synthetic lines before training the DAN itself.

Key idea. DAN recognizes whole handwritten documents end to end without line segmentation, using an FCN encoder and transformer decoder layers to output characters and logical layout tokens.

  • dan
  • document attention network
  • handwritten document recognition
  • handwritten text recognition
  • segmentation-free recognition
  • layout recognition
  • handwriting ocr
  • read 2016
  • rimes

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{coquenet2022dansegmentationfreedocumentattention,
      title={DAN: a Segmentation-free Document Attention Network for Handwritten Document Recognition}, 
      author={Denis Coquenet and Clément Chatelain and Thierry Paquet},
      year={2022},
      eprint={2203.12273},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      doi={https://doi.org/10.1109/TPAMI.2023.3235826},
      url={https://arxiv.org/abs/2203.12273}, 
}