طريقة الكشف عن التمر الهندي الشتوي والعد المعتمدة على نموذج SOD-YOLOv5n خفيف الوزن تم نشرها على نظام أندرويد
A lightweight SOD-YOLOv5n model-based winter jujube detection and counting method deployed on Android

المجلة: Computers and Electronics in Agriculture، المجلد: 218
DOI: https://doi.org/10.1016/j.compag.2024.108701
تاريخ النشر: 2024-02-13
المؤلف: Chenhao Yu وآخرون
الموضوع الرئيسي: الاستشعار عن بعد واستخدام الأراضي

نظرة عامة

في هذه الدراسة، طور المؤلفون نموذج كشف عن الأجسام الصغيرة خفيف الوزن، يسمى SOD-YOLOv5n، مصمم خصيصًا للكشف الدقيق وعدّ ثمار الجوجوبا الشتوية خلال مراحل نضوجها الأولية. يعتمد النموذج على إطار عمل YOLOv5n، وي incorporat عدة تحسينات مثل استخدام طبقات SPD-Conv لاستبدال الالتفاف التقليدي وطبقات التجميع، مما يحسن من كشف الأهداف الصغيرة والصور منخفضة الدقة. بالإضافة إلى ذلك، تم تحسين عملية الزيادة من خلال وحدة CARAFE، مما يسمح بإعادة تركيب النواة بشكل تكيفي، بينما تم تنفيذ GSConv في عنق النموذج لتقليل الحجم دون التضحية بالدقة.

أظهرت النتائج التجريبية أن نموذج SOD-YOLOv5n تفوق على النموذج الأصلي YOLOv5n، محققًا تحسينات بنسبة 2.40% و1.80% و3.00% في الدقة والاسترجاع ومتوسط الدقة العامة (mAP)، على التوالي. علاوة على ذلك، أظهر انخفاضًا بنسبة 9.11% في خطأ الجذر التربيعي المتوسط (RMSE) و5.30% في متوسط الخطأ المطلق النسبي (MAPE). تم نشر النموذج الكمي، الذي يبلغ حجمه 3.64 ميغابايت بعد الكمي float16، في تطبيق أندرويد يسمى JujubeDetector. أشارت التجارب الميدانية إلى RMSE قدره 1.46 ومعامل تحديد ($R^2$) قدره 0.97، مع أوقات كشف تتراوح بين 30 مللي ثانية إلى 90 مللي ثانية. لا يسهل هذا النهج فقط الكشف والعد في الوقت الحقيقي لثمار الجوجوبا الشتوية، بل يعمل أيضًا كمرجع لتطبيقات مماثلة في سيناريوهات كشف الفواكه الصغيرة الأخرى.

مقدمة

تسلط المقدمة الضوء على الأهمية المتزايدة للتقدير الدقيق للإنتاج لثمار الجوجوبا الشتوية في الصين، مدفوعة بتوسع مناطق الزراعة. تعتبر طرق العد اليدوي التقليدية كثيفة العمالة ومعرضة للأخطاء، مما يستلزم تطوير تقنيات كشف الفواكه الآلية. أظهرت التقدمات الأخيرة في التعلم العميق، وخاصة الشبكات العصبية التلافيفية (CNNs)، وعدًا في تعزيز مهام التعرف على الفواكه. من بين هذه النماذج، تبرز سلسلة نماذج YOLO (You Only Look Once) لأدائها في الوقت الحقيقي ودقتها العالية، مما يجعلها مناسبة لتطبيقات إدارة البساتين.

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

طرق

توضح قسم الطرق عملية الحصول على مجموعة بيانات الجوجوبا الشتوية وإنتاجها، تليها مقدمة خوارزمية SOD-YOLOv5n المحسنة المصممة خصيصًا لكشف الجوجوبا الشتوية. تم بعد ذلك كمي هذا النموذج ونشره على منصة أندرويد، مما يسهل الكشف والعد في الوقت الحقيقي لأهداف الجوجوبا الصغيرة في البساتين، كما هو موضح في الشكل 1.

شمل الإعداد التجريبي اختبار نموذج SOD-YOLOv5n في بيئة طبيعية، باستخدام نماذج هيكلية مختلفة لتقييم فعاليتها في كشف الجوجوبا الشتوية. تم إجراء التجارب على منصة أجهزة محددة، مفصلة في الجدول 1، بينما تم توضيح معلمات التدريب في الجدول 2، مما يضمن تقييمًا شاملاً لأداء النموذج.

نتائج

يقدم قسم “النتائج” نتائج الدراسة، موضحًا نتائج التجارب التي تم إجراؤها. يتم الإبلاغ عن المقاييس الرئيسية والتحليلات الإحصائية، مما يظهر علاقات كبيرة بين المتغيرات قيد التحقيق. تشير النتائج إلى أن الفرضية المقترحة مدعومة، مع بيانات تظهر اتجاهًا واضحًا يتماشى مع التوقعات النظرية.

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

مناقشة

في هذه الدراسة، طور المؤلفون نموذجًا خفيف الوزن، SOD-YOLOv5n، للكشف والعد في الوقت الحقيقي لثمار الجوجوبا الشتوية في بيئات البساتين المعقدة. تم جمع مجموعة البيانات باستخدام كاميرا عمق Intel RealSense D435i، حيث تم التقاط 930 صورة تحت ظروف إضاءة وطقس متغيرة. تم تطبيق تقنيات زيادة البيانات لتوسيع مجموعة البيانات إلى 6510 صورة، والتي تم توضيحها بعد ذلك لتدريب النموذج. تم بناء نموذج SOD-YOLOv5n على بنية YOLOv5n، مع تضمين عدة تحسينات مثل وحدة SPD-Conv لتحسين كشف الأجسام الصغيرة، ومشغل الزيادة CARAFE لإعادة تنظيم الميزات بشكل أفضل، ووحدة GSConv لتقليل التكاليف الحاسوبية مع الحفاظ على الدقة.

أشارت تقييمات الأداء إلى أن نموذج SOD-YOLOv5n تفوق على نموذج YOLOv5n الأساسي من حيث الدقة والاسترجاع ومتوسط الدقة العامة (mAP)، خاصة في الظروف الصعبة حيث كانت الجوجوبا محجوبة بواسطة الأوراق أو كانت لها ألوان مشابهة لمحيطها. أظهر النموذج قدرات تعميم قوية، محققًا دقة كشف أعلى في سيناريوهات متنوعة، بما في ذلك الإضاءة المحيطة المنخفضة والأجسام المتداخلة. تم تسهيل نشر النموذج على أجهزة أندرويد من خلال تقنيات الكمي، مما أدى إلى تطبيق خفيف الوزن قادر على الكشف والعد في الوقت الحقيقي، وبالتالي توفير أداة عملية لتقدير إنتاج الجوجوبا الشتوية.

Journal: Computers and Electronics in Agriculture, Volume: 218
DOI: https://doi.org/10.1016/j.compag.2024.108701
Publication Date: 2024-02-13
Author(s): Chenhao Yu et al.
Primary Topic: Remote Sensing and Land Use

Overview

In this study, the authors developed a lightweight small object detection model, termed SOD-YOLOv5n, specifically designed for the accurate detection and counting of winter jujubes during their initial ripening stages. The model builds upon the YOLOv5n framework, incorporating several enhancements such as the use of SPD-Conv layers to replace traditional strided convolution and pooling layers, which improves the detection of small targets and low-resolution images. Additionally, the upsampling process was optimized through the CARAFE module, allowing for adaptive kernel recombination, while GSConv was implemented in the model’s neck to reduce size without sacrificing accuracy.

Experimental results demonstrated that the SOD-YOLOv5n model outperformed the original YOLOv5n model, achieving improvements of 2.40%, 1.80%, and 3.00% in precision, recall, and mean Average Precision (mAP), respectively. Furthermore, it exhibited reductions of 9.11% in Root Mean Square Error (RMSE) and 5.30% in Mean Absolute Percentage Error (MAPE). The quantized model, which is 3.64 MB in size after float16 quantization, was deployed in an Android application named JujubeDetector. Field experiments indicated a RMSE of 1.46 and a coefficient of determination ($R^2$) of 0.97, with detection times ranging from 30 ms to 90 ms. This approach not only facilitates real-time detection and counting of winter jujubes but also serves as a reference for similar applications in other small fruit detection scenarios.

Introduction

The introduction highlights the increasing importance of accurate yield estimation for winter jujubes in China, driven by the expansion of cultivation areas. Traditional manual counting methods are labor-intensive and prone to errors, necessitating the development of automated fruit detection technologies. Recent advancements in deep learning, particularly Convolutional Neural Networks (CNNs), have shown promise in enhancing fruit recognition tasks. Among these, the YOLO (You Only Look Once) series of models stands out for its real-time performance and high accuracy, making it suitable for orchard management applications.

Despite the successes of YOLO models in fruit detection, challenges remain, particularly in complex orchard environments characterized by variable lighting and overlapping fruits. Existing models often struggle with detecting small objects, such as winter jujubes, and their deployment on mobile devices is limited by performance constraints. This study addresses these challenges by developing the SOD-YOLOv5n model, which enhances detection accuracy for small objects and optimizes model complexity. Additionally, it introduces a quantization method to reduce model size and facilitates the deployment of the model on Android devices for real-time detection and counting of winter jujubes in practical orchard settings.

Methods

The Methods section outlines the acquisition and production process of the winter jujube dataset, followed by the introduction of an enhanced SOD-YOLOv5n algorithm specifically designed for detecting winter jujube. This model was subsequently quantified and deployed on an Android platform, facilitating real-time detection and counting of small jujube targets in orchards, as depicted in Figure 1.

The experimental setup involved testing the SOD-YOLOv5n model in a natural environment, utilizing various structural models to assess their effectiveness in winter jujube detection. The experiments were conducted on a specified hardware platform, detailed in Table 1, while the training hyperparameters were outlined in Table 2, ensuring a comprehensive evaluation of the model’s performance.

Results

The “Results” section presents the findings of the study, detailing the outcomes of the experiments conducted. Key metrics and statistical analyses are reported, demonstrating significant correlations between the variables under investigation. The results indicate that the proposed hypothesis is supported, with data showing a clear trend that aligns with theoretical expectations.

Additionally, the section includes visual representations, such as graphs and tables, which illustrate the relationships and differences observed in the data. These findings contribute to the existing body of knowledge and suggest potential implications for future research and practical applications in the relevant field. Overall, the results underscore the importance of the study’s contributions and provide a foundation for further exploration.

Discussion

In this study, the authors developed a lightweight model, SOD-YOLOv5n, for real-time detection and counting of winter jujubes in complex orchard environments. The dataset was collected using an Intel RealSense D435i depth camera, capturing 930 images under varying lighting and weather conditions. Data augmentation techniques were applied to expand the dataset to 6510 images, which were then annotated for model training. The SOD-YOLOv5n model was built upon the YOLOv5n architecture, incorporating several enhancements such as the SPD-Conv module to improve small object detection, the CARAFE upsampling operator for better feature reorganization, and the GSConv module to reduce computational costs while maintaining accuracy.

Performance evaluations indicated that the SOD-YOLOv5n model outperformed the baseline YOLOv5n model in terms of precision, recall, and mean average precision (mAP), particularly in challenging conditions where jujubes were obscured by leaves or had similar colors to their surroundings. The model demonstrated strong generalization capabilities, achieving higher detection accuracy in various scenarios, including low ambient light and overlapping objects. The deployment of the model on Android devices was facilitated through quantization techniques, resulting in a lightweight application capable of real-time detection and counting, thereby providing a practical tool for winter jujube yield estimation.