
Historical documents page classifier - ATRIUM
Sorts scanned pages of archival documents into 11 content categories, which describe each page for review, search and later analysis: running text, tables and forms, drawings and photographs, with printed, typed or handwritten text. The categories (DRAW, DRAW_L, LINE_HW, LINE_P, LINE_T, PHOTO, PHOTO_L, TEXT, TEXT_HW, TEXT_P, TEXT_T) were formed from archival documents of 1920–2020. Only the page image is used, so the language of the page does not matter. The tool is meant for scans of paper documents; its labels for born-digital pages have not been checked.
Fine-tuned Vision Transformer, RegNetY and EfficientNetV2 models, used singly or as an averaged ensemble, are published on the Hugging Face Hub; they were trained on manually annotated pages released at LINDAT. For each page the tool keeps the best-ranked categories with their scores, as CSV tables or JSON, and records the provenance of every run (paradata). It also covers PDF-to-image preparation, training and evaluation.
Command-line tool, or REST API container image (ghcr.io/ufal/atrium-page-classification-api): /predict_image for a page image (PNG, JPEG, TIFF or another common format), /predict_document for a PDF, every page or a selection of them. Both read the same inputs, render PDF pages at 300 dpi and average the ensemble the same way.
In the ATRIUM pipeline the classifier runs beside AIS CR's text recognition, on the pages that need it and on the pages that show a picture, a chart or a drawing; for an office document it reads the PDF that the ATRIUM born-digital converter rendered. It adds its categories to the page rows of the ATRIUM document record that the OCR post-processor builds, and its paradata state which pages were selected and by which rule. The category describes a page: nothing in the pipeline routes on it. The record and who writes what in it: the document contract.
The code is MIT.
| Component | Licence | Used when |
|---|---|---|
Fine-tuned models (ufal/vit-historical-page) | CC BY-NC 4.0 | Always. Trained on the dataset below; v4.3 and v4.4, and so the ensemble, are also fine-tuned from Meta's SWAG weights (CC BY-NC 4.0). |
| LINDAT training dataset | CC BY-NC 4.0 | Training and evaluation. |
| Ultralytics YOLO (optional backend) | AGPL-3.0 | Only when the YOLO backend is selected. |
| pypdfium2 (PDFium) | Apache-2.0 or BSD-3-Clause | A PDF is rendered, by the service or the command line. |
Each run lists the components it used, each with its own licence or terms. None of these is the licence of the output: the rights in an output depend first on the source document, and only their holder can state them (Licences and paradata).

Related items(2)
Workflow Tool or service OCR output post-processing and quality control (text-line categorization) - ATRIUM
The SSH Open Marketplace is maintained and will be further developed by three European Research Infrastructures - DARIAH, CLARIN and CESSDA - and their national partners. It was developed as part of the "Social Sciences and Humanities Open Cloud" SSHOC project, European Union's Horizon 2020 project call H2020-INFRAEOSC-04-2018, grant agreement #823782.


