New PaddleOCR-VL doesn't work with Urdu documents
🔎 Search before asking
- [x] I have searched the PaddleOCR Docs and found no similar bug report.
- [x] I have searched the PaddleOCR Issues and found no similar bug report.
- [x] I have searched the PaddleOCR Discussions and found no similar bug report.
🐛 Bug (问题描述)
Issue: PaddleOCR-VL Fails to Recognize Urdu Documents
🧾 Description
The newly released PaddleOCR-VL model exhibits significant issues when processing Urdu documents. Despite its support for over 100 languages, including Arabic, the model struggles with accurate detection and recognition of Urdu text.
🔍 Observed Problems
-
Detection Failures: The model often fails to detect Urdu text regions, possibly due to limitations in the detector model.
-
Incorrect Recognition: When text is detected, characters are frequently misrecognized. For instance, the letter "ق" may be incorrectly identified, or "خ" might be recognized as "ف".
-
Language Model Mismatch: Urdu and Arabic, while sharing some script similarities, have distinct dictionaries and character forms. Utilizing Arabic-trained models for Urdu recognition leads to suboptimal performance.
-
Right-to-Left (RTL) Processing: Even when Urdu text is recognized, the output is often processed in a left-to-right order, which is incorrect for RTL languages like Urdu.
🔧 Technical Insights
Urdu, being a cursive script with context-dependent character shapes, poses unique challenges for OCR systems. Existing models, such as the Arabic PP-OCRv3, are tailored for Arabic script and do not generalize well to Urdu. Additionally, the absence of a dedicated Urdu language model exacerbates recognition issues.
🛠️ Suggested Solutions
-
Fine-Tuning: Consider fine-tuning existing Arabic models with a substantial Urdu corpus to adapt the model to Urdu-specific nuances.
-
Model Development: Develop a dedicated Urdu OCR model trained on a comprehensive Urdu dataset to improve accuracy.
-
Post-Processing: Implement post-processing steps to reorder text correctly for RTL languages.
🏃♂️ Environment (运行环境)
linux-mint```
### 🌰 Minimal Reproducible Example (最小可复现问题的Demo)
```bash
#general fact
Thank you for your valuable feedback. To help us pinpoint the issues more accurately, would you mind sharing some example images with us?
output :
کویی گی را روانی صرف آس و قتت رکتاپ، جب کاس کوتر و یا گیا تو ب
نمای و روائی کی اثنولات گیزرا رروانی کی نتیجین دجای طوری پژین آنی -صرب
اوتتقی آدی و کاس به رواتی چه کسی دو روسپتین یا گوه که خافا اثنولات گیز
کاروائی کری -بتی و جب که کسربا و رتقوی کی اثنولات گیزرا و که لپه ائات کاری
فرلیین -اییا شق یا گوه کی گی حال تین دوم رس و آشتیل رس و والک مگین
کری -اas لپ یفری نر طوری و هو روم س کی طرف س پژین آنی -والک بوی ر رودان
س گوی گوژار بگ
یفرت کا قانون بچا کوغو غافات فترت زمتر رکیا ہے -یکی حالت
میں سازش کے ظافی چیت وپار کرتا ایک بف آدہ کام ہے - کرے کا اصل کام می
چیت کرو دہ چیت آپ کو دش طور چیتم مبلی جای با - خود دیا چیت اگرز یادہے زیادہ صبر اور
تقویی کی اپرٹ پییا کی جای - اس کے بعد شلکات کے ابساب اس طرح ثم
بچا تین گے - یکی کرو دہ چیت میں -
خدا گیتی پات (creation plan of God) (کمطابت، زدیگ
سین بیشتر و نقلت هم چین سیل مبودن رثی — ماگل (problems) (و درواع
(opportunities) -چن طرح نزدیی تین بیشتر ماگل مودور رچین، ای
طرح نزدیی تین بیشتر و نقی مودور رچین -ای، بات تین اثم مدیک
طریق، اطلام کم طرب، یچک -ماس لوظراندا لیا بچا و اوموا آثق کو اشعال
Ignore the problems, avail the opportunities
کیا جای:
ماس لا اضافه، صف آس و قت و فواط رحب اب و بای و بیای تیم زودگی کی شبت
تیرک یلا لواو -بتی اش مدیک چ واری بای اطلام کام طریقی -
إِنَّ تَحْيَرَآ
ترآین کی سوره بُبرر 3ٌٌٌٌٌٌٌٍّ اِسْوَالِ اِسْوَالِ اِسْوَالِ اِ
قرآن کی یاتفظت کے ایک قواند و بتاق بے - اس کے محلوم
جبتا جب کر اس دیا تین سازش (conspiracy) کے جدوا، اصل ملطئینے
بکہ اصل ملطئینے ہراتقوی کی گنہ جب -¿ن ہو گوں کے امرصر اور تقویی کی مضت
موجود ہو، اِن کے لیے دو روس وک از اشر اور ثانی غیر موثر بوم کرده جب گی،
وہ اِن کو چگ载ی گی فتصان دپہنچا کے
صرف کویی اثنای مفت (inaction) تثم-مربط و اطیح
انال مفت به: بس کویت نروزل (self control) (با بابا با تین
ووروس و کویپ آیرو مولاس اطیپ اثر کرچون از توژی اثنای شترت شونک
تخت اثنای زندگی مضویم، بانات آطیق نول مطبب یاب که آدی کی نویج تفرش نویج
(self-oriented thinking) (مود: بکر، بکر، و خدا آری زوج
(God-oriented thinking) (بود: بکان، با آدرس، با کومراه) (خدا آری تاییات
کمطابن به: دکیا اثنای خواشات ادرج بات مماینار، بلوگ مرب و اطیق نویج اول
وژش و اختیار رکیل، آن: خواش فاد وروم لک نویج را وایان چپ آب با اثر توچ گل
گ- یکیل ا در دیا، تاکنای یاب که کول نمی گیر طوب و اقد و میش وطرف و رروای
ک- یتین یتین آنا، تکرم رکیل و رروای و اکی تثیین
کے نتیجے میں پریٹ آتا ہے، نکریم فیک لبڑا فراور آتا کے نتیجے میں -
یفترت کا ایک تاکنہ قوانت ہے کہ کوئی څنص یا گروہ محترل ذہن کے ختک کی
کے خلاف کوئی چالافات کا ررووائی ہنہیں کرتا- ایک څنص یا گروہ کی دو مرے کے ظاف
As urdu speaker /writer this is all bullshit , I rate it 0/10
For ref , image is below :
Ok , you may think i should use parse chart , I used but same bull shit , this is just sample i test various font , style
Thank you for your feedback, we will further investigate and improve PaddleOCR-VL to better support Urdu documents.
please add support for at least famous urdu fonts , pls