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.