高级检索+

基于机器视觉与改进YOLOv8的花生双粒穴播质量实时监测方法

A real-time monitoring method for peanut double-seed precision seeding quality based on machine vision and an improved YOLOv8

  • 摘要: 双粒穴播是为保证花生有效出苗的主流播种方式。基于传统光电传感的花生播种质量监测方法无法判断单穴花生种子数量、种子损伤情况及是否有杂物掺入,难以满足高精度的实时监测需求。针对上述问题,该研究开展了基于机器视觉与改进YOLOv8的花生双粒穴播质量实时监测研究。为了精确识别花生种子穴粒数与破损程度特征,提出一种适用于花生特征实时识别的轻量化检测模型MobileNetV3-SimAM-Focal_GIoU YOLOv8(MSFG-YOLOv8),结合MobileNetV3主干网络提取花生种粒特征信息,引入SimAM注意力机制强化对堆叠和破损种子的特征提取能力,采用Focal_GIoU作为边界框回归损失函数。基于树莓派5搭载高清采样相机与人机互动模块作为硬件平台,搭建花生双粒穴播试验台架。试验表明,MSFG-YOLOv8相较于YOLOv8的精度提升4.4个百分点,召回率提升5.0个百分点,平均精度均值(mAP)提升4.7个百分点。同时模型计算量降低了42.8%,参数量减少了65.1%,模型大小仅为14.8 M。MSFG-YOLOv8对播种合格率、重播率、漏播率、破损率的平均监测精度(AP)分别为99.6%、94.4%、99.8%和95.4%,合格率、重播率与漏播率指标实现了99.8%、96.2%和96.9%的监测准确率。满足花生双粒穴播质量的田间实时监测需求,有效保障花生双粒穴播的高质量标准。

     

    Abstract: Double-seed hill planting is the predominant sowing method employed to ensure effective seedling emergence in peanut cultivation. However, traditional monitoring techniques based on photoelectric sensors suffer from significant limitations in precision and functionality. Specifically, these conventional methods are incapable of accurately determining the specific quantity of peanut seeds per hill, assessing the extent of seed damage, or identifying the inadvertent inclusion of foreign debris. Consequently, they fail to meet the stringent requirements for high-precision real-time monitoring in modern agricultural machinery. To address these critical challenges, this study presents a comprehensive investigation into the real-time monitoring of peanut double-seed hill planting quality, utilizing machine vision and an improved YOLOv8 architecture. The core contribution of this research is the proposal of a lightweight detection model specifically tailored for the real-time recognition of peanut characteristics, designated as the MobileNetV3-SimAM-Focal_GIoU YOLOv8 (MSFG-YOLOv8). To achieve an optimal balance between detection accuracy and computational efficiency, the MobileNetV3 network is integrated as the backbone to extract feature information from peanut seeds. Furthermore, the SimAM attention mechanism is introduced into the network architecture. This enhancement is pivotal for strengthening the model's capability to extract features from stacked and damaged seeds, which are traditionally difficult to distinguish due to occlusion and morphological irregularities. In addition, to further optimize bounding box regression, the Focal_GIoU is adopted as the loss function. This component replaces traditional loss functions to effectively handle class imbalance and improve localization precision for small and dense targets. On the hardware implementation side, a robust experimental platform for peanut double-seed hill planting was constructed. The system is built upon a Raspberry Pi 5, which serves as the core processing unit, and integrates a high-definition sampling camera alongside a human-machine interaction module. This embedded configuration is designed to validate the feasibility and performance of the proposed algorithm in a scenario that simulates actual field conditions. Extensive experiments were conducted to evaluate the performance of the MSFG-YOLOv8 model against the standard YOLOv8 baseline. The results demonstrate that the proposed lightweight model achieves superior performance while significantly reducing computational resource consumption. Specifically, compared to the original YOLOv8, MSFG-YOLOv8 improves Precision by 4.4 percentage points, Recall by 5.0 percentage points, and the mean Average Precision (mAP) by 4.7 percentage points. Regarding the model's complexity and efficiency, the computational load (measured in FLOPs) was reduced by 42.8%, the parameter count was decreased by 65.1%, and the overall model size was compressed to a mere 14.8 MB. These metrics indicate that the model is highly suitable for deployment on resource-constrained edge devices. Furthermore, the model's capability in monitoring specific seeding quality indicators was thoroughly analyzed. For the tasks of detecting the qualified rate, over-seeding rate, missed-seeding rate, and damage rate, the MSFG-YOLOv8 achieved Average Precision (AP) values of 99.6%, 94.4%, 99.8%, and 95.4%, respectively. In terms of monitoring accuracy for these critical metrics, the system attained 99.8% for the qualified rate, 96.2% for the multiple-seeding rate, and 96.9% for the missed-seeding rate. These high-precision results confirm that the proposed MSFG-YOLOv8 model effectively satisfies the requirements for real-time monitoring in field operations. To enable real-time tracking and statistical analysis of individual seeds, we designed a comprehensive monitoring algorithm that integrates deep learning features.This algorithm integrates an improved MSFG-YOLOv8 model, a Multi-Object Tracker based on Kalman filtering and the Hungarian algorithm, and a polygonal region counting module. Its workflow operates as follows: firstly, the MSFG-YOLOv8 model detects peanut seeding frames captured by cameras, outputting the positional and status information of each seed; secondly, this information is fed into the MOT, which utilizes Kalman filtering to predict target motion states and employs the Hungarian algorithm to achieve optimal matching between predicted values and actual detections, establishing inter-frame target mapping; finally, the counting module triggers counts when seed centroids cross predefined quadrilateral monitoring region boundaries, based on geometric spatial criteria, and calculates performance monitoring metrics according to seeding status. This monitoring research enables real-time perception of peanut sowing status in field operational environments, with dynamic display of sowing performance indicators such as qualified rate, over-seeding rate, and missed-seeding rate on the screen. Enabling operators to promptly grasp the sowing status and make adjustments, significantly reducing the workload of manual inspection. By providing reliable detection of seed count and integrity, this system provides a solid technical guarantee for maintaining high-quality standards in peanut double-seed hill planting.

     

/

返回文章
返回