Abstract:
avigation line detection can serve as a pivotal procedure in the visual navigation of agricultural machinery. Driving direction or path guiding of agricultural machinery can be accurately extracted from field images in real time. Instance segmentation has been mostly used for this task at present. Crop row edges can be extracted to fit navigation lines after complex post-processing. However, cumbersome workflows and large computational overhead have severely restricted their application under real-time agricultural navigation. It is often needed to have high efficiency and instant response. This study aims to propose an end-to-end navigation line regression model, called Keypoint Plant Line Network (KPLNet). Navigation line detection of agricultural machinery was realized with superior precision and efficiency. Different from conventional instance segmentation, the KPLNet framework directly represented navigation lines in the form of keypoints for prediction. Post-processing was removed to improve inference speed and detection accuracy. Firstly, the Central Attention Mechanism (CAM) was constructed in the architecture of KPLNet using a geometric prior. Contextual integration of features was concentrated at key positions. Accurate keypoint positioning of navigation lines was realized to effectively enhance the extraction and efficiency of critical features. Secondly, a streamlined feature fusion structure, named Single Feature Fusion (SFF) was proposed, according to the small target scale variation and the demand for single-target detection only in the navigation line detection task. SFF structure effectively extracted from navigation line features. While the network structure was improved, the real-time performance of the model was. Redundant calculation and parameter costs were reduced for the edge deployment requirements of agricultural machinery. Finally, an improved Dual-Optimization Particle Swarm Optimization (D-PSO) was introduced for hyperparameter optimization during training. The high accuracy of the model was obtained at the inference speed. A better balance between performance and computational efficiency was achieved after optimization. Experiments were conducted on the maize and peanut-soybean intercropping field. The KPLNet was also compared with mainstream instance segmentation, including YOLOv8n-seg and YOLO11n-seg. The experimental results show that KPLNet performed the best in terms of detection accuracy and real-time performance. Concretely, the navigation line endpoint detection accuracy (mAP_pose^(50-95)) of KPLNet reached 99.5% in maize and peanut-soybean intercropping fields, and the heading angle deviations were as low as 0.79° and 0.73°, respectively, indicating extremely high detection precision. In terms of inference efficiency, the lower average inference time of KPLNet was obtained to eliminate the post-processing time consumption, with the maximum frame rate of 119.2 frames per second (fps), fully meeting the real-time navigation requirements of agricultural machinery. Ablation tests verified that the CAM, SFF, and D-PSO module contributed to the accuracy and inference speed. The experiments validated that the end-to-end navigation was superior to the simple workflows and had low computational overhead in the task of navigation line detection, compared with the conventional instance segmentation. This finding can provide reliable technical support to develop efficient and stable navigation for agricultural machinery. A technical reference can also offer guidance for the intelligent and precise operation of agricultural equipment in complex planting environments in smart agriculture.