image image | text string |
|---|---|
دگرگونیهایی | |
۳۱۹۵/۱۱/۲۱ | |
چه مدل آهنگیه | |
چی چه ربطی داره | |
مارکند | |
کنیس | |
من دوسش دارم خیلی خوشمزست | |
۶۳۴۰۶۹۳۲۰۰۶۷ | |
خب بعد درینک چجوری میرن خونه اشون نقلیه عمومی | |
منتظر شیرینی قبولی هستیم | |
ایتالیک | |
۹۴۱۹/۰۸/۲۶ | |
ربات تلگرامیه | |
مگه عطر مشهدیه | |
سالشه ینی | |
عمو فرزند خونده نمیخوای | |
توئن | |
وآنهایی | |
آمالگاماتور | |
(میتواند) | |
فایترز | |
هفی | |
مریضه، بره دکتر | |
دگل | |
مانورهای | |
سدون | |
آناتوس | |
میتوز | |
با ارفاق میتونم سبزههای با نمکم بپذیرم | |
چ صدایی داری | |
انگار اره | |
نوکری | |
وکاهش | |
فک کردم حال نداری نگو توام از خودمونی پ | |
عاطفوی | |
آقایونخانمها چه موقع وعده صد روزه دولت تموم میشه | |
رنگانگ | |
واسه اون سینگل | |
دنیای کوچکیست گرامیان | |
آشمیدن | |
خوب کم دیدی | |
میریم که یه روز تخمی رو شروع کنیم | |
البریچ | |
کمانداری | |
للبراق | |
معرفی و درگیر قافیه ن | |
۴۰۲۰۵۷۹۹۲۶۶۴ | |
حلاج | |
درفرخ | |
سوزان چرا هنوز لایک نکرده | |
حایزه | |
بودیییییییی | |
بارونقی | |
الافصاح | |
ویتری ینی چی اول بگو | |
پشی-زی | |
وای چقدر هوا گرم شده ساسی پختم | |
برادرشوهر | |
شوریاب | |
همکار%یهای | |
گلباغی | |
احاله | |
سلام روز بخیری | |
فهرستبرگه | |
اید=را | |
آرزوی منشورای ملی مقاومت برسمیت شناخته بشود | |
خیلی چرته | |
وقتی اکبر آخرین نفره که در مغازه رو میبنده | |
پارادوکسیکال | |
خیلی جالب بود برام | |
این چیزا زرنگی نیست | |
ترییر | |
۸۲۶۴/۰۴/۲۲ | |
تو رو هاروارد بورسیه میکنه | |
کارنسی | |
عمر | |
یه زمانی فکر میکردم رستم پور یه کمی شرف داره | |
دست میزاری رو شیرازیش | |
۵۱۳۹/۰۶/۱۳ | |
گیرمان | |
۶۰۱۲۷۰۰۱۱۸ | |
گروپس | |
ائتلافشان | |
عموهایم | |
جادادن | |
من نصفه ولش کردم کیوان خیلی خسته کننده بود | |
ببخشید پشتم بهته | |
۶۶۲۲۷۸۷۹۶۷۶۸ | |
توطین | |
برای تقویت معده چی خوبه | |
مردم آزاری از صفات بارز وی بود | |
۱۰۱۵۳۰۴۲۰۵ | |
وجب | |
اوکآن | |
همه رو دیدماز بقیه | |
۴۸۵۷۸۲۱۲۵۱۰۳ | |
سفیدظاهر | |
شوپانتزیگ | |
حکمفرماست | |
لعنتی لعنتی لعنتی خامنهای باید پیش تو لنگ بندازه |
Synthetic Persian OCR Dataset (4M)
This dataset contains 4,000,000 synthetic Persian text line images generated using a customized Persian fork of TextRecognitionDataGenerator (trdg). It is designed specifically for training high-performance optical character recognition (OCR) and text recognition models for Persian text.
This dataset served as the foundational pre-training dataset for the official Hezar AI Persian OCR models, including hezarai/crnn-base-fa-v2 and hezarai/crnn-fa-license-plate-recognition-v2.
Dataset Overview
- Total Samples: 4,000,000 text line images
- Language: Persian (
fa) - Text Source: Sampled directly from the
hezarai/lscp-pos-500kdictionary corpus. - Generator Tools: hezarai/trdg-persian (featuring custom RTL fixes, ligature preservation, and word-split handling).
- Primary Use Case: Pre-training or fine-tuning OCR models (CRNN, TrOCR, Donut, etc.) for general Persian text and downstream fine-tuning (e.g., license plates, document scanning).
Generation Details & Splitting Strategy
The 4M dataset consists of three distinct partitions designed to expose OCR models to diverse text colors, background textures, and quality degradations:
| Partition | Sample Count | Index Range | Background Type | Text Color Palette | Quality Degradation |
|---|---|---|---|---|---|
| Part 1 (Gaussian Noise) | 3,000,000 | 0 – 2,999,999 |
Gaussian Noise (-b 0) |
Dark tones (#284854, #542828) |
50% downscaling, 20% applied (-rqf 0.5 -rqp 0.2) |
| Part 2 (Light Documents) | 1,000,000 | 3,000,000 – 3,999,999 |
Light Doc Backgrounds (-b 3) |
Dark tones (#284854, #542828) |
Standard quality |
| Part 3 (Dark Documents) | 1,000,000 | 4,000,000 – 4,999,999 |
Dark Doc Backgrounds (-b 3) |
Soft pastel tones (#ed8c8c, #8ceced) |
50% downscaling, 20% applied (-rqf 0.5 -rqp 0.2) |
Generation Commands
The dataset was generated using the following three command executions:
# 1. Main subset: Gaussian noise backgrounds with quality degradation (3M)
trdg --output_dir ./data/fa-mixed -l fa -fd trdg/fonts/fa --dict trdg/dicts/fa_mixed_clean.txt \
-t 48 -c 3000000 -sti 0 -w 1 -rqf 0.5 -rqp 0.2 -m 3,3,3,3 -tc "#284854,#542828" \
-k 5 -rk -na 1 -ws -b 0 -f 48 -tdir rtl
# 2. Light document background subset (1M)
trdg --output_dir ./data/fa-mixed -l fa -fd trdg/fonts/fa --dict trdg/dicts/fa_mixed_clean.txt \
-t 48 -c 1000000 -sti 3000000 -w 1 -m 3,3,3,3 -tc "#284854,#542828" \
-k 5 -rk -na 1 -ws -b 0 -f 48 -tdir rtl -b 3 -id trdg/generators/documents_light
# 3. Dark document background subset with light text and quality degradation (1M)
trdg --output_dir ./data/fa-mixed -l fa -fd trdg/fonts/fa --dict trdg/dicts/fa_mixed_clean.txt \
-t 48 -c 1000000 -sti 4000000 -w 1 -rqf 0.5 -rqp 0.2 -m 3,3,3,3 -tc "#ed8c8c,#8ceced" \
-k 5 -rk -na 1 -ws -b 0 -f 48 -tdir rtl -b 3 -id trdg/generators/documents_dark
Parameter Breakdown
-tdir rtl: Configures Right-to-Left rendering logic critical for Persian typography.-ws: Word-split mode enabled to preserve Persian ligatures and complex letter joining.-k 5 -rk: Applies a random rotation/skew angle between-5°and+5°.-m 3,3,3,3: Adds a 3-pixel margin surrounding the text.-f 48: Fixed image height set to 48 pixels.-fd trdg/fonts/fa: Utilizes a comprehensive directory of Persian TTF/OTF fonts.-na 1: Saved filename structure as[ID]_[TEXT].[EXT].
Pre-trained Models Trained on This Data
This dataset has proven effective for general Persian text recognition as well as downstream fine-tuning. Models trained on this dataset include:
- General Persian OCR:
- Specialized Fine-tuned Models:
Citation & Acknowledgments
If you use this dataset or the generation pipeline in your research or applications, please reference the Hezar Project and the custom Persian generator repository.
@misc{trdg-persian,
author = {Hezar AI},
title = {TRDG Persian: Synthetic Text Generator for Persian OCR},
year = {2024},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{[https://github.com/hezarai/trdg-persian](https://github.com/hezarai/trdg-persian)}}
}
- Downloads last month
- 96