Scale-Aware Feature-Level Encoding
for Historical Document Stamp Detection

Bridging Computer Vision and Digital Humanities
Chelali M., Cloppet F., Kurtz C., Bloch I., and Foliard, D.

Abstract

Administrative stamps play a crucial role in the authentication, validation, and institutional identification of historical documents. However, their analysis remains challenging due to document degradation, shape variability, and non-standardized placement.

We introduce SA-DETR, a transformer-based framework for robust stamp detection in archival photographs. Beyond detection, stamps provide key insights into document provenance and circulation, enabling historians to reconstruct institutional workflows and archival trajectories.

To address strong scale variability, we propose a novel Scale-Aware Positional Encoding (SAPE), which models scale as a continuous signal rather than discrete levels.

Method: Scale-Aware Detection Transformer

Modern DETR-like architectures such as DeepSolo rely on multi-scale feature pyramids to detect objects across a wide range of sizes. However, these approaches encode scale using coarse, discrete embeddings, which fail to capture the continuous scale variations inherent to historical documents.

To address this limitation, we introduce SA-DETR, a detection framework augmented with a novel Scale-Aware Positional Encoding (SAPE) module, which provides Transformer tokens with an explicit and continuous representation of scale.

Global Architecture

SA-DETR global architecture

The model processes document images through a transformer-based detection pipeline, where multi-scale features are enhanced using continuous scale-aware embeddings.

Scale-Aware Positional Encoding (SAPE)

Unlike traditional methods that treat feature pyramid levels as independent entities, SAPE models scale as a continuous manifold, enabling smooth transitions across feature resolutions.

SAPE module

The SAPE embedding is constructed through two complementary components:

This hybrid formulation ensures a coherent integration of multi-resolution features, significantly improving robustness in degraded archival images.

Key Idea

Discrete Scale Encoding ❌ → Continuous Scale Modeling ✅

Instead of relying on discrete feature levels, SA-DETR models scale as a continuous signal, allowing smoother feature interaction and more accurate detection of irregular, faded, and multi-scale stamps in historical documents.

Results

SA-DETR achieves strong performance on challenging historical datasets such as Forbin, HistPostCard, and StaVer, outperforming both traditional detectors and transformer-based baselines.

State-of-the-art performance with +8% improvement

Overall detection performance comparison across the three evaluation datasets. The proposed SA-DETR achieves competitive mAP scores and improves localization precision, particularly under the stricter AP75 metric. Best, second-best, and third-best results in each column are indicated in bold, underlined, and gray bold, respectively.
Forbin HistPostCard StaVer
Method mAP AP50 AP75 mAP AP50 AP75 mAP AP50 AP75
Faster R-CNN 34.06 75.73 25.93 82.60 99.50 94.10 70.84 96.00 78.56
RetinaNet 30.83 72.57 22.61 86.80 100.00 94.10 76.36 95.53 84.20
YOLOv8-s 32.73 73.25 24.83 77.70 94.30 89.20 57.70 81.70 62.20
YOLOv11-s 33.73 74.82 26.02 78.50 94.10 91.80 61.27 81.99 67.99
Deform. DETR 27.79 68.20 18.47 52.20 83.10 64.40 55.34 89.77 61.55
DeepSolo 44.14 68.73 50.31 56.11 92.01 63.53 67.46 95.01 74.02
SA-DETR 46.19 74.91 50.35 76.82 100.00 95.66 70.78 95.48 80.10

These results demonstrate that modeling scale as a continuous signal significantly improves robustness in degraded archival documents, addressing a key challenge in large-scale historical analysis.

Detection results

Citation

If you use this work, please cite:

  
@inproceedings{chelali2026sadetr,
  title={A Scale-aware Vision Transformer-based Approach for Document Stamp Detection},
  author={Chelali, M., Cloppet, F., Kurtz, C., Bloch, I., Foliard, D.},
  booktitle={Proceedings of DAS@ICDAR},
  year={2026}
}