نموذج خفيف الوزن للكشف عن الأعشاب الضارة في حقول القطن يعتمد على تحسين YOLOv8n
A lightweight weed detection model for cotton fields based on an improved YOLOv8n

المجلة: Scientific Reports، المجلد: 15، العدد: 1
DOI: https://doi.org/10.1038/s41598-024-84748-8
PMID: https://pubmed.ncbi.nlm.nih.gov/39747358
تاريخ النشر: 2025-01-02
المؤلف: Jun Wang وآخرون
الموضوع الرئيسي: الزراعة الذكية والذكاء الاصطناعي

نظرة عامة

تقدم ورقة البحث خوارزمية YOLO-Weed Nano، وهي نسخة محسنة من نموذج YOLOv8n، تهدف إلى تحسين اكتشاف الأعشاب الضارة في حقول القطن مع معالجة التحديات الحسابية المرتبطة بالنماذج الحالية للتعلم العميق. تتضمن الطريقة المقترحة هيكل الالتفاف القابل للفصل Depthwise Separable Convolution (DSC) لإنشاء شبكة DS_HGNetV2، التي تعمل كعمود فقري لنموذج YOLOv8n. بالإضافة إلى ذلك، تستخدم شبكة هرم الميزات ثنائية الاتجاه (BiFPN) لتحسين دمج الميزات، وتقدم رأس اكتشاف خفيف الوزن، LiteDetect، لتبسيط النموذج وتقليل استهلاك الموارد.

تشير النتائج التجريبية إلى أن YOLO-Weed Nano تحقق دقة متوسطة (mAP) تبلغ 93.1%، مما يعكس تحسنًا بنسبة 1% مقارنة بنموذج YOLOv8n الأصلي. ومن الجدير بالذكر أن النموذج الجديد يقلل بشكل كبير من عدد المعلمات بنسبة 63.8%، والعبء الحسابي بنسبة 42%، وحجم ملف الوزن بنسبة 60.7%. هذه التحسينات لا تقلل فقط من التكاليف الحسابية، مما يجعل النموذج مناسبًا للأجهزة المحمولة والأطراف، ولكنها أيضًا تحسن دقة الاكتشاف من خلال التركيز الفعال على مناطق الأعشاب الضارة مع تقليل الضوضاء الخلفية. تظهر النتائج أن YOLO-Weed Nano تتفوق على سابقتها في الدقة والاسترجاع، مما يؤدي إلى توقعات أكثر موثوقية وأقل تصنيفات خاطئة في مهام اكتشاف الأعشاب الضارة.

الطرق

تم إجراء التجارب المفصلة في هذه الدراسة على منصة حسابية عالية الأداء تتميز بوحدة معالجة الرسوميات NVIDIA RTX 3090 مع 24 جيجابايت من VRAM. استخدم إعداد التجربة إطار عمل PyTorch 2.0.0 على نظام تشغيل Ubuntu 20.04، مدعومًا بمعالج Intel(R) Xeon(R) Gold 6330 ذو 14 نواة يعمل بتردد 2.00 جيجاهرتز ومزود بـ 80 جيجابايت من الذاكرة العشوائية. مكنت هذه التكوينات من استخدام CUDA 11.8، مما يسمح بتسريع GPU بكفاءة لنماذج التعلم العميق المستخدمة في البحث. بالإضافة إلى ذلك، تم استخدام إصدار Python 3.8 لتنفيذ التجارب.

النتائج

في قسم النتائج، تم تقييم أداء نموذج YOLO-Weed Nano مقابل نموذج YOLOv8n الأصلي باستخدام تحليل مقارن لـ 16 صورة مختارة عشوائيًا من مجموعة الاختبار. توضح الشكل 8 نتائج التنبؤ، حيث يعمل الشكل 8a كمعيار للصناديق المحيطة الصحيحة. أظهرت توقعات نموذج YOLOv8n الأصلي، الموضحة في الشكل 8b، عدم دقة في منطقتين مميزتين، بينما قدم نموذج YOLO-Weed Nano، الموضح في الشكل 8c، توقعات تتماشى تمامًا مع التعليقات الفعلية. يشير هذا إلى تحسن ملحوظ في دقة التعرف على الهدف، خاصة في الخلفيات المعقدة، وانخفاض كبير في الأخطاء في التعرف.

يمكن أن يُعزى الأداء المحسن لنموذج YOLO-Weed Nano إلى عدة عوامل رئيسية: (1) شبكة DS_HGNetV2، التي تقلل بفعالية من عدد المعلمات والعبء الحسابي مع الحفاظ على قدرات استخراج الميزات القوية؛ (2) طبقة دمج الميزات BiFPN، التي تحسن دقة النموذج في اكتشاف أهداف الأعشاب الضارة الصغيرة من خلال تعزيز دمج الميزات عبر مقاييس مختلفة؛ و(3) رأس الاكتشاف الخفيف LiteDetect، الذي يبسط الهيكل الاكتشافي ويخفف من المتطلبات الحسابية.

المناقشة

ت outlines قسم المناقشة في ورقة البحث المنهجية والنتائج المتعلقة بمجموعة بيانات CottonWeedDet12 وتطوير نموذج YOLO-Weed Nano لاكتشاف الأعشاب الضارة. تتكون مجموعة البيانات من 5,648 صورة مع 9,370 تعليق لصناديق محيطة عبر 12 نوعًا من الأعشاب الضارة، تم جمعها تحت ظروف إضاءة وطقس متنوعة لتعزيز قوة النموذج. تم تقسيم الصور بشكل منهجي إلى مجموعات تدريب واختبار وتحقق، مما يضمن تقييمًا شاملاً لأداء النموذج. تم استخدام تقنيات تعزيز البيانات عبر الإنترنت، بما في ذلك تعديلات مساحة اللون HSV والتحولات الهندسية، لتحسين تعميم النموذج ومعالجة عدم التوازن في الفئات، مما يعزز تنوع بيانات التدريب.

يتضمن نموذج YOLO-Weed Nano، وهو تحسين على خوارزمية YOLOv8n، عدة مكونات مبتكرة مثل وحدة المعالجة المسبقة HGStem وDS_HGBlock لتحسين استخراج الميزات مع الحفاظ على الكفاءة الحسابية. تم تحسين بنية النموذج لتقليل المعلمات والعبء الحسابي بشكل كبير، محققة دقة متوسطة (mAP) تبلغ 93.1% مع تصميم خفيف الوزن مناسب للتطبيقات في الوقت الحقيقي. أظهرت التحليلات المقارنة أن YOLO-Weed Nano تتفوق على النماذج الأخرى من حيث الدقة والكفاءة، مع تقليل كبير في حجم النموذج ومتطلبات الحساب. أكدت دراسة الإزالة أيضًا فعالية الوحدات المدمجة في تحقيق الأداء الأمثل مع تقليل استخدام الموارد، مما يبرز إمكانية النموذج للنشر العملي في البيئات الزراعية.

القيود

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

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

Journal: Scientific Reports, Volume: 15, Issue: 1
DOI: https://doi.org/10.1038/s41598-024-84748-8
PMID: https://pubmed.ncbi.nlm.nih.gov/39747358
Publication Date: 2025-01-02
Author(s): Jun Wang et al.
Primary Topic: Smart Agriculture and AI

Overview

The research paper presents the YOLO-Weed Nano algorithm, an enhanced version of the YOLOv8n model, aimed at improving the detection of weeds in cotton fields while addressing the computational challenges associated with existing deep learning models. The proposed method incorporates a Depthwise Separable Convolution (DSC) structure to create the DS_HGNetV2 network, which serves as the backbone for the YOLOv8n model. Additionally, it employs a Bidirectional Feature Pyramid Network (BiFPN) to optimize feature fusion, and introduces a lightweight detection head, LiteDetect, to streamline the model and reduce resource consumption.

Experimental results indicate that YOLO-Weed Nano achieves a mean Average Precision (mAP) of 93.1%, reflecting a 1% improvement over the original YOLOv8n model. Notably, the new model significantly reduces the number of parameters by 63.8%, computational load by 42%, and weight file size by 60.7%. These enhancements not only lower the computational costs, making the model suitable for mobile and edge devices, but also improve detection accuracy by effectively focusing on weed areas while minimizing background noise. The findings demonstrate that YOLO-Weed Nano outperforms its predecessor in precision and recall, leading to more reliable predictions and fewer misclassifications in weed detection tasks.

Methods

The experiments detailed in this study were performed on a high-performance computational platform featuring an NVIDIA RTX 3090 GPU with 24 GB of VRAM. The experimental setup utilized the PyTorch 2.0.0 framework on an Ubuntu 20.04 operating system, supported by a 14-core Intel(R) Xeon(R) Gold 6330 CPU running at 2.00 GHz and equipped with 80 GB of RAM. This configuration enabled the use of CUDA 11.8, allowing for efficient GPU acceleration of the deep learning models employed in the research. Additionally, Python version 3.8 was utilized for the implementation of the experiments.

Results

In the results section, the performance of the YOLO-Weed Nano model was evaluated against the original YOLOv8n model using a comparative analysis of 16 randomly selected images from the test set. Figure 8 illustrates the prediction outcomes, with Figure 8a serving as the benchmark of correct bounding boxes. The original YOLOv8n model’s predictions, shown in Figure 8b, exhibited inaccuracies in two highlighted areas, while the YOLO-Weed Nano model, depicted in Figure 8c, provided predictions that aligned perfectly with the actual annotations. This indicates a marked improvement in target recognition accuracy, particularly in complex backgrounds, and a significant reduction in misidentifications.

The enhanced performance of the YOLO-Weed Nano model can be attributed to several key factors: (1) the DS_HGNetV2 network, which effectively reduces the number of parameters and computational load while preserving robust feature extraction capabilities; (2) the BiFPN feature fusion layer, which improves the model’s accuracy in detecting small weed targets by enhancing feature integration across different scales; and (3) the lightweight LiteDetect detection head, which simplifies the detection structure and further alleviates computational demands.

Discussion

The discussion section of the research paper outlines the methodology and findings related to the CottonWeedDet12 dataset and the development of the YOLO-Weed Nano model for weed detection. The dataset comprises 5,648 images with 9,370 bounding box annotations across 12 weed species, collected under varied lighting and weather conditions to enhance model robustness. The images were systematically divided into training, testing, and validation sets, ensuring a comprehensive evaluation of the model’s performance. Online data augmentation techniques, including HSV color space adjustments and geometric transformations, were employed to improve model generalization and address class imbalance, thereby enhancing the diversity of the training data.

The YOLO-Weed Nano model, an improvement over the YOLOv8n algorithm, incorporates several innovative components such as the HGStem preprocessing module and the DS_HGBlock for enhanced feature extraction while maintaining computational efficiency. The model’s architecture was optimized to reduce parameters and computational load significantly, achieving a Mean Average Precision (mAP) of 93.1% with a lightweight design suitable for real-time applications. Comparative analyses demonstrated that YOLO-Weed Nano outperforms other models in terms of accuracy and efficiency, with a substantial reduction in model size and computational requirements. The ablation study further confirmed the effectiveness of the integrated modules in achieving optimal performance while minimizing resource usage, highlighting the model’s potential for practical deployment in agricultural settings.

Limitations

The study presents two primary limitations regarding the YOLO-Weed Nano algorithm’s applicability and performance. First, while the algorithm has demonstrated effective weed detection in cotton fields, its efficacy in other crop types and agricultural settings remains untested. This raises concerns about the model’s generalizability, suggesting that additional adaptation and validation are necessary for broader agricultural applications.

Second, the research highlights a trade-off between the lightweight design of the YOLO-Weed Nano model and its accuracy. Although reducing the model’s computational demands is beneficial, it may compromise its performance in complex scenarios, such as those with noisy backgrounds or variable lighting conditions. This necessitates further exploration to balance the lightweighting benefits with the need for high accuracy in diverse real-world environments.