## 2 Related Works  
### Visual Relocalization  
Visual relocalization methods can be broadly categorized into two types. The first type is based on Convolutional Neural Networks (CNNs) and utilizes deep learning techniques for relocalization computation. In recent years, deep learning methods have been increasingly applied to visual relocalization, leading to two primary algorithmic frameworks: absolute pose estimation and scene coordinate regression. Absolute pose estimation directly predicts the camera's pose using neural networks in an end-to-end fashion. PoseNet [8] was the first to tackle the camera pose estimation problem using deep learning. It showed the effectiveness of this approach. [PERSON] et al. [9] used a multi-task learning strategy. Theycombined pose estimation and semantic segmentation in a single network. By learning both geometric and semantic features of a scene, they added extra constraints to the pose regression task. This helped improve relocalization accuracy. [PERSON] et al. [10] used Long Short-Term Memory (LSTM) [11] to extract temporal information from image sequences. This improved global localization accuracy by processing sequential images. Scene coordinate regression directly predicts scene coordinates for pixel points. It links 2D pixel points to 3D landmark points. The PnP algorithm is then used to compute the camera pose, which increases relocalization accuracy. This method often uses random forests and CNNs. CNNs are crucial in image processing. The convolutional and pooling layers extract high-dimensional features and provide multi-angle descriptions of the image. [PERSON] introduced DSAC [12], which uses two neural networks to predict landmark coordinates and score the poses, yielding advanced prediction results at the time. Building upon DSAC, [PERSON] et al. later proposed DSAC++ [13] and DSAC* [14], which further refined feature map extraction, achieving high-precision feature extraction. These networks employed Random Sample Consensus (RANSAC) and Perspective-n-Point (PnP) algorithms to generate pose pools, selecting the optimal pose based on reprojection errors. Moreover, they extended the input from RGB to RGB-D images, which reduced memory usage and accelerated training. [PERSON] et al. [15] proposed a lightweight, retrieval-based network structure that uses CNNs to extract features, searches for the most similar keyframe in a database, and employs a Siamese network to learn the relative pose between the query image and the keyframe, thus determining the camera pose. However, this method struggles to distinguish similar image patches effectively, resulting in poor performance in scenes with repetitive textures. Furthermore, it is vulnerable to interference from dynamic objects. After training, the model's parameters become fixed to a specific scene, limiting the network's ability to generalize to new, unseen scenarios. The second category of methods aims to obtain the corresponding 2D and 3D coordinates of the query image and the database model, using algorithms such as PnP or its variants to estimate the camera pose. The relocalization algorithm in ORB-SLAM3 [16] adopts this approach. It first employs a bag-of-words model to identify the keyframe most similar to the current frame and accelerates the matching between 2D feature points and 3D landmarks using this model. Based on the matches, the robot pose is determined using the RANSAC and PnP algorithms. [PERSON] et al. [17] proposed a matching framework that uses visual vocabulary quantization and prioritized correspondence search. They showed that directly establishing 2D-3D correspondences is both effective and superior. [PERSON] et al. [18] introduced VPS, which applies a bag-of-visual-words model to create a priority ranking system. By adding co-visibility information, this method sped up the matching process and achieved the fastest performance at the time. [PERSON] et al. [19] tackled the challenge of distinguishing similar 3D points in large-scale scenes. They used a Markov graph to map the corresponding 3D points.