الكشف غير المدمر عن الشوائب الدقيقة في الشاي باستخدام نموذج YOLOv11-PFT Non-destructive detection of micro-impurities in tea using the YOLOv11-PFT model

شارك:
المجلة: npj Science of Food، المجلد: 10، العدد: 1
DOI: https://doi.org/10.1038/s41538-025-00702-6
PMID: https://pubmed.ncbi.nlm.nih.gov/41519826
تاريخ النشر: 2026-01-10
المؤلف: Zejun Wang وآخرون
الموضوع الرئيسي: تطبيقات الشبكات العصبية المتقدمة

نظرة عامة

يقدم هذا القسم نظرة عامة على التحديات المرتبطة بالكشف عن الشوائب المجهرية في الشاي، والتي يمكن أن تؤثر على جودته أثناء الإنتاج والمعالجة والتعبئة. التقنيات الحالية للكشف غير كافية لأنها تركز بشكل أساسي على الملوثات المرئية، مما يترك الأجسام الأجنبية المجهرية دون اكتشاف. لمعالجة هذه المشكلة، يقدم المؤلفون نموذج YOLOv11-PFT، وهو نموذج متقدم للتعلم العميق مشتق من YOLOv11، والذي يتضمن خسارة Powerful-IoU، وFasterNet، ووحدات Triple Attention. تم تصميم هذا النموذج لتعزيز دقة الكشف، وتقليل حجم النموذج، وتحسين استخراج الميزات.

يظهر نموذج YOLOv11-PFT أداءً مثيرًا للإعجاب، حيث يحقق دقة كشف تبلغ 99.16% للملوثات المجهرية في الشاي. تتراوح مقاييس التقييم الخاصة به، بما في ذلك الدقة، والاسترجاع، ودرجة F1، ومتوسط الدقة (mAP)، من 98.7% إلى 99.2%. بالإضافة إلى ذلك، يتمتع النموذج بكفاءة حسابية تبلغ 5.5 GFLOPs، وسرعة استدلال تبلغ 340.6 إطارًا في الثانية (FPS)، وحجم مضغوط يبلغ 5.0 ميغابايت. من خلال التفوق على سبعة نماذج مرجعية في الدقة، يوفر YOLOv11-PFT حلاً قويًا للكشف عن الملوثات المجهرية في الشاي، مما يسهل الأتمتة في سلامة الغذاء، ويعزز عمليات مراقبة الجودة، ويمكّن من النشر على الأجهزة الطرفية في البيئات الزراعية.

مقدمة

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

تعتبر طرق الكشف الحالية، مثل تصوير الأشعة السينية، وكاشفات المعادن، والتصوير الطيفي الفائق، غير كافية لتحديد الملوثات المجهرية، التي غالبًا ما تكون صغيرة وتشبه الشاي من الناحية الشكلية. بينما أظهرت التطورات الأخيرة في التعلم العميق ورؤية الكمبيوتر، وخاصة مع نماذج مثل YOLO، وعدًا في الكشف عن عيوب الطعام، فإنها تركز بشكل أساسي على الأجسام الكبيرة. تقترح هذه الورقة إطار عمل YOLOv11-PFT، المصمم خصيصًا للكشف عن الأجسام الأجنبية المجهرية في الشاي الخام المجفف بالشمس. يدمج الإطار وظيفة خسارة Powerful-IoU، وهيكل FasterNet لاستخراج الميزات بكفاءة، وآلية Triple Attention لتعزيز دقة الكشف. كما تقدم الدراسة مجموعة بيانات مخصصة تغطي أنواعًا مختلفة من الملوثات المجهرية، بهدف سد الفجوات الحالية في قدرات الكشف وتعزيز الأتمتة والتحديث في تنظيم سلامة الغذاء.

طرق

في هذه الدراسة، كان هدف المؤلفين هو تقييم أداء الكشف لشبكة YOLOv11-PFT المحسّنة في تحديد الأجسام الأجنبية المجهرية في الشاي الخام المجفف بالشمس. لتحقيق ذلك، أجروا تجارب مقارنة باستخدام عدة إصدارات من نموذج YOLO (YOLOv11، YOLOv10، YOLOv8، YOLOv7، وYOLOv5) على مجموعة بيانات متسقة تضم 8,276 صورة، مع استخدام التحقق المتقاطع 10 مرات. من المهم أن يتم عدم استخدام أي أوزان مسبقة التدريب للقضاء على التحيزات المحتملة، مما يضمن أن كل نموذج خضع لتدريب صارم تحت ظروف متطابقة.

شملت إعدادات التجربة تكوين معايير فرعية موحدة عبر جميع النماذج. استخدم التدريب طريقة الانحدار العشوائي (SGD) مع زخم قدره 0.937 وتدهور وزن قدره \(5 \times 10^{-4}\) للتخفيف من مشاكل الحد الأدنى المحلي. تم تنفيذ جدول معدل التعلم الذي يجمع بين التسخين الخطي وتبريد جيب التمام، حيث زاد معدل التعلم من 0 إلى 0.01 على مدى أول 10 عصور ثم تدهور لاحقًا إلى \(1 \times 10^{-6}\). تم تحديد عملية التدريب عند 400 عصر، مع تطبيق التوقف المبكر إذا لم تتحسن متوسط الدقة (mAP) على مجموعة التحقق لمدة 20 عصرًا متتالية. يتم تقديم تكوينات المعلمات الفرعية بالتفصيل في الجداول المرفقة.

مناقشة

يقدم قسم المناقشة في ورقة البحث هذه تقييمًا شاملاً لنموذج YOLOv11-PFT، المصمم للكشف عن الأجسام الأجنبية المجهرية في الشاي الخام المجفف بالشمس. تقارن الدراسة بشكل منهجي بين وظائف الخسارة وآليات الانتباه المختلفة، كاشفة أن وظيفة خسارة Powerful-IoU تتفوق على غيرها من حيث الأداء العام ودقة التقسيم، حيث تحقق متوسط دقة (mAP) قدره 96.57%. تتفوق هذه الوظيفة في تقليل الإيجابيات الكاذبة والتكيف مع المشاهد المعقدة، بينما تظهر وظائف أخرى مثل SIoU وWIoU-v3 قيودًا كبيرة في الدقة ودقة التقسيم. وبالمثل، تم تحديد آلية Triple Attention كأكثر وحدات الانتباه فعالية، مما يعزز استخراج الميزات وقدرات التعرف، مما يؤدي إلى mAP قدره 96.25%.

تؤكد دراسة الإزالة أيضًا أن دمج جميع الوحدات الثلاث المقترحة—Powerful-IoU، Triple Attention، وFasterNet—يؤدي إلى أفضل أداء، حيث تحقق YOLOv11-PFT mAP قدره 99.16%، وهو تحسين كبير مقارنة بنموذج YOLOv11 الأصلي. كما يظهر النموذج تقاربًا واستقرارًا متفوقين أثناء التدريب، مع قيم خسارة أقل ومخاطر تقليل الإفراط في التكيف. بالإضافة إلى ذلك، يتفوق YOLOv11-PFT على نماذج الكشف عن الأجسام الرئيسية الأخرى في السيناريوهات الواقعية، مما يظهر قوته وقدرته على التكيف في الكشف عن الملوثات المجهرية تحت ظروف متغيرة. تؤكد النتائج على إمكانية تطبيق النموذج في التطبيقات العملية في سلامة الغذاء، وخاصة في صناعة الشاي، بينما تبرز أيضًا قابليته للتطبيق في مجالات مختلفة تتطلب فحوصات جودة دقيقة.

Journal: npj Science of Food, Volume: 10, Issue: 1
DOI: https://doi.org/10.1038/s41538-025-00702-6
PMID: https://pubmed.ncbi.nlm.nih.gov/41519826
Publication Date: 2026-01-10
Author(s): Zejun Wang et al.
Primary Topic: Advanced Neural Network Applications

Overview

The section presents an overview of the challenges associated with detecting microscopic impurities in tea, which can compromise its quality during production, processing, and packaging. Current detection technologies are inadequate as they primarily focus on visible contaminants, leaving microscopic foreign objects undetected. To address this issue, the authors introduce YOLOv11-PFT, an advanced deep learning model derived from YOLOv11, which incorporates Powerful-IoU loss, FasterNet, and Triple Attention modules. This model is designed to enhance detection accuracy, minimize model size, and improve feature extraction.

The YOLOv11-PFT model demonstrates impressive performance, achieving a detection accuracy of 99.16% for microscopic tea contaminants. Its evaluation metrics, including Precision, Recall, F1 score, and mean Average Precision (mAP), range from 98.7% to 99.2%. Additionally, the model exhibits a computational efficiency with 5.5 GFLOPs, an inference speed of 340.6 frames per second (FPS), and a compact size of 5.0 MB. By outperforming seven benchmark models in accuracy, YOLOv11-PFT provides a robust solution for the detection of microscopic contaminants in tea, facilitating automation in food safety, enhancing quality control processes, and enabling deployment on edge devices in agricultural settings.

Introduction

The introduction of the research paper highlights the global significance of tea as a health beverage, with China leading in production and cultural heritage. As of 2022, China accounted for over 50% of the world’s tea output, with tea drinking customs embraced by over 3 billion people across more than 160 countries. Despite its health benefits, including anti-inflammatory and anticancer properties, concerns regarding the quality and safety of tea have intensified, particularly due to the risk of microscopic foreign object contamination during various stages of tea processing.

Current detection methods, such as X-ray imaging, metal detectors, and hyperspectral imaging, are inadequate for identifying microscopic contaminants, which are often small and morphologically similar to tea. While recent advancements in deep learning and computer vision, particularly with models like YOLO, have shown promise in food defect detection, they primarily focus on macroscopic objects. This paper proposes the YOLOv11-PFT framework, specifically designed for detecting microscopic foreign objects in sun-dried raw pu-erh tea. The framework integrates a Powerful-IoU loss function, a FasterNet backbone for efficient feature extraction, and a Triple Attention mechanism to enhance detection accuracy. The study also introduces a custom dataset covering various types of microscopic contaminants, aiming to fill existing gaps in detection capabilities and promote automation and modernization in food safety regulation.

Methods

In this study, the authors aimed to evaluate the detection performance of the improved YOLOv11-PFT network model for identifying microscopic foreign objects in sun-dried raw tea. To achieve this, they conducted comparative experiments using several versions of the YOLO model (YOLOv11, YOLOv10, YOLOv8, YOLOv7, and YOLOv5) on a consistent dataset comprising 8,276 images, employing 10-fold cross-validation. Importantly, no pre-trained weights were utilized to eliminate potential biases, ensuring that each model underwent rigorous training under identical conditions.

The experimental setup involved a standardized hyper-parameter configuration across all models. The training utilized Stochastic Gradient Descent (SGD) with a momentum of 0.937 and a weight decay of \(5 \times 10^{-4}\) to mitigate local minima issues. A learning rate schedule combining linear warm-up and cosine annealing was implemented, where the learning rate increased from 0 to 0.01 over the first 10 epochs and subsequently decayed to \(1 \times 10^{-6}\). The training process was capped at 400 epochs, with early stopping applied if the mean Average Precision (mAP) on the validation set did not improve for 20 consecutive epochs. Detailed hyper-parameter configurations are provided in the accompanying tables.

Discussion

The discussion section of this research paper presents a comprehensive evaluation of the YOLOv11-PFT model, designed for detecting microscopic foreign objects in sun-dried raw tea. The study systematically compares various loss functions and attention mechanisms, revealing that the Powerful-IoU loss function outperforms others in both overall performance and segmentation accuracy, achieving a mean Average Precision (mAP) of 96.57%. This loss function excels in reducing false positives and adapting to complex scenes, while other functions like SIoU and WIoU-v3 demonstrate significant limitations in precision and segmentation accuracy. Similarly, the Triple Attention mechanism is identified as the most effective attention module, enhancing feature extraction and recognition capabilities, leading to an mAP of 96.25%.

An ablation study further confirms that the integration of all three proposed modules—Powerful-IoU, Triple Attention, and FasterNet—results in the best performance, with YOLOv11-PFT achieving an mAP of 99.16%, a significant improvement over the original YOLOv11. The model also demonstrates superior convergence and stability during training, with lower loss values and reduced overfitting risks. Additionally, YOLOv11-PFT outperforms other mainstream object detection models in real-world scenarios, showcasing its robustness and adaptability in detecting microscopic contaminants under varying conditions. The findings underscore the model’s potential for practical applications in food safety, particularly in the tea industry, while also highlighting its broader applicability across different domains requiring fine-grained quality inspections.