چالش‌های پیاده‌سازی مدل‌های بینایی-زبانی برای نویسه‌خوانی نوری در زبان فارسی

نوع مقاله : مقاله پژوهشی

نویسندگان

پژوهشکده فناوری اطلاعات، پژوهشگاه علوم و فناوری اطلاعات ایران (ایرانداک)، تهران، ایران

10.22091/stim.2026.14578.2310

چکیده

نویسه‌خوانی نوری به عنوان یک فناوری پیشرفته در حوزه پردازش اسناد، نقش تعیین‌کننده‌ای در فرآیند دیجیتالی‌سازی ایفا می‌نماید. این سیستم با بهره‌گیری از الگوریتم‌های پیچیده پردازش تصویر و مدل‌های یادگیری عمیق، قادر به تشخیص و استخراج کاراکترهای متنی از تصاویر اسناد می‌باشد. خروجی این فرآیند، داده‌های متنی ساختاریافته‌ای است که توسط سیستم‌های کامپیوتری قابل پردازش و تحلیل می‌باشد. کاربردهای این فناوری در حوزه مدیریت هوشمند اسناد بسیار گسترده بوده و شامل سیستم‌های پیشرفته بایگانی و نمایه‌سازی، استخراج خودکار اطلاعات از اسناد و همچنین توسعه سامانه‌های کارآمد بازیابی اطلاعات می‌شود. علاوه بر این، قابلیت‌های OCR بستر لازم برای توسعه مدل‌های زبانی تخصصی و سیستم‌های پردازش پیشرفته متون را در حوزه‌های علمی و صنعتی فراهم می‌آورد. این فناوری با تبدیل اسناد کاغذی به داده‌های دیجیتال، نه تنها امکان ذخیره‌سازی و بازیابی کارآمد اطلاعات را مهیا می‌سازد، بلکه زمینه را برای تحلیل‌های پیشرفته مبتنی بر هوش مصنوعی بر روی اسناد را نیز فراهم می‌نماید.
در سال‌های اخیر، مدل‌های بینایی-زبانی مبتنی بر معماری ترنسفورمر، با بهره‌گیری از مدل‌های از پیش‌آموزش‌دیده عظیم و مجموعه‌داده‌های گسترده، پیشرفت‌های چشمگیری در این حوزه، به‌ویژه در زبان انگلیسی، ایجاد کرده‌اند؛ با این حال، عملکرد این مدل‌ها در زبان‌های با ساختار پیچیده‌تر، مانند فارسی، همچنان با چالش‌های جدی روبه‌روست و مقالات محدودی با کاربرد محدود در این زمینه ارائه شده است. این پژوهش به بررسی عملکرد و چالش‌های مدل‌های بینایی-زبانی در استخراج متون فارسی از تصاویر می‌پردازد؛ زبان فارسی به دلیل ویژگی‌های منحصربه‌فردی که دارد، مانند اتصال حروف، جهت نوشتار راست‌به‌چپ و وجود نویسه‌های هم‌پوشان در مقایسه با زبان‌های لاتین به‌طور چشمگیری چالشهای بیشتری دارد. در این پژوهش ابتدا، یک مجموعه‌داده باکیفیت شامل ۱۷۴۳۶۱ جمله فارسی به صورت متن و عکس از کتاب‌های دیجیتال، برای آموزش مدلها در زبان فارسی،‌ تولید شده است . علاوه بر آن، یک مجموعه‌داده آزمایشی مجزا، متنوع و چالش‌برانگیز طراحی گردیده که سناریوهای دنیای واقعی را پوشش می‌دهد. در ادامه، یک مدل بینایی-زبانی ارائه شده است که بر اساس یک معماری دو مرحله‌ای طراحی گردیده: ابتدا یک کدگذار بینایی از پیش‌آموزش‌دیده ویژگی‌های تصویری پیچیده را استخراج می‌کند و سپس یک کدگشای زبانی اختصاصی که به‌طور ویژه بر روی یک مجموعه حجیم از متون فارسی پیش‌آموزش دیده، متن متناظر را با رعایت ساختارهای دستوری و املایی زبان فارسی تولید می‌نماید. این جداسازی ، امکان بهینه‌سازی مستقل هر دو مؤلفه را فراهم کرده و به مدل درک بصری قوی‌تری از تصاویر و در عین حال درک زبانی عمیق‌تری از فارسی می‌بخشد. مدل نهایی سپس با استفاده از مجموعه داده آموزشی مذکور تحت فرآیند تنظیم دقیق قرار گرفته است. نتایج با سیستم تِسِراکت که یک مدل مبتنی بر شبکه های پیچشی ارائه شده توسط گوگل و همچنین مدل Qwen2.5-VL-7B که یک مدل بینایی-زبانی ارائه شده توسط شرکت علی بابا مقایسه شده است. ارزیابی‌های جامع نشان می‌دهد که مدل پیشنهادی به دقت ۹۸ درصدی در سطح کلمه (WER = 2٪) در داده آزمایشی جملات فارسی دست می‌یابد که گواهی بر توانایی بالای آن در پردازش متن فارسی است؛ با این وجود، تحلیل خطاها نشان می‌دهد که مدل در بازشناسی اعداد فارسی اعداد لاتین و همچنین کلمات انگلیسی در متن‌های ترکیبی، ضعیف است. این ضعف در تشخیص اعداد فارسی در تمام مدلهای بررسی شده وجود دارد.که عمدتاً ناشی از کمبود تنوع ساختاری و زبانی در مجموعه داده آموزشی است. بر این اساس، غنی‌سازی مجموعه داده آموزشی با نمونه‌های متنوع‌تر و متعاقباً بازآموزی مدل، به‌عنوان گامی ضروری برای تحقق یک سیستم OCR فارسی‌محور، جامع در شرایط واقعی پیشنهاد می‌گردد. نکته قابل تأمل این است که مدل تِسِراکت با وجود اینکه مبتنی بر شبکه‌های پیچشی و بازگشتی و دارای معماری ساده‌تر و تعداد پارامترهای کمتری از مدلهای بینایی-زبانی است، در مجموع (حتی در پردازش متون انگلیسی) عملکردی رقابتی یا برتر نسبت به برخی مدل‌های بزرگ‌مقیاس تلفیقی داشته است؛ این نتیجه احتمالا به این دلیل است که داده آموزشی آن با توجه به ساختار مدل، جامع و مناسب برای نویسه‌خوانی نوری است. دسترسی به تعداد مناسب داده تمیز فارسی محدود است، اما نتایج به خوبی نشان می دهد که ایجاد داده متنوع توانایی نویسه خوانی نوری مبتنی بر ترنسفورمرها را نسبت به روشهای کلاسیک مبتنی بر شبکه های پیچشی بهبود می دهد.

کلیدواژه‌ها

موضوعات


عنوان مقاله [English]

Challenges in Implementing Vision-Language Models for Persian Optical Character Recognition

نویسندگان [English]

  • Azadeh Fakhrzadeh
  • Amir Hossein Seddighi
  • Alireza Mohammadi
Information Technology Research Department, Iranian Research Institute for Information Science and Technology(IranDoc), Tehran, Iran
چکیده [English]

Optical Character Recognition (OCR), as an advanced technology in the field of document processing, plays a pivotal role in the digitization process. By leveraging sophisticated image processing algorithms and deep learning models, this system is capable of detecting and extracting textual characters from document images. The output of this process consists of structured textual data that can be processed and analyzed by computer systems. The applications of this technology in intelligent document management are extensive, encompassing advanced archiving and indexing systems, automatic information extraction from documents, and the development of efficient information retrieval systems. Furthermore, OCR capabilities provide the necessary foundation for developing specialized language models and advanced text processing systems in scientific and industrial domains. By converting paper documents into digital data, this technology not only enables efficient storage and retrieval of information but also paves the way for advanced AI-driven analyses of documents.
In recent years, vision-language models based on the Transformer architecture, leveraging massive pre-trained models and extensive datasets, have achieved remarkable progress in this field, particularly for the English language. However, the performance of these models on languages with more complex structures, such as Persian, still faces significant challenges, and only a limited number of studies with narrow applicability have been presented in this area. This research investigates the performance and challenges of vision-language models in extracting Persian text from images. The Persian language, due to its unique characteristics, such as connected letter forms, right-to-left writing direction, and the presence of overlapping characters, poses considerably greater challenges compared to Latin-based languages.
In this study, first, a high-quality dataset comprising 174,361 Persian sentences in both text and image formats, sourced from digital books, was generated to train models for the Persian language. Additionally, a separate, diverse, and challenging evaluation dataset was designed to cover real-world scenarios. Subsequently, a vision-language model is proposed, designed based on a two-stage architecture: first, a pre-trained visual encoder extracts complex visual features, and then a specialized language decoder, specifically pre-trained on a large corpus of Persian texts, generates the corresponding text while adhering to Persian grammatical and orthographic structures. This decoupling enables independent optimization of both components, granting the model stronger visual understanding of images alongside deeper linguistic comprehension of Persian. The final model was then fine-tuned using the aforementioned training dataset.
The results were compared against Tesseract, a convolutional neural network-based model developed by Google, as well as Qwen2.5-VL-7B, a vision-language model introduced by Alibaba. Comprehensive evaluations demonstrate that the proposed model achieves 98% word-level accuracy (WER = 2%) on the Persian sentence test dataset, attesting to its strong capability in processing Persian text. Nevertheless, error analysis reveals that the model performs weakly in recognizing Persian numerals, Latin numerals, and English words within mixed-language texts. This weakness in Persian numeral recognition is observed across all evaluated models and is primarily attributed to the lack of structural and linguistic diversity in the training dataset. Accordingly, enriching the training dataset with more diverse samples, followed by model retraining, is proposed as an essential step toward realizing a comprehensive, Persian-centric OCR system effective in real-world conditions.
A noteworthy observation is that Tesseract, despite being based on convolutional and recurrent neural networks and featuring a simpler architecture with fewer parameters compared to vision-language models, demonstrates competitive or even superior overall performance (including in processing English texts) relative to some large-scale hybrid models. This outcome is likely because its training data, aligned with the model's architecture, is comprehensive and well-suited for optical character recognition tasks. Access to sufficient amounts of clean Persian data remains limited; however, the results clearly indicate that creating diverse datasets enhances the capability of Transformer-based OCR approaches relative to classical convolutional neural network-based methods.

کلیدواژه‌ها [English]

  • Optical Character Recognition (OCR)
  • Vision-Language Models
  • Transformer
  • Digitization
  • Information Management
  • Artificial Intelligence
CAPTCHA Image