Abstract:
Navigation line detection serves as a pivotal procedure in visual navigation approaches for agricultural machinery, and its core purpose is to extract the driving direction or path guiding agricultural machinery operation from field images in real time and with high accuracy. At present, mainstream solutions for this task are mostly based on instance segmentation technology, which first extracts crop row edges and then fits navigation lines through complex post-processing operations. Such methods are featured with cumbersome workflows and large computational overhead, which severely restrict their application in real-time agricultural navigation scenarios requiring high efficiency and instant response. To tackle these problems, this study proposes an end-to-end navigation line regression model called Keypoint Plant Line Network (KPLNet), aiming to realize agricultural machinery navigation line detection with both superior precision and efficiency. Different from traditional instance segmentation-based frameworks, KPLNet directly represents navigation lines in the form of keypoints for prediction without any post-processing procedures, thereby improving inference speed on the premise of ensuring detection accuracy.In the architectural design of KPLNet, the idea of geometric prior is firstly introduced to construct a Central Attention Mechanism (CAM). CAM concentrates on the contextual integration of features at key positions, which can effectively enhance the extraction capability and efficiency of critical features related to navigation lines, and lay a solid foundation for accurate keypoint positioning of navigation lines. Secondly, in view of the characteristics of small target scale variation and the demand for single-target detection only in navigation line detection tasks, a streamlined feature fusion structure named Single Feature Fusion (SFF) is proposed. The SFF structure maintains powerful feature extraction ability for navigation line features while optimizing the network structure to improve the real-time performance of the model, reducing redundant calculation and parameter costs to adapt to the edge deployment requirements of agricultural machinery. In addition, an improved Dual-Optimization Particle Swarm Optimization (D-PSO) algorithm is introduced for hyperparameter optimization in the model training stage. This optimization strategy further boosts the detection accuracy of the model without affecting inference speed, achieving a better balance between model performance and computational efficiency.Experiments are carried out on two representative field scenarios: maize fields and peanut-soybean intercropping fields, and the proposed KPLNet is compared with mainstream instance segmentation methods including YOLOv8n-seg and YOLO11n-seg. The experimental results show that KPLNet outperforms the above comparative methods in both detection accuracy and real-time performance. Concretely, the navigation line endpoint detection accuracy ( \textmAP_\textpose^50-95 ) of KPLNet reaches 99.5% in both maize fields and peanut-soybean intercropping fields, and the heading angle deviations are as low as 0.79° and 0.73° respectively, reflecting extremely high navigation line detection precision. In terms of inference efficiency, KPLNet has a lower average inference time and completely eliminates post-processing time consumption, with a maximum frame rate of 119.2 frames per second (fps), which fully meets the real-time operation requirements of agricultural automatic navigation. Ablation experiments further verify the specific contribution of CAM, SFF and D-PSO to the performance improvement of the model, confirming that each proposed module plays a positive role in enhancing detection accuracy and inference speed respectively.The experimental results validate the superiority of the proposed end-to-end paradigm in the task of agricultural navigation line detection, breaking through the bottlenecks of traditional instance segmentation methods in terms of complex workflows and high computational overhead. This research provides reliable technical support for the development of efficient and stable automatic navigation systems for agricultural machinery, and offers a novel technical reference for the intelligent and precise operation of agricultural equipment in complex field planting environments, which is of great significance for promoting the intelligent upgrading of agricultural production and the application of smart agricultural equipment.