Dataset Viewer
Auto-converted to Parquet Duplicate
file_name
stringclasses
168 values
text
stringlengths
1
622
text_raw
stringlengths
1
511
split
stringclasses
1 value
sample_id
stringlengths
17
17
page_id
stringclasses
168 values
block
int64
0
58
line
int64
0
30
x
int64
0
2.94k
y
int64
0
3.44k
x2
int64
12
3.22k
y2
int64
24
3.48k
raw/pages/page_0000.jpg
subject
subject
test
page_0000_w_00000
page_0000
0
0
116
189
238
235
raw/pages/page_0000.jpg
:
:
test
page_0000_w_00001
page_0000
0
0
214
190
256
232
raw/pages/page_0000.jpg
date
date
test
page_0000_w_00002
page_0000
1
0
1,828
200
1,902
228
raw/pages/page_0000.jpg
مدل
مدل
test
page_0000_w_00003
page_0000
2
0
2,098
301
2,235
438
raw/pages/page_0000.jpg
حمل
حمل
test
page_0000_w_00004
page_0000
2
0
1,974
301
2,079
438
raw/pages/page_0000.jpg
و
و
test
page_0000_w_00005
page_0000
2
0
1,908
301
1,964
438
raw/pages/page_0000.jpg
نقل
نقل
test
page_0000_w_00006
page_0000
2
0
1,761
301
1,898
438
raw/pages/page_0000.jpg
:
:
test
page_0000_w_00007
page_0000
2
0
1,697
301
1,764
438
raw/pages/page_0000.jpg
همان
همان
test
page_0000_w_00008
page_0000
2
0
1,592
301
1,721
438
raw/pages/page_0000.jpg
طور
طور
test
page_0000_w_00009
page_0000
2
0
1,481
301
1,575
438
raw/pages/page_0000.jpg
که
که
test
page_0000_w_00010
page_0000
2
0
1,392
301
1,494
438
raw/pages/page_0000.jpg
قبلا
قبلاً
test
page_0000_w_00011
page_0000
2
0
1,276
301
1,409
438
raw/pages/page_0000.jpg
گفته
گفته
test
page_0000_w_00012
page_0000
2
0
1,158
301
1,287
438
raw/pages/page_0000.jpg
شد
شد
test
page_0000_w_00013
page_0000
2
0
1,066
301
1,164
438
raw/pages/page_0000.jpg
الگوریسم
الگوریسم
test
page_0000_w_00014
page_0000
2
0
800
301
1,053
438
raw/pages/page_0000.jpg
سیمپلکس
سیمپلکس
test
page_0000_w_00015
page_0000
2
0
558
301
793
438
raw/pages/page_0000.jpg
می
می
test
page_0000_w_00016
page_0000
2
0
471
301
530
438
raw/pages/page_0000.jpg
تواند
تواند
test
page_0000_w_00017
page_0000
2
0
301
301
462
438
raw/pages/page_0000.jpg
برای
برای
test
page_0000_w_00018
page_0000
2
0
144
301
288
441
raw/pages/page_0000.jpg
حل
حل
test
page_0000_w_00019
page_0000
2
1
2,157
499
2,248
604
raw/pages/page_0000.jpg
مسائل
مسائل
test
page_0000_w_00020
page_0000
2
1
1,985
499
2,146
604
raw/pages/page_0000.jpg
برنامه
برنامه
test
page_0000_w_00021
page_0000
2
1
1,817
499
1,965
604
raw/pages/page_0000.jpg
ریزی
ریزی
test
page_0000_w_00022
page_0000
2
1
1,642
499
1,807
604
raw/pages/page_0000.jpg
خطی
خطی
test
page_0000_w_00023
page_0000
2
1
1,501
499
1,630
604
raw/pages/page_0000.jpg
به
به
test
page_0000_w_00024
page_0000
2
1
1,414
499
1,466
604
raw/pages/page_0000.jpg
کار
کار
test
page_0000_w_00025
page_0000
2
1
1,322
499
1,420
604
raw/pages/page_0000.jpg
گرفته
گرفته
test
page_0000_w_00026
page_0000
2
1
1,171
499
1,336
604
raw/pages/page_0000.jpg
شود
شود
test
page_0000_w_00027
page_0000
2
1
1,042
499
1,155
604
raw/pages/page_0000.jpg
.
.
test
page_0000_w_00028
page_0000
2
1
1,017
499
1,048
604
raw/pages/page_0000.jpg
اگر
اگر
test
page_0000_w_00029
page_0000
2
1
944
499
1,046
604
raw/pages/page_0000.jpg
مسئله
مسئله
test
page_0000_w_00030
page_0000
2
1
772
499
940
604
raw/pages/page_0000.jpg
دارای
دارای
test
page_0000_w_00031
page_0000
2
1
607
499
762
604
raw/pages/page_0000.jpg
ساختار
ساختار
test
page_0000_w_00032
page_0000
2
1
410
499
593
604
raw/pages/page_0000.jpg
خاص
خاص
test
page_0000_w_00033
page_0000
2
1
270
499
403
604
raw/pages/page_0000.jpg
باشد
باشد
test
page_0000_w_00034
page_0000
2
1
113
499
264
604
raw/pages/page_0000.jpg
.
.
test
page_0000_w_00035
page_0000
2
1
113
502
159
607
raw/pages/page_0000.jpg
از
از
test
page_0000_w_00036
page_0000
2
2
2,179
713
2,264
801
raw/pages/page_0000.jpg
سایر
سایر
test
page_0000_w_00037
page_0000
2
2
2,074
713
2,190
801
raw/pages/page_0000.jpg
روشها
روشها
test
page_0000_w_00038
page_0000
2
2
1,880
713
2,066
801
raw/pages/page_0000.jpg
استفاده
استفاده
test
page_0000_w_00039
page_0000
2
2
1,617
713
1,855
801
raw/pages/page_0000.jpg
می‌شود
میشود
test
page_0000_w_00040
page_0000
2
2
1,379
713
1,600
801
raw/pages/page_0000.jpg
.
.
test
page_0000_w_00041
page_0000
2
2
1,340
713
1,371
801
raw/pages/page_0000.jpg
مسئله
مسئله
test
page_0000_w_00042
page_0000
3
0
2,031
901
2,234
992
raw/pages/page_0000.jpg
حمل
حمل
test
page_0000_w_00043
page_0000
3
0
1,926
901
2,039
992
raw/pages/page_0000.jpg
و
و
test
page_0000_w_00044
page_0000
3
0
1,869
901
1,915
992
raw/pages/page_0000.jpg
نقل
نقل
test
page_0000_w_00045
page_0000
3
0
1,732
901
1,865
992
raw/pages/page_0000.jpg
و
و
test
page_0000_w_00046
page_0000
3
0
1,680
901
1,732
992
raw/pages/page_0000.jpg
تخصیص
تخصیص
test
page_0000_w_00047
page_0000
3
0
1,396
901
1,688
992
raw/pages/page_0000.jpg
در
در
test
page_0000_w_00048
page_0000
3
0
1,274
901
1,361
992
raw/pages/page_0000.jpg
پژوهش
پژوهش
test
page_0000_w_00049
page_0000
3
0
1,063
901
1,284
992
raw/pages/page_0000.jpg
عملیاتی
عملیاتی
test
page_0000_w_00050
page_0000
3
0
863
901
1,035
992
raw/pages/page_0000.jpg
حمل
حمل
test
page_0000_w_00051
page_0000
3
0
733
901
827
992
raw/pages/page_0000.jpg
و
و
test
page_0000_w_00052
page_0000
3
0
659
901
711
992
raw/pages/page_0000.jpg
نقل
نقل
test
page_0000_w_00053
page_0000
3
0
558
901
674
992
raw/pages/page_0000.jpg
مقدار
مقدار
test
page_0000_w_00054
page_0000
3
0
403
901
571
992
raw/pages/page_0000.jpg
معینی
معینی
test
page_0000_w_00055
page_0000
3
0
256
901
428
992
raw/pages/page_0000.jpg
از
از
test
page_0000_w_00056
page_0000
3
0
148
901
242
992
raw/pages/page_0000.jpg
یک
یک
test
page_0000_w_00057
page_0000
3
1
2,157
1,032
2,259
1,161
raw/pages/page_0000.jpg
محصول
محصول
test
page_0000_w_00058
page_0000
3
1
1,904
1,032
2,139
1,161
raw/pages/page_0000.jpg
است
است
test
page_0000_w_00059
page_0000
3
1
1,708
1,032
1,915
1,161
raw/pages/page_0000.jpg
که
که
test
page_0000_w_00060
page_0000
3
1
1,653
1,032
1,790
1,161
raw/pages/page_0000.jpg
از
از
test
page_0000_w_00061
page_0000
3
1
1,579
1,032
1,646
1,161
raw/pages/page_0000.jpg
نقطه
نقطه
test
page_0000_w_00062
page_0000
3
1
1,302
1,032
1,442
1,161
raw/pages/page_0000.jpg
(
(
test
page_0000_w_00063
page_0000
3
1
1,256
1,032
1,291
1,161
raw/pages/page_0000.jpg
مبدأ
مبدأ
test
page_0000_w_00064
page_0000
3
1
1,115
1,032
1,252
1,161
raw/pages/page_0000.jpg
=
=
test
page_0000_w_00065
page_0000
3
1
1,105
1,032
1,151
1,161
raw/pages/page_0000.jpg
)
)
test
page_0000_w_00066
page_0000
3
1
944
1,032
990
1,161
raw/pages/page_0000.jpg
،
،
test
page_0000_w_00067
page_0000
3
1
894
1,032
946
1,161
raw/pages/page_0000.jpg
(
(
test
page_0000_w_00068
page_0000
3
1
846
1,032
888
1,161
raw/pages/page_0000.jpg
عرضه
عرضه
test
page_0000_w_00069
page_0000
3
1
684
1,032
856
1,161
raw/pages/page_0000.jpg
کتری
کتری
test
page_0000_w_00070
page_0000
3
1
519
1,032
705
1,161
raw/pages/page_0000.jpg
=
=
test
page_0000_w_00071
page_0000
3
1
456
1,032
498
1,161
raw/pages/page_0000.jpg
)
)
test
page_0000_w_00072
page_0000
3
1
323
1,035
373
1,164
raw/pages/page_0000.jpg
M
M
test
page_0000_w_00073
page_0000
4
0
1,337
1,278
1,450
1,320
raw/pages/page_0000.jpg
نقطه
نقطه
test
page_0000_w_00074
page_0000
4
1
1,175
1,217
1,330
1,378
raw/pages/page_0000.jpg
شروع
شروع
test
page_0000_w_00075
page_0000
4
1
990
1,217
1,155
1,378
raw/pages/page_0000.jpg
-
-
test
page_0000_w_00076
page_0000
4
1
912
1,217
971
1,378
raw/pages/page_0000.jpg
عومه
عومه
test
page_0000_w_00077
page_0000
4
1
677
1,217
856
1,378
raw/pages/page_0000.jpg
کنتی
كنتي
test
page_0000_w_00078
page_0000
4
1
569
1,217
695
1,378
raw/pages/page_0000.jpg
2
2
test
page_0000_w_00079
page_0000
4
1
502
1,217
576
1,378
raw/pages/page_0000.jpg
-
-
test
page_0000_w_00080
page_0000
4
1
449
1,217
491
1,378
raw/pages/page_0000.jpg
m
m
test
page_0000_w_00081
page_0000
4
1
312
1,217
438
1,378
raw/pages/page_0000.jpg
مبدأ
مبدأ
test
page_0000_w_00082
page_0000
4
1
168
1,217
358
1,378
raw/pages/page_0000.jpg
به
به
test
page_0000_w_00083
page_0000
5
0
2,153
1,467
2,244
1,526
raw/pages/page_0000.jpg
نقطه
نقطه
test
page_0000_w_00084
page_0000
6
0
1,196
1,442
1,371
1,533
raw/pages/page_0000.jpg
پایان
پایان
test
page_0000_w_00085
page_0000
6
0
997
1,442
1,180
1,533
raw/pages/page_0000.jpg
=
=
test
page_0000_w_00086
page_0000
6
0
916
1,446
968
1,537
raw/pages/page_0000.jpg
تقاضا
تقاضا
test
page_0000_w_00087
page_0000
6
0
685
1,446
836
1,537
raw/pages/page_0000.jpg
لت
لت
test
page_0000_w_00088
page_0000
6
0
544
1,446
684
1,537
raw/pages/page_0000.jpg
8
8
test
page_0000_w_00089
page_0000
6
0
484
1,446
543
1,537
raw/pages/page_0000.jpg
-
-
test
page_0000_w_00090
page_0000
6
0
443
1,446
467
1,537
raw/pages/page_0000.jpg
2
2
test
page_0000_w_00091
page_0000
6
0
319
1,446
421
1,537
raw/pages/page_0000.jpg
مقصد
مقصد
test
page_0000_w_00092
page_0000
6
0
165
1,445
344
1,539
raw/pages/page_0000.jpg
برود
برود
test
page_0000_w_00093
page_0000
7
0
2,118
1,614
2,240
1,723
raw/pages/page_0000.jpg
چنانچه
چنانچه
test
page_0000_w_00094
page_0000
7
0
1,894
1,614
2,115
1,723
raw/pages/page_0000.jpg
مقدار
مقدار
test
page_0000_w_00095
page_0000
7
0
1,736
1,614
1,880
1,723
raw/pages/page_0000.jpg
2
2
test
page_0000_w_00096
page_0000
7
0
1,660
1,614
1,737
1,723
raw/pages/page_0000.jpg
محصول
محصول
test
page_0000_w_00097
page_0000
7
0
1,417
1,614
1,659
1,723
raw/pages/page_0000.jpg
از
از
test
page_0000_w_00098
page_0000
7
0
1,350
1,614
1,402
1,723
raw/pages/page_0000.jpg
M
M
test
page_0000_w_00099
page_0000
7
0
1,245
1,614
1,330
1,723
End of preview. Expand in Data Studio

Persian Handwriting OCR Dataset

Dataset Summary

A standardized dataset of Persian (Farsi) handwritten pages with word-level bounding-box annotations and transcriptions. The dataset is page-level: each sample is a full page scan; annotations are one row per word bbox on that page. This is the most flexible form -- users can train page-level OCR, word detection (DBNet/PaddleOCR), or derive word/line crops as needed.

  • Pages: 1115 scanned pages (canonical IDs page_XXXX, under raw/pages/).
  • Word annotations: 216202 rows (one per word bbox + transcription).
  • Splits: page-level 70/15/15 train/validation/test (seed 42, no page leakage).
  • License: CC-BY-NC-SA-4.0.

Format

Dataset/
  raw/pages/page_XXXX.jpg          # page scans (RGB JPEG, q95)
  data/train.csv                   # annotations for train pages
  data/validation.csv
  data/test.csv
  data/page_split_manifest.csv     # page_id -> split
  data/all_annotations.csv         # all pages before split
  data/all_annotations_normalized.csv
  reports/qc_report.md
  reports/class_balance_top100.csv
  reports/samples/page_*.png       # sample page overlays

CSV schema (one row per word):

file_name,text,text_raw,split,sample_id,page_id,block,line,x,y,x2,y2
raw/pages/page_0001.jpg,<normalized>,<raw>,train,page_0001_w_00000,page_0001,0,0,218,214,340,256
  • file_name -- relative path to the page image (from Dataset/).
  • text -- normalized transcription (see below); text_raw -- original.
  • x,y,x2,y2 -- word bbox in page pixel coordinates (clamped to page bounds during crop, preserved here as-is).
  • block/line -- IAM-style hierarchy.

Load with HuggingFace datasets:

from datasets import load_dataset
ds = load_dataset("csv", data_files={"train": "data/train.csv", "validation": "data/validation.csv", "test": "data/test.csv"})

For image models, join file_name to the page image on disk.

Collection Methodology

1115 pages of handwritten Persian notes (course material: transportation, statistics, mathematics, etc.) scanned at high resolution (A4@300dpi or phone photos) as RGB PNGs. Original scans under Raw Data/ are never modified; canonical copies under raw/pages/ are renamed page_XXXX.jpg (JPEG q95).

Annotation Process

Word-level bboxes + transcriptions, stored as block,line,x,y,x2,y2,text per word. Parsed with pandas (UTF-8), merged, normalized, and split by page.

Normalization Rules

text_raw is preserved; text is normalized:

  1. Unicode NFC
  2. hazm.Normalizer (remove_diacritics=True, persian_numbers=False):
    • Arabic ي/ك -> Persian ی/ک
    • Diacritics removed
    • ZWNJ kept (e.g. می‌شود)
    • Digits kept exactly as written (Persian digits stay Persian)
  3. Whitespace collapse

Split Definition

  • Page-level, random_state=42, 70/15/15 train/validation/test.
  • No page appears in more than one split (verified in QC report).
  • Mapping in data/page_split_manifest.csv.

Class Distribution

split pages rows
train 780 149506
validation 167 33946
test 168 32750
total 1115 216202

Top-100 token frequencies: reports/class_balance_top100.csv.

Intended Uses

  • Page-level handwriting OCR / image-to-text (TrOCR-style).
  • Word detection and recognition (DBNet, PaddleOCR, etc.).
  • Deriving word/line crops for specialized training.
  • Research on Persian script, mixed Persian/English, and math notation.

Limitations

  • Mixed Persian prose, English tokens, and LaTeX-style math; some transcriptions are noisy.
  • 30 empty-text rows were dropped; one 511-char LaTeX string is an anomaly (flagged in QC).
  • No writer identity; style varies across pages.
  • Bboxes are word-level; some formulas span multiple words.

Known GT Errors: Human Revision Required

The ground truth (GT) annotations contain errors that are already present in the dataset. Before using this dataset for training, evaluation, or any benchmark, it must be revised by human taggers. Known issues include:

  • Invalid bounding boxes: 106 rows have bboxes that exceed page bounds (see reports/qc_report.md).
  • Dropped empty-text rows: 30 rows with empty/whitespace-only text were removed during processing.
  • Anomalous long transcriptions: 62 rows exceed 100 characters (mostly LaTeX-style math); one 511-char string is a known anomaly.
  • Noisy transcriptions: some word transcriptions are noisy or incorrect.

The full audit is in reports/qc_report.md. Consumers should treat the GT as unverified and schedule a human review pass before relying on it.

Citation

@misc{persian_handwrite_ocr_2026,
  author       = {Mohammadzade, MohammadReza and Saemi, Payam},
  title        = {Persian Handwriting OCR Dataset},
  year         = {2026},
  publisher    = {Hugging Face},
  journal      = {Hugging Face Hub},
  howpublished = {\url{https://huggingface.co/datasets/MR3z4/persian-handwriting-ocr}},
  note         = {1115 pages, 216k word annotations with bboxes and transcriptions}
}

Contact

For questions or issues, contact Payam Saemi at payamsaemi@gmail.com or MohammadReza Mohammadzade at mohammadzade.m.r@gmail.com.

Downloads last month
-