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

Mohamed Chelali, Florence Cloppet, Camille Kurtz, Isabelle Bloch, Daniel Foliard

International Workshop on Document Analysis Systems (DAS 2026), Vienna, Austria
Lecture Notes in Computer Science, vol. 16851, pp. 195–212, Springer

Summary

Administrative stamps authenticate, validate and identify the institutions behind historical documents. They also trace a document's provenance and circulation, helping historians reconstruct institutional workflows. Detecting them automatically is difficult: documents are degraded, stamps vary widely in shape and size, and they can appear anywhere on the page.

We propose SA-DETR, a transformer-based stamp detector built on DeepSolo. Detection transformers usually encode scale with one discrete embedding per level of the feature pyramid. SA-DETR replaces it with a Scale-Aware Positional Encoding (SAPE) that treats scale as a continuous signal.

SA-DETR architecture: multi-scale features are flattened and enriched with SAPE and positional encoding, then processed by a Transformer encoder-decoder that outputs the detected stamps.
Overview of SA-DETR. SAPE adds a continuous scale encoding to the multi-scale features before the Transformer.

SAPE takes the normalized scale s ∈ [0, 1] of each feature level and combines two paths: an interpolation between learned scale anchors, which captures the overall scale structure, and a sinusoidal projection, which captures fine scale variations.

SAPE module: from the normalized scale s, a continuous path (sinusoidal encoding then linear projection) and a discrete path (learned table T with linear interpolation) are summed into the SAPE embedding.
The SAPE module: continuous path (left) and discrete path (right).

Results

SA-DETR was evaluated on three historical datasets: Forbin, HistPostCard and StaVer. It obtains the best mAP and AP75 on Forbin and the best AP75 on HistPostCard, and improves the mAP of DeepSolo, on which it is built, on all three datasets.

Detection results. Best, second-best and third-best results per column are shown in bold, underlined and gray bold, respectively.
Method Forbin HistPostCard StaVer
mAPAP50AP75 mAPAP50AP75 mAPAP50AP75
Faster R-CNN 34.0675.7325.93 82.6099.5094.10 70.8496.0078.56
RetinaNet 30.8372.5722.61 86.80100.0094.10 76.3695.5384.20
YOLOv8-s 32.7373.2524.83 77.7094.3089.20 57.7081.7062.20
YOLOv11-s 33.7374.8226.02 78.5094.1091.80 61.2781.9967.99
Deform. DETR 27.7968.2018.47 52.2083.1064.40 55.3489.7761.55
DeepSolo 44.1468.7350.31 56.1192.0163.53 67.4695.0174.02
SA-DETR (ours) 46.1974.9150.35 76.82100.0095.66 70.7895.4880.10

To compare the methods across all datasets and metrics, we rank them on each of the nine columns above and average the ranks. SA-DETR obtains the best average rank (2.17), ahead of Faster R-CNN (2.39) and RetinaNet (2.89).

Critical difference diagram of average ranks over mAP, AP50 and AP75 on the three datasets: SA-DETR 2.17, Faster R-CNN 2.39, RetinaNet 2.89, YOLOv11-s 4.22, DeepSolo 4.56, YOLOv8-s 5.11, Deformable DETR 6.67.
Critical difference diagram of the average ranks over mAP, AP50 and AP75 on the three datasets (lower is better). Horizontal bars connect methods whose differences are not statistically significant.

Citation

@inproceedings{chelali_DAS_2026,
  author    = {Chelali, Mohamed and Cloppet, Florence and Kurtz, Camille and
               Bloch, Isabelle and Foliard, Daniel},
  title     = {Scale-Aware Feature-Level Encoding for Historical Document Stamp Detection},
  booktitle = {International Workshop on Document Analysis Systems -- DAS 2026},
  series    = {Lecture Notes in Computer Science},
  volume    = {16851},
  pages     = {195--212},
  year      = {2026},
  month     = {sep},
  address   = {Vienna, Austria},
  publisher = {Springer Nature Switzerland},
  isbn      = {978-3-032-36207-0},
  doi       = {10.1007/978-3-032-36207-0_12}
}