Image Captioning using DINOv2 Vision Transformer (ViT) model
Loading...
Date
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
University of El Oued جامعة الوادي
Abstract
توصيف الصور هو مهمة متعددة الوسائط تجمع بين الرؤية الحاسوبية ومعالجة اللغة الطبيعية بهدف توليد أوصاف نصية للصور بشكل آلي. وعلى عكس تصنيف الصور أو كشف الكائنات، يتطلب توصيف الصور فهماً عميقاً لمحتوى المشهد، بما في ذلك الكائنات الموجودة فيه وخصائصها والعلاقات التي تربط بينها والسياق العام المحيط بها، من أجل إنتاج أوصاف متماسكة وذات معنى بلغة طبيعية. في هذه المذكرة، نقترح إطار عمل لتوصيف الصور يجمع بين نموذج محول الرؤية ذاتي الإشراف ونموذج لغوي مُدرَّب مسبقاً لتوليد النصوص. ولردم الفجوة بين التمثيلات البصرية والنصية، تم استخدام وحدة تكييف للاستعلامات البصرية تقوم بتحويل الخصائص المستخرجة من الصور إلى تمثيلات مناسبة لتوليد اللغة بالاعتماد على آليات الانتباه المتقاطع. كما تم اعتماد استراتيجية ضبط دقيق تدريجية مكونة من مرحلتين بهدف تحسين التوافق بين المعلومات البصرية واللغوية مع الحفاظ على المعرفة المكتسبة مسبقاً. تم تدريب الإطار المقترح وتقييمه باستخدام مجموعة بيانات معيارية واسعة لتوصيف الصور، وأظهرت النتائج التجريبية فعالية النهج المقترح وقدرته على توليد أوصاف دقيقة ومفهومة ومرنة من الناحية اللغوية وتحمل معنى دلالياً قوياً. وإلى جانب التقييم الكمي، يستعرض هذا العمل تطبيقاً تعليمياً قائماً على التلعيب يستفيد من الأوصاف المولدة بواسطة الذكاء الاصطناعي لدعم تعلم اللغة الإنجليزية وتنمية مهارات الوصف الكتابي. وتبين النتائج أن دمج مُرمِّز بصري ذاتي الإشراف مع نموذج لغوي مُدرَّب مسبقاً من خلال وحدة تكييف خفيفة الوزن يوفر حلاً فعالاً وذا كفاءة حسابية لتوصيف الصور، كما يفتح آفاقاً واعدة لاستخدام هذه التقنيات في التطبيقات التعليمية التفاعلية الواقعية.Image captioning is a multimodal task that combines Computer Vision and Natural Language Processing to automatically generate textual descriptions of images. Unlike image classification or object
detection, image captioning requires understanding not only the objects present in a scene, but also their attributes, relationships, and overall context in order to produce coherent and meaningful natural language descriptions.
In this thesis, we propose an image captioning framework that combines the DINOv2 Vision Transformer with the GPT-2 language model. To effectively bridge the gap between visual and textual
representations, a Visual Query Adapter is introduced to transform visual features into a representation suitable for language generation through cross-attention mechanisms. In addition, a progressive twostage fine-tuning strategy is employed to improve cross-modal alignment while preserving pretrained knowledge.
The proposed framework was trained and evaluated on the MS COCO dataset. Experimental results demonstrate the effectiveness of the approach. In particular, the high METEOR score highlights the model’s ability to generate semantically meaningful and linguistically flexible captions.
Beyond quantitative evaluation, this work explores a practical application of image captioning through Caption Quest, a gamified educational prototype that leverages AI generated captions to support English language learning. This application demonstrates how modern vision-language models can be
integrated into interactive learning environments.
Overall, the results show that combining a self-supervised visual encoder with a pretrained language model through a lightweight adaptation module provides an effective and computationally efficient solution for image captioning while opening opportunities for real world educational applications.Image Captioning, DINOv2, Vision Transformer, GPT-2, Visual Query Adapter, Cross-Attention, Fine-Tuning, Multimodal Learning.
Description
مذكرة ماستر إعلام ألي
Citation
قنوعة ،هديل.حنكة، إيناس.Molecular Spectroscopy. Pedagogical publication.Department of computer science.Faculty of Exact Sciences.University of El Oued, 2025