# Self-Supervised Keypoint Learning for the Geometric Analysis of Road-Marking Templates
###### Abstract  
Robust visual perception and geometric alignment are crucial for intelligent automation in various domains, such as industrial processes and infrastructure monitoring. Accurately aligning structured visual elements, such as floor markings or road-marking templates, is essential for tasks like automated guidance, verification, and condition assessment. However, traditional feature-based methods struggle with templates that feature simple geometries and lack rich textures, making reliable feature matching and alignment difficult, even under controlled conditions. To address this, we propose GeoTemplateKPNet, a novel self-supervised deep-learning framework, built upon Convolutional Neural Networks (CNNs), designed to learn robust, geometrically consistent keypoints specifically in synthetic template images. The model is trained exclusively in a synthetic template dataset by enforcing equivariance to geometric transformations and utilizing self-supervised losses, including inside mask loss, peakiness loss, repulsion loss, and keypoint-driven image reprojection loss, thereby eliminating the need for manual keypoint annotations. We evaluate the method in a synthetic template test set, using metrics such as a keypoint-matching comparison, the Inside Mask Rate (IMR), and the Alignment Reconstruction Error (ARE). The results demonstrate that GeoTemplateKPNet successfully learns to predict meaningful keypoints on template structures, enabling accurate alignment between templates and their transformed counterparts. Ablation studies reveal that the number of keypoints (K) impacts the performance, with K = 3 providing the most suitable balance for the overall alignment accuracy, although the performance varies across different template geometries. GeoTemplateKPNet offers a foundational self-supervised solution for the robust geometric analysis of templates, which is crucial for downstream alignment tasks and applications. m 2025 19 May 2025 19 May 2025 17 June 2025 19 June 2025 19 June 2025 19 June 2025 19 June 2025 19 June 2025 19 June 2025 19 May 2025 19 May 2025 19 May 2025 19 May 2025 19 June 2025 19 June 2025 1  
perception due to variations in lighting, dust accumulation, wear and tear, partial occlusion, and changes in viewpoint. These challenges are highly analogous to those faced when analyzing external road markings. Road markings are fundamental elements of transportation infrastructure, playing critical roles in ensuring road safety [2], guiding traffic flows, and enabling navigation for both human drivers and autonomous vehicles (AVs). Maintaining the visibility and integrity of these markings is paramount. Consequently, efficient and accurate methods for monitoring their condition, verifying their type and placement against standards or maps, and assessing potential damage are increasingly vital for road authorities and AV developers. As illustrated in Figure 1, industrial and road-marking signs share fundamental visual characteristics and are susceptible to similar degradation processes, viewpoint changes, diverse lighting, and potential motion blur. These factors severely impact the appearance of real-world instances. Furthermore, even clean, canonical template images of these elements, such as the road-marking templates we study, often have simple structures, like straight lines and few distinct corners. This characteristic makes them particularly challenging for classical computer vision techniques, such as hand-crafted feature detectors (e.g., SIFT [3] and ORB [4]). Traditional methods designed to find complex, textured features often detect only a limited number of points on these plain templates, frequently resulting in fewer than the minimum required correspondences (e.g., four for affine transformations) for robust geometric alignment using methods like RANSAC [5]. This limitation applies not only to aligning templates with degraded real-world instances but also to the simpler task of aligning a template with its geometrically transformed version.