alm7zm commited on
Commit
7c05f84
·
verified ·
1 Parent(s): 1ee73b7

Add AMIDDA subset

Browse files
.gitattributes ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ AMIDDA/data/test-00000-of-00002.parquet filter=lfs diff=lfs merge=lfs -text
2
+ AMIDDA/data/test-00001-of-00002.parquet filter=lfs diff=lfs merge=lfs -text
3
+ AMIDDA/data/train-00000-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
4
+ AMIDDA/data/train-00001-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
5
+ AMIDDA/data/train-00002-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
6
+ AMIDDA/data/train-00003-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
7
+ AMIDDA/data/train-00004-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
8
+ AMIDDA/data/train-00005-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
9
+ AMIDDA/data/train-00006-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
10
+ AMIDDA/data/train-00007-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
11
+ AMIDDA/data/train-00008-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
12
+ AMIDDA/data/train-00009-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
13
+ AMIDDA/data/train-00010-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
14
+ AMIDDA/data/train-00011-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
15
+ AMIDDA/data/train-00012-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
16
+ AMIDDA/data/train-00013-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
17
+ AMIDDA/data/train-00014-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
18
+ AMIDDA/data/train-00015-of-00016.parquet filter=lfs diff=lfs merge=lfs -text
19
+ AMIDDA/data/validation-00000-of-00002.parquet filter=lfs diff=lfs merge=lfs -text
20
+ AMIDDA/data/validation-00001-of-00002.parquet filter=lfs diff=lfs merge=lfs -text
AMIDDA/README.md ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ language:
4
+ - ar
5
+ - ur
6
+ - fa
7
+ task_categories:
8
+ - image-to-text
9
+ tags:
10
+ - htr
11
+ - ocr
12
+ - arabic
13
+ - urdu
14
+ - manuscripts
15
+ - lithography
16
+ - historical
17
+ size_categories:
18
+ - 10K<n<100K
19
+ pretty_name: AMIDDA
20
+ source_datasets:
21
+ - calfa-ai/RASAM-1
22
+ - calfa-ai/RASAM-2
23
+ - calfa-ai/TARIMA
24
+ - calfa-ai/BAYBARS
25
+ - calfa-ai/ISKANDAR
26
+ - aamijar/muharaf-public
27
+ - johnlockejrr/KHATT_v1.0_dataset
28
+ ---
29
+
30
+ # AMIDDA — A Dataset for Generic Arabic ATR model
31
+
32
+ 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.
33
+
34
+ ## Stats
35
+
36
+ | | |
37
+ |---|---|
38
+ | Sub-datasets | 8 |
39
+ | Lines (total) | 66,779 |
40
+ | Train / Val / Test | 53,420 / 6,675 / 6,684 |
41
+
42
+ ## Sub-datasets
43
+
44
+ | Dataset | Script | Source | Lines |
45
+ |---|---|---|---|
46
+ | [RASAM-1](https://huggingface.co/datasets/calfa-ai/RASAM-1) | Arabic (Maghrebi) | BULAC | 7,331 |
47
+ | [RASAM-2](https://huggingface.co/datasets/calfa-ai/RASAM-2) | Arabic (Maghrebi) | BULAC | 3,720 |
48
+ | [TARIMA](https://huggingface.co/datasets/calfa-ai/TARIMA) | Arabic (Maghrebi) | BULAC / BnF / MMSH | 2,285 |
49
+ | [BAYBARS](https://huggingface.co/datasets/calfa-ai/BAYBARS) | Arabic (Oriental) | — | 15,567 |
50
+ | [ISKANDAR](https://huggingface.co/datasets/calfa-ai/ISKANDAR) | Arabic (Oriental) | BnF / Gotha / Leeds | 5,221 |
51
+ | RASM | Arabic (Oriental) | British Library *(not redistributed)* | 1,488 |
52
+ | [KHATT](https://huggingface.co/datasets/johnlockejrr/KHATT_v1.0_dataset) | Arabic (modern cursive) | KHATT v1.0 | 6,673 |
53
+ | [MUHARAF](https://huggingface.co/datasets/aamijar/muharaf-public) | Arabic (modern cursive) | muharaf-public | 24,494 |
54
+
55
+ Each row carries two source-related columns:
56
+
57
+ - `dataset` — exact source: `rasam1`, `rasam2`, `tarima`, `baybars`, `iskandar`, `rasm`, `khatt`, `muharaf`
58
+ - `transcription_guidelines` — guideline followed during transcription:
59
+ - `rasam` — RASAM-1, RASAM-2, TARIMA, BAYBARS, ISKANDAR
60
+ - `rasm` — RASM
61
+ - `khatt` — KHATT
62
+ - `muharaf` — MUHARAF
63
+
64
+ 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.
65
+
66
+ ## Usage
67
+
68
+ ```python
69
+ from datasets import load_dataset
70
+
71
+ ds = load_dataset("calfa-ai/AMIDDA")
72
+
73
+ # Filter by source dataset
74
+ baybars_only = ds["train"].filter(lambda x: x["dataset"] == "baybars")
75
+
76
+ # Filter by transcription guideline
77
+ rasam_only = ds["train"].filter(lambda x: x["transcription_guidelines"] == "rasam")
78
+ ```
79
+
80
+ ## Results on this dataset
81
+
82
+ 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).
83
+
84
+ | Method | baybars | iskandar | khatt | muharaf | rasam1 | rasam2 | rasm | tarima | Overall |
85
+ |:---|---:|---:|---:|---:|---:|---:|---:|---:|---:|
86
+ | ***(i) VLM API + line-level ICL*** — 280-line subset (35 per corpus), best shot count per model | | | | | | | | | |
87
+ | Gemini 3 Flash, 25 shots | 11.2 | 11.8 | 7.5 | 22.5 | 16.5 | 29.0 | 21.1 | 25.6 | 18.3 |
88
+ | Gemini 3.5 Flash, 25 shots | 9.6 | 11.0 | 4.8 | — | — | — | — | — | 9.9 |
89
+ | Gemma 4 26B IT, 5 shots | 22.9 | 20.7 | 18.8 | 42.5 | 33.1 | 40.8 | 32.2 | 39.3 | 31.6 |
90
+ | Mistral Large 2512, 5 shots | 56.3 | 62.9 | 65.0 | 70.3 | 70.4 | 67.8 | 73.7 | 63.3 | 66.7 |
91
+ | Mistral Small 2603, 5 shots | 68.7 | 66.5 | 62.6 | 75.3 | 72.3 | 75.2 | 77.6 | 70.3 | 71.1 |
92
+ | 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 |
93
+ | Qwen 3 VL 8B, zero-shot | 53.9 | 47.8 | 104.7 | 89.7 | 96.4 | 108.9 | 57.5 | 82.7 | 83.4 |
94
+ | Qwen 3.5 Flash, zero-shot | 32.3 | 26.9 | 41.0 | 55.2 | 55.9 | 56.4 | 40.2 | 55.6 | 46.8 |
95
+ | Qwen 3.6 Flash, zero-shot | 31.9 | 38.9 | 36.6 | 55.2 | 60.6 | 60.0 | 41.8 | 59.4 | 49.4 |
96
+ | ***(ii) VLM API + page-level context*** — 60-line subset (10 per corpus), best mode per model (KHATT and Muharaf excluded) | | | | | | | | | |
97
+ | Gemini 3 Flash, ctx = text | 23.2 | 11.8 | — | — | 26.4 | 32.8 | 10.6 | 26.0 | 21.8 |
98
+ | Gemma 4 26B IT, ctx = text | 37.7 | 19.8 | — | — | 45.4 | 45.2 | 21.3 | 46.6 | 36.0 |
99
+ | Mistral Large 2512, ctx = `img_text` | 72.8 | 68.4 | — | — | 75.7 | 70.6 | 61.4 | 69.5 | 69.7 |
100
+ | Qwen 2.5 VL 72B, ctx = text | 45.8 | 25.1 | — | — | 63.2 | 52.0 | 27.0 | 49.7 | 43.8 |
101
+ | Qwen 3.6 Flash, ctx = text | 52.4 | 36.3 | — | — | 67.1 | 57.0 | 63.8 | 76.6 | 58.8 |
102
+ | ***(iii) Local zero-shot OCR-VLM*** — full test split | | | | | | | | | |
103
+ | GLM-OCR, zero-shot | 199.4 | 189.1 | 247.6 | 295.5 | 383.9 | 329.4 | 290.6 | 359.7 | 286.1 |
104
+ | Chandra-OCR-2, zero-shot | 496.4 | 553.8 | 657.9 | 1898.4 | 1536.8 | 1632.2 | 1056.6 | 1877.0 | 1346.2 |
105
+ | QARI-OCR v0.3, zero-shot | 140.1 | 113.6 | 50.9 | 105.9 | 114.6 | 100.6 | 71.2 | 85.1 | 104.3 |
106
+ | GLM-OCR, LoRA fine-tuned | 120.3 | 137.8 | 60.2 | 107.2 | 175.3 | 178.3 | 230.0 | 159.2 | 125.9 |
107
+ | ***(iv) LoRA fine-tuning of Qwen3.5-4B*** — full test split | | | | | | | | | |
108
+ | Qwen3.5-4B, r = 64 | 13.4 | 15.9 | 9.8 | 30.1 | 25.0 | 27.6 | 37.4 | 24.2 | 23.1 |
109
+ | Qwen3.5-4B, r = 128 | 13.5 | 15.9 | 8.1 | 31.1 | 22.3 | 29.2 | 34.3 | 31.2 | 23.2 |
110
+ | ***(v) MoE post-correction*** — 80-line subset, judge output | | | | | | | | | |
111
+ | baseline (Qwen3.5-4B FT) | 18.9 | 14.2 | 11.6 | 18.3 | 21.0 | 23.3 | 19.9 | 25.6 | 19.5 |
112
+ | Gemini / Gemini / GPT-5.1 | 14.0 | 10.9 | 12.9 | 15.1 | 14.3 | 21.4 | 13.8 | 20.7 | 15.8 |
113
+ | 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 |
114
+ | Gemini / Qwen3.5-35B / Mistral-L | 29.7 | 17.2 | 14.3 | 17.7 | 15.5 | 29.8 | 29.0 | 26.6 | 22.3 |
115
+ | ***(vi) RNN (CTC), specialised per corpus, already existing*** — per-corpus test splits inherited by AMIDDA | | | | | | | | | |
116
+ | 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 |
117
+ | ***Third-party baselines*** (reported on their own test splits) | | | | | | | | | |
118
+ | HATFormer | — | — | 15.4 | 8.6 | — | — | — | — | — |
119
+ | Qalam | — | — | 10.4 † | — | — | — | — | — | — |
120
+
121
+ 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)
122
+
123
+
124
+ ## Citation
125
+
126
+ Presented at HIP 2026 @ ICDAR 2026 (proceedings to come).
127
+
128
+ Preprint:
129
+
130
+ ```
131
+ @unpublished{vidalgorene:hal-05693582,
132
+ TITLE = {{Is a Generic Dataset and Foundation VLM for Arabic HTR Worth It? Lessons from AMIDDA}},
133
+ AUTHOR = {Vidal-Gor{\`e}ne, Chahan and Lucas, No{\"e}mie and Salah, Cl{\'e}ment and Decours-Perez, Ali{\'e}nor},
134
+ URL = {https://enc.hal.science/hal-05693582},
135
+ NOTE = {working paper or preprint},
136
+ YEAR = {2026},
137
+ MONTH = Jul,
138
+ KEYWORDS = {Arabic HTR ; Vision-Language Models ; In-Context Learning ; Data Bootstrapping ; DISTAM},
139
+ PDF = {https://enc.hal.science/hal-05693582v1/file/main.pdf},
140
+ HAL_ID = {hal-05693582},
141
+ HAL_VERSION = {v1},
142
+ }
143
+ ```
144
+
145
+ ## License
146
+
147
+ Mixed — see each sub-dataset for its own license. Refer to the source repositories.
AMIDDA/data/test-00000-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0d717ad0aa670a4e6ef8de313e2896c5be23edea0a300361c9b8cf6d9426163
3
+ size 628280657
AMIDDA/data/test-00001-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:662d783efcf3baedcc55b8f65ae43662a06c9f82f6881f2ab7bc1f7f54e34500
3
+ size 315575233
AMIDDA/data/train-00000-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a9e2faefbb468c4e87a8764ed7e783be7e871fa3b76ab35aaf5fa4aade5f4da
3
+ size 667999435
AMIDDA/data/train-00001-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d80da9938836af13981c7b0bc6ae357a7df879b058f1179cc9dbe5df05109d2
3
+ size 1895406758
AMIDDA/data/train-00002-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8575f81df7408ece561884c6580b4c88b94a3868f7face18f4f3f847e5d357fe
3
+ size 401321898
AMIDDA/data/train-00003-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a201078f83ebe8d185e422bfb4ea40529143ce66fa7555f625320c64da25f78a
3
+ size 509586371
AMIDDA/data/train-00004-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb6e3430bade65cd894626c3ef3609357d1ff92d6248e2341a05d58d9de1534b
3
+ size 367557654
AMIDDA/data/train-00005-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6dc83d1d034da75a36788305309fca98eb3831b76ac931bb3a4ab8faae5eab5f
3
+ size 340426218
AMIDDA/data/train-00006-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:70ae36a6bb06416aa5d596261073879b410f66f27ad96c7cdf2e60903044b5dd
3
+ size 369802466
AMIDDA/data/train-00007-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:86df0ba25d16184d13cc092d02c3e38e3d32ebf737427c474c4e627249fb5740
3
+ size 508937275
AMIDDA/data/train-00008-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e59c8c237b0e691b98ab3c5920075a141090222580d5f078124485e7f67c9d8
3
+ size 1183784404
AMIDDA/data/train-00009-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9984662b96a7550c3788571e00daa00b2fe6d0378f579ea63b9464d7d0ebaf82
3
+ size 201598551
AMIDDA/data/train-00010-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1909a85e76ee4ce7bc6385457ab87c00262b6ebd1dca249afb990051f1507d29
3
+ size 183670410
AMIDDA/data/train-00011-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b92403b9af897d82353da1def46cdb9752461160787ef2b77994f062e4d15973
3
+ size 178112505
AMIDDA/data/train-00012-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:417525252717cb6de2fb7843667337dc95b27c487c62841b06d44f0863f7c9b3
3
+ size 200773193
AMIDDA/data/train-00013-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:21527daef91a615abb10b87e4303d485aa9d2998da3c8ec07686f8d9f45c2e07
3
+ size 173116381
AMIDDA/data/train-00014-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:19430cf2398cdb5efb1784814a037d6541236c2d3ba4314d5f8d8622c024d6c8
3
+ size 194561098
AMIDDA/data/train-00015-of-00016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ac6c2ef3523d6fccab5b45131a8866ec2ffc07e13940551a4b948fc341a8b23
3
+ size 172707758
AMIDDA/data/validation-00000-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9467c88240b2e420d2a7abc01db705fa12fd05976ea295235eeadc1740f6ac9a
3
+ size 639993852
AMIDDA/data/validation-00001-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c33342aebb3c71fd4aa72a21728b6e6d1eb354caefe3f42bf7045f5ceccb8e9
3
+ size 318722632