دراسة حول الكشف التلقائي عن عدد حبوب سنابل القمح بناءً على التعلم العميق
Study on automatic detection of wheat spike grain number based on deep learning

شارك:
المجلة: Frontiers in Plant Science، المجلد: 17
DOI: https://doi.org/10.3389/fpls.2026.1724501
PMID: https://pubmed.ncbi.nlm.nih.gov/41821941
تاريخ النشر: 2026-02-25
المؤلف: Hecang Zang وآخرون
الموضوع الرئيسي: الزراعة الذكية والذكاء الاصطناعي

نظرة عامة

تتناول هذه الدراسة الحاجة الملحة للكشف التلقائي وعدّ حبوب سنابل القمح، وهو مقياس رئيسي لتقدير إنتاجية القمح. تعتمد الطرق التقليدية على العد اليدوي بعد الدراس، مما يتطلب جهدًا كبيرًا ووقتًا طويلاً. للتغلب على هذه التحديات، استخدم الباحثون تقنيات رؤية الكمبيوتر المتقدمة، وجمعوا 936 صورة لحبوب سنابل القمح وقاموا بتعزيزها لإنشاء مجموعة بيانات مكونة من 3700 صورة. قاموا بتقييم ستة نماذج متقدمة للتعلم العميق، بما في ذلك تكوينات مختلفة من YOLOv8 وFaster R-CNN، حيث أظهر نموذج YOLOv8n أداءً متفوقًا في الدقة (96.8%)، والاسترجاع (96.8%)، ومتوسط الدقة العامة (mAP50) (98.9%).

لم يقتصر نموذج YOLOv8n على التفوق على نظرائه في دقة الكشف، بل أظهر أيضًا مزايا في الكفاءة الحاسوبية، حيث يتطلب عددًا أقل من المعلمات وذاكرة GPU أقل. اختتمت الدراسة بتطوير برنامج مصغر على WeChat لعد حبوب سنابل القمح تلقائيًا، مما يحمل وعدًا لتحسين عمليات تقدير الإنتاجية ليس فقط للقمح ولكن ربما لمحاصيل أخرى أيضًا. تشير النتائج إلى أن هذا النهج يقلل بشكل كبير من التعقيد والوقت المرتبطين بالعد اليدوي، مما يحسن من كفاءة ودقة ممارسات تربية القمح. تشمل اتجاهات البحث المستقبلية دمج البيانات متعددة الوسائط وإنشاء مجموعة بيانات مشتركة لتعزيز منهجيات تقدير الإنتاجية بشكل أكبر.

مقدمة

تسلط المقدمة الضوء على الدور الحيوي للقمح كمحصول غذائي أساسي، حيث يدعم ثلث سكان العالم ويتطلب زيادة كبيرة في إنتاج الغذاء لتلبية احتياجات ما يقدر بـ 9.7 مليار شخص بحلول عام 2050. تؤكد الورقة على أهمية التنبؤ بدقة بإنتاجية القمح، مع التركيز بشكل خاص على عدد الحبوب لكل سنبلة كمعلمة رئيسية لتقدير الإنتاجية. تعتبر الطرق التقليدية لعد حبوب القمح كثيفة العمالة وغير فعالة، مما يبرز الحاجة إلى تقنيات الكشف والعد التلقائي في أبحاث ظاهرة القمح.

أدت التقدمات الأخيرة في رؤية الكمبيوتر وتعلم الآلة إلى تقدم كبير في منهجيات عد حبوب القمح. استخدمت دراسات مختلفة خوارزميات متنوعة، بما في ذلك معالجة الصور التقليدية وتقنيات التعلم العميق، محققة درجات متفاوتة من الدقة. ومن الجدير بالذكر أن نماذج التعلم العميق، وخاصة تلك المستندة إلى بنية YOLO، أظهرت أداءً متفوقًا في الكشف عن سنابل القمح وعدّها، مما يعالج التحديات مثل كثافة الحبوب والاحتباس. تهدف هذه الدراسة إلى تقييم فعالية ستة نماذج متقدمة للتعلم العميق، بما في ذلك إصدارات مختلفة من YOLOv8 وFaster R-CNN، لتحديد النهج الأكثر فعالية للكشف عن حبوب سنابل القمح وعدّها في بيئات الحقل المعقدة.

طرق البحث

استخدمت الإعدادات التجريبية معالج Intel Core i7-10600 يعمل بتردد 2.90 جيجاهرتز وبطاقة رسومات NVIDIA GeForce RTX 3090 بسعة 24 جيجابايت من ذاكرة الفيديو. كانت إطار العمل البرمجي المستخدم في التجربة هو PyTorch، الذي سهل إدخال مجموعة البيانات في دفعات وسمح بالتكرار عبر جميع الدفعات لإكمال دورة تدريبية واحدة.

لتحسين الأداء، تم اختيار خوارزمية آدم، مع حجم دفعة تدريب يبلغ 8. تضمنت التجربة إجمالي 1000 تكرار، بدءًا من معدل تعلم أولي قدره 0.001، والذي تم تصميمه ليتناقص تدريجيًا إلى 0.0001 مع زيادة عدد التكرارات. كان الهدف من هذا التكوين هو تعزيز كفاءة وفعالية عملية التدريب.

النتائج

تظهر نتائج الدراسة فعالية نماذج التعلم العميق المختلفة، وخاصة YOLOv8 وFaster R-CNN، في الكشف عن حبوب القمح وعدّها. تم تدريب كلا النموذجين باستخدام تكوين موحد، بما في ذلك مُحسّن SGD، وحجم دفعة قدره 16، وحجم صورة إدخال قدره $640 \times 640$، و1000 دورة تدريبية، مع معدل تعلم قدره 0.001 تم تحسينه من خلال البحث الشبكي. استخدمت عملية التدريب استراتيجية إيقاف مبكر لتقليل الإفراط في التكيف، مما أدى إلى التقارب عادةً في غضون بضع مئات من التكرارات. أظهرت التحليلات أن نموذج YOLOv8n أظهر أداءً متفوقًا، محققًا أعلى معدلات دقة واسترجاع بلغت 96.8% والحفاظ على أفضل خصائص التقارب، كما يتضح من اتجاهات خسارة التدريب.

كشفت التجارب المقارنة على مجموعة بيانات صور حبوب القمح التي تم إنشاؤها ذاتيًا أن YOLOv8n تفوق على النماذج الأخرى من حيث الدقة، والاسترجاع، ومتوسط الدقة العامة عند IoU 0.50 (mAP50)، ومتوسط الدقة العامة عند IoU 0.50-0.95 (mAP50-95)، بقيم بلغت 96.8%، 96.8%، 98.9%، و58.4% على التوالي. في المقابل، سجلت Faster R-CNN مقاييس أقل، حيث كانت الدقة، والاسترجاع، وmAP50، وmAP50-95 عند 95.7%، 95.5%، 97.7%، و57.1%. على الرغم من التحسينات العامة في دقة العد، لاحظت الدراسة أن الأخطاء نشأت بشكل أساسي من سوء تعريف النموذج للأغلفة وآذان القمح بدون حبوب. أكدت التحقق من نتائج الاختبار موثوقية YOLOv8n، مع خطأ نسبي متوسط قدره 3.6% في العد، مما يظهر انخفاضًا ملحوظًا في أخطاء التنبؤ مقارنة بالنماذج الأخرى.

المناقشة

في هذه الدراسة، تم تطوير نظام شامل لعد حبوب سنابل القمح، باستخدام نماذج التعلم العميق المتقدمة، وخاصة تكوينات مختلفة من YOLOv8 وFaster R-CNN، لتعزيز دقة وكفاءة الكشف عن الحبوب في البيئات الزراعية. تم إجراء الإعداد التجريبي في مقاطعة يوانغ، مقاطعة خنان، الصين، التي تتميز بمناخ شبه جاف وتربة رملية طينية مدية. تم اختبار ما مجموعه 80 نوعًا من القمح تحت ظروف محكومة، مع تصميم كتلة عشوائية وبروتوكولات تخصيب وري محددة. تم جمع بيانات الصور خلال مرحلة ملء القمح، مع التركيز على التقاط صور عالية الجودة لسنابل القمح والحبوب باستخدام iPhone 15 Pro Max، مما أسفر عن مجموعة بيانات مكونة من 936 صورة موضحة.

أظهرت نماذج التعلم العميق المستخدمة في هذا البحث قدرات كبيرة في استخراج الميزات والتصنيف، حيث أظهر YOLOv8n أداءً متفوقًا من حيث دقة الكشف وكفاءة الحوسبة مقارنة بالنماذج الأخرى. تم استخدام مقاييس التقييم مثل الدقة، والاسترجاع، ومتوسط الدقة العامة (mAP)، وجذر متوسط مربع الخطأ (RMSE) لتقييم أداء النموذج، مما كشف أن YOLOv8n حقق قيمة R² قدرها 0.94 وRMSE قدره 1.02، مما يشير إلى قوة كبيرة في مهام عد الحبوب. تم دمج النظام في برنامج مصغر على WeChat، مما يسهل الوصول السهل للمستخدمين للباحثين الزراعيين لتحميل الصور واستلام عد الحبوب في الوقت الحقيقي، مما يعزز الكفاءة التشغيلية في ممارسات تربية القمح. تم تصميم بنية الخلفية لإدارة البيانات بشكل آمن وفعال، مع استخدام تشفير SSL وحلول التخزين السحابي لضمان سلامة البيانات وسهولة الوصول إليها.

Journal: Frontiers in Plant Science, Volume: 17
DOI: https://doi.org/10.3389/fpls.2026.1724501
PMID: https://pubmed.ncbi.nlm.nih.gov/41821941
Publication Date: 2026-02-25
Author(s): Hecang Zang et al.
Primary Topic: Smart Agriculture and AI

Overview

This study addresses the critical need for automated detection and counting of wheat spike grains, a key metric for estimating wheat yield. Traditional methods rely on manual counting post-threshing, which are labor-intensive and time-consuming. To overcome these challenges, the researchers employed advanced computer vision techniques, collecting 936 images of wheat spike grains and augmenting them to create a dataset of 3700 images. They evaluated six state-of-the-art deep learning models, including various configurations of YOLOv8 and Faster R-CNN, with YOLOv8n demonstrating superior performance in precision (96.8%), recall (96.8%), and mean Average Precision (mAP50) (98.9%).

The YOLOv8n model not only outperformed its counterparts in detection accuracy but also exhibited advantages in computational efficiency, requiring fewer parameters and less GPU memory. The study culminated in the development of a WeChat mini program for automatic wheat spike grain counting, which holds promise for enhancing yield estimation processes not only for wheat but potentially for other crops as well. The findings suggest that this approach significantly reduces the complexity and time associated with manual counting, thereby improving the efficiency and accuracy of wheat breeding practices. Future research directions include the integration of multimodal data and the creation of a shared dataset to further advance yield estimation methodologies.

Introduction

The introduction highlights the critical role of wheat as a staple food crop, supporting one-third of the global population and necessitating a significant increase in food production to meet the demands of an estimated 9.7 billion people by 2050. The paper emphasizes the importance of accurately predicting wheat yield, particularly focusing on the number of grains per spike as a key parameter for yield estimation. Traditional methods for counting wheat grains are labor-intensive and inefficient, underscoring the need for automated detection and counting techniques in wheat phenotype research.

Recent advancements in computer vision and machine learning have led to significant progress in wheat grain counting methodologies. Various studies have employed different algorithms, including traditional image processing and deep learning techniques, achieving varying degrees of accuracy. Notably, deep learning models, particularly those based on the YOLO architecture, have demonstrated superior performance in detecting and counting wheat spikes, addressing challenges such as grain density and occlusion. This study aims to evaluate the effectiveness of six state-of-the-art deep learning models, including various versions of YOLOv8 and Faster R-CNN, to identify the most effective approach for wheat spike grain detection and counting in complex field environments.

Methods

The experimental setup utilized an Intel Core i7-10600 CPU operating at a frequency of 2.90 GHz and an NVIDIA GeForce RTX 3090 GPU with 24GB of video memory. The software framework employed for the experiment was PyTorch, which facilitated the input of the dataset in batches and enabled iteration through all batches to complete a single training iteration.

For optimization, the Adam algorithm was selected, with a training batch size of 8. The experiment consisted of a total of 1000 iterations, starting with an initial learning rate of 0.001, which was designed to decay gradually to 0.0001 as the number of iterations increased. This configuration aimed to enhance the efficiency and effectiveness of the training process.

Results

The results of the study demonstrate the effectiveness of various deep learning models, specifically YOLOv8 and Faster R-CNN, in detecting and counting wheat grains. Both models were trained using a unified configuration, including an SGD optimizer, a batch size of 16, an input image size of $640 \times 640$, and 1000 training epochs, with a learning rate of 0.001 optimized through grid search. The training process employed an early stopping strategy to mitigate overfitting, leading to convergence typically within a few hundred iterations. The analysis indicated that the YOLOv8n model exhibited superior performance, achieving the highest accuracy and recall rates of 96.8% and maintaining the best convergence characteristics, as evidenced by the training loss trends.

Comparative experiments on a self-constructed wheat grain image dataset revealed that YOLOv8n outperformed other models in terms of precision, recall, mean Average Precision at IoU 0.50 (mAP50), and mean Average Precision at IoU 0.50-0.95 (mAP50-95), with values of 96.8%, 96.8%, 98.9%, and 58.4%, respectively. In contrast, Faster R-CNN recorded lower metrics, with precision, recall, mAP50, and mAP50-95 at 95.7%, 95.5%, 97.7%, and 57.1%. Despite the overall improvements in counting accuracy, the study noted that errors primarily arose from the model’s misidentification of glumes and ears without grains. The verification of test results further confirmed YOLOv8n’s reliability, with an average relative error of 3.6% in counting, demonstrating a marked reduction in prediction errors compared to other models.

Discussion

In this study, a comprehensive wheat spike grain counting system was developed, utilizing advanced deep learning models, specifically various configurations of YOLOv8 and Faster R-CNN, to enhance the accuracy and efficiency of grain detection in agricultural settings. The experimental setup was conducted in Yuanyang County, Henan Province, China, characterized by a semi-arid climate and sandy loamy tidal soil. A total of 80 wheat varieties were tested under controlled conditions, with a randomized block design and specific fertilization and irrigation protocols. Image data were collected during the wheat filling stage, focusing on capturing high-quality images of wheat spikes and grains using an iPhone 15 Pro Max, resulting in a dataset of 936 annotated images.

The deep learning models employed in this research demonstrated significant capabilities in feature extraction and classification, with YOLOv8n showing superior performance in terms of detection accuracy and computational efficiency compared to other models. Evaluation metrics such as precision, recall, mean average precision (mAP), and root mean square error (RMSE) were utilized to assess model performance, revealing that YOLOv8n achieved an R² value of 0.94 and an RMSE of 1.02, indicating strong robustness in grain counting tasks. The system was integrated into a WeChat mini program, facilitating user-friendly access for agricultural researchers to upload images and receive real-time grain counts, thereby enhancing operational efficiency in wheat breeding practices. The backend architecture was designed for secure and efficient data management, employing SSL encryption and cloud storage solutions to ensure data integrity and accessibility.

شارك: