File size: 7,371 Bytes
7c05f84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
---

license: other
language:
- ar
- ur
- fa
task_categories:
- image-to-text
tags:
- htr
- ocr
- arabic
- urdu
- manuscripts
- lithography
- historical
size_categories:
- 10K<n<100K
pretty_name: AMIDDA
source_datasets:
- calfa-ai/RASAM-1
- calfa-ai/RASAM-2
- calfa-ai/TARIMA
- calfa-ai/BAYBARS
- calfa-ai/ISKANDAR
- aamijar/muharaf-public
- johnlockejrr/KHATT_v1.0_dataset
---


# AMIDDA — A Dataset for Generic Arabic ATR model

AMIDDA (Arabic Manuscript Images for Digital Deciphering and Analysis) is a combined dataset aggregating line-level ground-truth from eight HTR datasets covering Arabic (Maghrebi & Oriental scripts), Urdu, Persian, and modern Arabic handwriting.

## Stats

| | |
|---|---|
| Sub-datasets | 8 |
| Lines (total) | 66,779 |
| Train / Val / Test | 53,420 / 6,675 / 6,684 |

## Sub-datasets

| Dataset | Script | Source | Lines |
|---|---|---|---|
| [RASAM-1](https://huggingface.co/datasets/calfa-ai/RASAM-1) | Arabic (Maghrebi) | BULAC | 7,331 |
| [RASAM-2](https://huggingface.co/datasets/calfa-ai/RASAM-2) | Arabic (Maghrebi) | BULAC | 3,720 |
| [TARIMA](https://huggingface.co/datasets/calfa-ai/TARIMA) | Arabic (Maghrebi) | BULAC / BnF / MMSH | 2,285 |
| [BAYBARS](https://huggingface.co/datasets/calfa-ai/BAYBARS) | Arabic (Oriental) | — | 15,567 |
| [ISKANDAR](https://huggingface.co/datasets/calfa-ai/ISKANDAR) | Arabic (Oriental) | BnF / Gotha / Leeds | 5,221 |
| RASM | Arabic (Oriental) | British Library *(not redistributed)* | 1,488 |
| [KHATT](https://huggingface.co/datasets/johnlockejrr/KHATT_v1.0_dataset) | Arabic (modern cursive) | KHATT v1.0 | 6,673 |
| [MUHARAF](https://huggingface.co/datasets/aamijar/muharaf-public) | Arabic (modern cursive) | muharaf-public | 24,494 |

Each row carries two source-related columns:

- `dataset` — exact source: `rasam1`, `rasam2`, `tarima`, `baybars`, `iskandar`, `rasm`, `khatt`, `muharaf`
- `transcription_guidelines` — guideline followed during transcription:
  - `rasam` — RASAM-1, RASAM-2, TARIMA, BAYBARS, ISKANDAR
  - `rasm` — RASM
  - `khatt` — KHATT
  - `muharaf` — MUHARAF

Only the `rasam` guidelines have been formally specified and verified. The other datasets are nonetheless highly compatible with them: all sources preserve the text as written in the original document, without normalization, modernization, or editorial correction.

## Usage

```python

from datasets import load_dataset



ds = load_dataset("calfa-ai/AMIDDA")



# Filter by source dataset

baybars_only = ds["train"].filter(lambda x: x["dataset"] == "baybars")



# Filter by transcription guideline

rasam_only   = ds["train"].filter(lambda x: x["transcription_guidelines"] == "rasam")

```

## Results on this dataset

CER (%) per source dataset across the six strategies, one row per model variant, with third-party scores for perspective. "—" means not evaluated (Gemini 3.5 Flash: partial run on three corpora).

| Method | baybars | iskandar | khatt | muharaf | rasam1 | rasam2 | rasm | tarima | Overall |
|:---|---:|---:|---:|---:|---:|---:|---:|---:|---:|
| ***(i) VLM API + line-level ICL*** — 280-line subset (35 per corpus), best shot count per model | | | | | | | | | |
| Gemini 3 Flash, 25 shots | 11.2 | 11.8 | 7.5 | 22.5 | 16.5 | 29.0 | 21.1 | 25.6 | 18.3 |
| Gemini 3.5 Flash, 25 shots | 9.6 | 11.0 | 4.8 | — | — | — | — | — | 9.9 |
| Gemma 4 26B IT, 5 shots | 22.9 | 20.7 | 18.8 | 42.5 | 33.1 | 40.8 | 32.2 | 39.3 | 31.6 |
| Mistral Large 2512, 5 shots | 56.3 | 62.9 | 65.0 | 70.3 | 70.4 | 67.8 | 73.7 | 63.3 | 66.7 |
| Mistral Small 2603, 5 shots | 68.7 | 66.5 | 62.6 | 75.3 | 72.3 | 75.2 | 77.6 | 70.3 | 71.1 |
| Qwen 2.5 VL 72B, 5 shots | 22.9 | 28.1 | 21.1 | 49.0 | 43.4 | 43.7 | 42.0 | 53.9 | 38.7 |
| Qwen 3 VL 8B, zero-shot | 53.9 | 47.8 | 104.7 | 89.7 | 96.4 | 108.9 | 57.5 | 82.7 | 83.4 |
| Qwen 3.5 Flash, zero-shot | 32.3 | 26.9 | 41.0 | 55.2 | 55.9 | 56.4 | 40.2 | 55.6 | 46.8 |
| Qwen 3.6 Flash, zero-shot | 31.9 | 38.9 | 36.6 | 55.2 | 60.6 | 60.0 | 41.8 | 59.4 | 49.4 |
| ***(ii) VLM API + page-level context*** — 60-line subset (10 per corpus), best mode per model (KHATT and Muharaf excluded) | | | | | | | | | |
| Gemini 3 Flash, ctx = text | 23.2 | 11.8 | — | — | 26.4 | 32.8 | 10.6 | 26.0 | 21.8 |
| Gemma 4 26B IT, ctx = text | 37.7 | 19.8 | — | — | 45.4 | 45.2 | 21.3 | 46.6 | 36.0 |
| Mistral Large 2512, ctx = `img_text` | 72.8 | 68.4 | — | — | 75.7 | 70.6 | 61.4 | 69.5 | 69.7 |
| Qwen 2.5 VL 72B, ctx = text | 45.8 | 25.1 | — | — | 63.2 | 52.0 | 27.0 | 49.7 | 43.8 |
| Qwen 3.6 Flash, ctx = text | 52.4 | 36.3 | — | — | 67.1 | 57.0 | 63.8 | 76.6 | 58.8 |
| ***(iii) Local zero-shot OCR-VLM*** — full test split | | | | | | | | | |
| GLM-OCR, zero-shot | 199.4 | 189.1 | 247.6 | 295.5 | 383.9 | 329.4 | 290.6 | 359.7 | 286.1 |
| Chandra-OCR-2, zero-shot | 496.4 | 553.8 | 657.9 | 1898.4 | 1536.8 | 1632.2 | 1056.6 | 1877.0 | 1346.2 |
| QARI-OCR v0.3, zero-shot | 140.1 | 113.6 | 50.9 | 105.9 | 114.6 | 100.6 | 71.2 | 85.1 | 104.3 |
| GLM-OCR, LoRA fine-tuned | 120.3 | 137.8 | 60.2 | 107.2 | 175.3 | 178.3 | 230.0 | 159.2 | 125.9 |
| ***(iv) LoRA fine-tuning of Qwen3.5-4B*** — full test split | | | | | | | | | |
| Qwen3.5-4B, r = 64 | 13.4 | 15.9 | 9.8 | 30.1 | 25.0 | 27.6 | 37.4 | 24.2 | 23.1 |
| Qwen3.5-4B, r = 128 | 13.5 | 15.9 | 8.1 | 31.1 | 22.3 | 29.2 | 34.3 | 31.2 | 23.2 |
| ***(v) MoE post-correction*** — 80-line subset, judge output | | | | | | | | | |
| baseline (Qwen3.5-4B FT) | 18.9 | 14.2 | 11.6 | 18.3 | 21.0 | 23.3 | 19.9 | 25.6 | 19.5 |
| Gemini / Gemini / GPT-5.1 | 14.0 | 10.9 | 12.9 | 15.1 | 14.3 | 21.4 | 13.8 | 20.7 | 15.8 |
| Gemini / Qwen3-VL-32B / GPT-5.1 | 15.6 | 10.4 | 11.0 | 16.0 | 17.6 | 21.7 | 21.0 | 20.7 | 17.2 |
| Gemini / Qwen3.5-35B / Mistral-L | 29.7 | 17.2 | 14.3 | 17.7 | 15.5 | 29.8 | 29.0 | 26.6 | 22.3 |
| ***(vi) RNN (CTC), specialised per corpus, already existing*** — per-corpus test splits inherited by AMIDDA | | | | | | | | | |
| CTC, one RNN per corpus (CALFA CRNN model, see RASAM paper) | 7.8 | — | 6.1 | 9.5 | 3.6 | 4.9 | 8.9 | 3.9 | 6.4 |
| ***Third-party baselines*** (reported on their own test splits) | | | | | | | | | |
| HATFormer | — | — | 15.4 | 8.6 | — | — | — | — | — |
| Qalam | — | — | 10.4 † | — | — | — | — | — | — |

Source: AMIDDA -- *Is a Generic Dataset and Foundation VLM for Arabic HTR Worth It? Lessons from AMIDDA* [hal-05693582](https://enc.hal.science/hal-05693582)


## Citation

Presented at HIP 2026 @ ICDAR 2026 (proceedings to come).

Preprint:

```

@unpublished{vidalgorene:hal-05693582,

  TITLE = {{Is a Generic Dataset and Foundation VLM for Arabic HTR Worth It? Lessons from AMIDDA}},

  AUTHOR = {Vidal-Gor{\`e}ne, Chahan and Lucas, No{\"e}mie and Salah, Cl{\'e}ment and Decours-Perez, Ali{\'e}nor},

  URL = {https://enc.hal.science/hal-05693582},

  NOTE = {working paper or preprint},

  YEAR = {2026},

  MONTH = Jul,

  KEYWORDS = {Arabic HTR ; Vision-Language Models ; In-Context Learning ; Data Bootstrapping ; DISTAM},

  PDF = {https://enc.hal.science/hal-05693582v1/file/main.pdf},

  HAL_ID = {hal-05693582},

  HAL_VERSION = {v1},

}

```

## License

Mixed — see each sub-dataset for its own license. Refer to the source repositories.