欢迎您访问《智慧农业(中英文)》官方网站! English

Smart Agriculture ›› 2025, Vol. 7 ›› Issue (5): 146-155.doi: 10.12133/j.smartag.SA202505038

• 专刊--光智农业创新技术与应用 • 上一篇    

基于改进YOLOv8的果蔬品质劣变荧光成像嵌入式检测系统

高陈宏, 朱启兵(), 黄敏   

  1. 江南大学 物联网工程学院,江苏 无锡 214122,中国
  • 收稿日期:2025-05-30 出版日期:2025-09-30
  • 基金项目:
    国家自然科学基金(62273166)
  • 作者简介:

    高陈宏,硕士研究生,研究方向为传感器与检测技术、嵌入式技术。E-mail:

  • 通信作者:
    朱启兵,博士,教授,研究方向为信息感知与智能处理、物联网系统集成。E-mail:

Embedded Fluorescence Imaging Detection System for Fruit and Vegetable Quality Deterioration Based on Improved YOLOv8

GAO Chenhong, ZHU Qibing(), HUANG Min   

  1. School of Internet of Things Engineering, Jiangnan University, Wuxi 214122, China
  • Received:2025-05-30 Online:2025-09-30
  • Foundation items:National Natural Science Foundation of China(62273166)
  • About author:

    GAO Chenhong, E-mail:

  • Corresponding author:
    ZHU Qibing, E-mail:

摘要:

[目的/意义] 新鲜果蔬在贮藏、运输过程中容易因微生物繁殖、酶活性变化等发生品质劣变,传统检测方法具有破坏性、耗时长且难以满足实时监测需求。本研究旨在开发基于荧光成像与嵌入式技术的果蔬品质劣变检测系统,解决现有光学检测设备价格昂贵、便携性不足的问题。 [方法] 开发的荧光成像检测系统采用现场可编程门阵列板(型号:ZYNQ XC7Z020)为主控单元,紫外发光二极管灯珠(365 nm, 10 W)为激发光源,互补金属氧化物半导体(Complementary Metal-Oxide-Semiconductor, CMOS)相机为荧光图像采集传感器,实现荧光图像的采集和处理;在此基础上,构建了一种基于改进YOLOv8的轻量化目标检测模型。改进模型以MobileNetV4为主干网络,通过批归一化层(Batch Normalization, BN)的通道剪枝技术实现了模型的轻量化;结合ZYNQ硬件资源特性,采用动态16位定点数量化硬件加速优化方法,从而加快实现果蔬品质的等级分类。 [结果和讨论] 以葡萄和菠菜两种常见果蔬为样本,通过检测其荧光图像中劣变特征,系统对新鲜、次新鲜、腐败三级分类平均精确度达95.91%。 [结论] 开发的荧光成像检测系统具有较高的精度与良好的响应速度,为果蔬品质的无损检测提供了一种低成本、高效率的方案。

关键词: 果蔬, 嵌入式系统, 荧光成像技术, YOLOv8, 网络剪枝, MobileNetV4

Abstract:

[Objective] Fresh fruits and vegetables are prone to quality deterioration during storage and transportation due to microbial proliferation and changes in enzyme activity. Although traditional quality detection methods (e.g., physicochemical analysis and microbial culture) offer high accuracy, they are destructive, time-consuming, and require expert operation, making them inadequate for the modern supply chain's demand for real-time, non-destructive detection. While advanced optical detection technologies like hyperspectral imaging provide non-destructive advantages, the equipment is expensive, bulky, and lacks portability. This study aimed to integrate fluorescence imaging technology, embedded systems, and lightweight deep learning models to develop an embedded detection system for fruit and vegetable quality deterioration, addressing the bottlenecks of high cost and insufficient portability in current technologies, and providing a low-cost, efficient solution for non-destructive quality detection of fruits and vegetables. [Methods] An embedded quality detection system based on fluorescence imaging and a ZYNQ platform was developed. The system adopted the Xilinx ZYNQ XC7Z020 heterogeneous SoC as the core controller and used 365 nm, 10 W ultraviolet LED beads as the excitation light source. A CMOS camera served as the image acquisition sensor to capture and process fluorescence images. Algorithmically, an improved, lightweight object detection model based on YOLOv8 was developed. The improved model replaced the original YOLOv8 backbone network with MobileNetV4 to reduce computational load. To further achieve lightweighting, a channel pruning technique based on the batch normalization (BN) layer's scaling factor (γ) was employed. During training, L1 regularization was applied to γ to induce sparsity, after which channels with small γ values were pruned according to a threshold (γ_threshold = 0.01), followed by fine-tuning of the pruned model. Finally, in accordance with the hardware characteristics of the ZYNQ platform, a dynamic 16-bit fixed-point quantization method was adopted to convert the model from 32-bit floating point to 16-bit fixed point, and the FPGA's parallel computing capability was utilized for hardware acceleration to improve inference speed. [Results and Discussions] Grapes and spinach were used as experimental samples in a controlled laboratory setting (26 °C; 20%~40% humidity) over an eight-day storage experiment. Fluorescence images were collected daily, and physicochemical indices were measured simultaneously to construct ground-truth labels (spinach: chlorophyll, vitamin C; grapes: titratable acidity, total soluble solids). K-means clustering combined with principal component analysis (PCA) was used to categorize quality into three levels, "fresh" "sub-fresh" and "spoiled", based on changes in physicochemical indices, and images were labeled accordingly. In terms of system performance, the improved YOLOv8-MobileNetV4 model achieved a mean average precision (mAP) of 95.91% for the three-level quality classification. Ablation results showed that using only the MobileNetV4 backbone or applying channel pruning to the original model each reduced average detection time (by 14.0% and 29.0%, respectively) but incurred some loss of accuracy. In contrast, combining both yielded a synergistic effect: precision reached 97.04%, while recall and mAP increased to 95.24% and 95.91%, respectively. Comparative experiments indicated that the proposed model (8.98 MB parameters) outperformed other mainstream lightweight models (e.g., Faster R-CNN and YOLOv8-Ghost) in mAP and also exhibited faster detection, demonstrating an excellent balance between accuracy and efficiency. [Conclusions] Targeting practical needs in detecting fruit and vegetable quality deterioration, this study proposed and implemented an efficient detection system based on fluorescence imaging and an embedded platform. By integrating the MobileNetV4 backbone with the YOLOv8 detection framework and introducing BN-based channel pruning, the model achieved structured compression and accelerated inference. Experimental results showed that the YOLOv8-MobileNetV4 plus pruning model significantly reduced model size and hardware resource consumption while maintaining detection accuracy, thereby enhancing real-time responsiveness. The system's low hardware cost, compact size, and portability make it a practical solution for rapid, non-destructive, real-time quality monitoring in fruit and vegetable supply chains. Future work will focus on expanding the sample library to include more produce types and mixed deterioration levels and further optimizing the algorithm to improve robustness in complex multi-target scenarios.

Key words: fruits and vegetables, embedded system, fluorescence imaging technology, YOLOv8, network pruning, MobileNetV4

中图分类号: