Abstract:
To improve the localization accuracy and deployment efficiency of autonomous agricultural machinery, this study investigates the problem of deep learning-based LiDAR localization in agricultural scenarios, where tractor roads, village roads, and farm paths often exhibit sparse geometric structure, weak vertical constraints, and high scene repetition. Existing scene coordinate regression (SCR) methods are effective in structured urban environments, but they often suffer from unstable pose estimation in agricultural scenes, where a single LiDAR frame may contain insufficient discriminative information for accurate localization. To address this issue, we propose AgriLoc, a temporal-enhanced LiDAR localization framework designed for rapid adaptation to new agricultural scenes while preserving the efficiency of frozen-backbone SCR pipelines. The model follows the fast localization strategy of freezing a pre-trained scene-agnostic backbone and training only scene-related prediction modules, thereby significantly reducing the amount of scene-specific optimization required during deployment. On top of this framework, AgriLoc introduces a Temporal Sample Classification Guidance (T-SCG) module and a multi-head attention enhancement module to exploit temporal context from consecutive LiDAR frames. Specifically, the backbone processes a sequence of LiDAR point clouds and produces both global feature sequences and current-frame spatial dense features. The pre-trained classification head maps the global features into region-discriminative guidance features, which are then temporally encoded by a GRU-based T-SCG module to capture motion continuity and suppress ambiguity caused by sparse or repetitive structures. To further alleviate the forgetting effect of recurrent modeling over long sequences, a multi-head attention mechanism is applied to the full history of guided states, enabling the model to adaptively focus on keyframes with stronger scene discriminability. The resulting temporal context is fused with current-frame spatial dense features and fed into the regression head to predict scene coordinates, which are then used by RANSAC to estimate the final 6-DoF pose. Experiments were conducted on a self-built agricultural dataset collected along a 9 km route that covers the full operational chain of agricultural machinery, including departure from the machine shed, traversal through village roads and public roads, entry into farmland, field operation, and return to the shed. The dataset consists of two sequences collected on the same route at different time periods, with 30.4 GB (15,611 frames) and 23.0 GB (12,017 frames), respectively. In the main agricultural experiment, AgriLoc achieved a mean translation error of 2.17 m and a mean rotation error of 2.75°. Compared with the baseline LightLoc, AgriLoc reduced the average translation error by 27.2% and the average rotation error by 6.4% in challenging tractor-road scenes, while requiring only 3.8 hours of training for a new scene. The ablation study further shows that introducing T-SCG reduced the mean translation error from 2.98 m to 2.50 m, and adding multi-head attention further improved it to 2.17 m, confirming the complementary contribution of temporal guidance and attention-based keyframe selection. To assess cross-scene robustness, we also evaluated AgriLoc on the NCLT public dataset and a campus dataset. On NCLT, the model achieved a mean translation error of 1.88 m and a mean rotation error of 2.82°. On the campus dataset, it obtained 1.84 m translation error and 2.73° rotation error. These results demonstrate the cross-scene adaptability of AgriLoc. Overall, this study provides a practical, high-precision, and rapidly deployable LiDAR localization solution for smart agriculture and autonomous navigation of agricultural machinery.