自然光环境下番茄穴盘苗缺苗检测的YOLO-SFEP模型

    YOLO-SFEP: A lightweight model for missing tomato plug seedling detection in natural light environments

    • 摘要: 番茄穴盘苗缺苗信息的精确检测对智能温室移栽至关重要。该研究以提高对密集性番茄穴盘苗缺苗信息的小目标检测能力、提高模型的光照鲁棒性、减少模型的计算规模和提升模型的训练性能为目标,提出了一种基于改进YOLOv8n的温室环境下的番茄穴盘苗缺苗检测模型YOLO-SFEP。首先,通过结合空间到深度卷积SPDConv(space-to-depth convolution)和Omni-Kernel模块优化YOLOv8n模型的P3检测层以提高模型的小目标检测能力,提高模型的检测精度;其次,在YOLOv8n颈部网络中添加高效多尺度注意力机制EMA(efficient multi-scale attention)模块,提升模型对番茄穴盘苗缺苗信息的关注,减少复杂光照条件的干扰;然后,采用FasterNet网络中的FasterNet Block模块替换YOLOv8n网络结构里C2f(cross-stage partial bottleneck with two convolutions)模块中的Bottleneck模块,使模型在保持较高识别准确性的基础上降低模型大小和计算复杂度,实现模型的轻量化;最后,将损失函数CIoU(complete intersection over union)替换为PIoU(powerful-IoU),通过使用惩罚因子来适应目标大小,优化模型的收敛效果。试验结果表明,建立的YOLO-SFEP番茄穴盘苗缺苗检测模型的精确率为96.7%,较基准模型YOLOv8n提高了2.4个百分点;模型的参数量和计算量分别为2.62 M和7.6 G,较YOLOv8n分别降低了0.39 M和0.5 G;模型大小仅为5.5 MB,较基准模型减少了0.8 MB;该模型对光照变化表现出强适应性,在弱光、中光与强光下的平均精度均值分别达96.7%、98.9%和98.1%,具有高鲁棒性;将此模型部署至边缘计算设备树莓派5上,可实现的检测帧率为13.8帧/s,具有良好的边缘端部署前景。该模型实现了对番茄穴盘苗缺苗信息的精准识别,可为后续移栽机的自动补苗提供缺苗穴孔位置信息。

       

      Abstract: Intelligent transplantation is often required to accurately detect the missing seedlings in the densely arranged tomato plug seedlings in the greenhouse. In this study, an improved YOLOv8n-based model (named YOLO-SFEP) was proposed to detect the missing-seedlings in greenhouse environments. Small-target detection was also improved by the illumination robustness. Computational complexity was also reduced to optimize the training efficiency. Four innovations were integrated into the framework: feature extraction refinement, attention-driven interference suppression, network lightweighting, and adaptive optimization of the loss function. Extensive experiments were carried out to validate the practical deployment. Firstly, the P3 detection layer of YOLOv8n was reconstructed to integrate the SPDConv (space-to-depth convolution) into an Omni-Kernel module. Dual enhancement strengthened the feature extraction for small targets, effectively improving the detection accuracy in dense seedling arrangements. Secondly, an EMA (efficient multi-scale attention) mechanism was embedded into the neck network, in order to amplify the critical features of missing seedlings, while suppressing interference from uneven lighting conditions in greenhouses. Thirdly, the lightweight deployment was achieved to replace the Bottleneck modules in C2f (cross-stage partial bottleneck with two convolutions) layers with FasterNet Block modules from FasterNet. Redundant parameters were then reduced without compromising recognition accuracy, indicating compatibility with the resource-constrained devices. Finally, the CIoU (complete intersection over union) loss function was replaced by PIoU (powerful-IoU). The adaptive penalty factors were introduced into the target scales. Thereby, the convergence stability was optimized under the varying seedling sizes. Experimental results revealed that the YOLO-SFEP model attained a precision of 96.7%, a recall of 98.8%, and a mean average precision at an intersection over union threshold of 0.5 (mAP50) of 97.9%, in order to detect the missing seedlings in tomato plug trays. There was an improvement over the baseline YOLOv8n model, where the precision was enhanced by 2.4 percentage points. The parameter count and computational load of the proposed model are 2.62 million(M) and 7.6 Gigaflops(G), respectively, representing a reduction of 0.39 M and 0.5 G compared with YOLOv8n. The model size was compacted to 5.5 megabytes(MB), decreasing by 0.8 MB relative to the baseline. Importantly, the model showed high robustness across a spectrum of natural light intensities (low, medium, and high), attaining mAP50 values of 96.7%, 98.9%, and 98.1%, respectively, which underscores its superior performance in challenging illumination environments. The improved model was also deployed on an edge computing device, the Raspberry Pi 5. A detection speed of 13.8 frames per second was achieved, equal to an inference time of 72 milliseconds(ms) per image. This speed was 12.2 ms faster than that of the baseline YOLOv8n model on the same platform. These outcomes highlighted the model’s aptitude for real-time greenhouse applications, enabling it to deliver precise and prompt positional data on missing seedlings to support automated replenishment by transplantation equipment. In conclusion, the YOLO-SFEP model markedly improves the detection of missing seedlings in tomato plug trays within greenhouse environments. By integrating advanced modules for small target detection, attention mechanisms for feature enhancement, and efficient components for model lightweighting, it achieves elevated detection accuracy alongside reduced computational complexity. Its successful deployment on an edge device underscores its viability for on-site use. This research offers a solid technical foundation for intelligent missing seedling detection and automated seedling replenishment in greenhouse tomato cultivation. For further research, techniques such as knowledge distillation, quantization and pruning can be considered in the future to lighten the YOLO-SFEP model, and at the same time, analyze the resource consumption of the model in actual deployment, including memory occupation and power consumption, in order to comprehensively evaluate its applicability on edge devices, and eventually build an inspection system to realize the integration of image acquisition and processing by using edge devices.

       

    /

    返回文章
    返回