A scale adaptive visual positioning method for unmanned aerial vehicles
By using an improved EfficientLoFTR architecture and a blind scale estimation network, the problem of large-scale changes and illumination changes for UAVs in GNSS-denied environments is solved, achieving high-precision, real-time UAV visual positioning and enhancing illumination robustness and computational efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING UNIV OF SCI & TECH
- Filing Date
- 2026-03-17
- Publication Date
- 2026-06-16
AI Technical Summary
In GNSS-denied environments, UAVs face challenges due to large-scale changes in flight maneuvers, drastic changes in illumination, and computational redundancy caused by excessively large satellite base map sheets. Existing visual positioning methods struggle to achieve high-precision, real-time positioning in such environments.
An improved EfficientLoFTR architecture is adopted, which introduces cosine similarity to optimize feature measurement, DBSCAN clustering method to lock the region of interest, and a blind scale estimation network to achieve sensorless end-to-end scale alignment and illumination robustness, thereby reducing computational overhead.
High-precision and real-time visual positioning of UAVs was achieved in GNSS-denied environments, enhancing robustness to changes in lighting, reducing computational overhead, and meeting the requirements for airborne real-time positioning.
Smart Images

Figure CN122223116A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision and UAV navigation technology, specifically relating to a scale-adaptive visual positioning method for UAVs. Background Technology
[0002] With the rapid development of UAV technology, its applications in military reconnaissance, logistics transportation, and disaster relief are becoming increasingly widespread. Global Navigation Satellite Systems (GNSS) are currently the primary means of navigation and positioning for UAVs. However, in complex electromagnetic environments, urban canyons, or underground spaces, GNSS signals are highly susceptible to interference and even deception, leading to positioning failures. To improve the survivability and autonomous navigation capabilities of UAVs in GNSS-denied environments, vision-based geolocation technology has become a current research hotspot. Early visual matching techniques mainly relied on traditional manual feature methods. While these methods consume relatively low computational resources, in UAV ground positioning scenarios, when facing satellite remote sensing image matching with drastic lighting changes (such as day-night differences) or repetitive textures (such as deserts and water surfaces), their feature descriptors exhibit poor robustness, making it difficult to meet high-precision positioning requirements.
[0003] In recent years, deep learning-based image matching methods have made groundbreaking progress, such as the Transformer-based LoFTR method. This method utilizes the Transformer architecture and acquires the global receptive field of an image through self-attention and mutual attention mechanisms, effectively solving the problem of matching difficulties in weakly textured regions using traditional methods and significantly improving the matching ability of sparse features. However, directly applying these methods to UAV visual localization still faces significant challenges.
[0004] First, existing methods lack purely visual scale adaptation capabilities. When drones perform missions, they undergo drastic altitude changes, resulting in a huge scale difference between airborne view images and satellite base maps. Most existing technologies rely on external sensors such as barometers and altimeters to provide altitude information to assist in scaling, lacking purely visual end-to-end scale adaptation capabilities. When external sensors are interfered with or unavailable, matching is extremely prone to failure.
[0005] Furthermore, existing technologies suffer from shortcomings in robustness and real-time performance under complex lighting conditions. Existing Transformer-based matching methods typically compute feature dot products directly, which are sensitive to feature amplitudes and exhibit poor robustness when there are drastic differences in lighting between satellite images and UAV perspectives.
[0006] Meanwhile, satellite base maps are usually huge, and existing high-precision matching methods have high computational complexity. If searching and matching are performed across the entire map area, the computational overhead is too high, making it difficult to achieve real-time positioning on UAV embedded platforms with limited computing power.
[0007] Therefore, developing a UAV visual positioning method that can adapt to scale changes without the assistance of external sensors, has strong robustness to illumination differences, and meets the real-time computing requirements of the airborne terminal is of great significance for ensuring the safe flight of UAVs in GNSS denied environments. Summary of the Invention
[0008] To address the challenges of matching failures caused by large-scale changes due to high-maneuver flight, poor feature extraction robustness due to drastic lighting variations, and computational redundancy caused by excessively large satellite base map sizes in UAV visual positioning under GNSS-denied environments, this invention proposes a scale-adaptive visual positioning method for UAVs. Based on an improved EfficientLoFTR architecture, this method introduces cosine similarity to optimize feature metrics, fuses DBSCAN clustering to lock regions of interest (ROIs), and designs a sensorless blind scale estimation network. This achieves pixel-level scale alignment across viewpoints without relying on external sensors, significantly reducing model prediction bias and greatly improving positioning accuracy while maintaining real-time performance on the airborne end.
[0009] The technical solution for implementing this invention is: a scale-adaptive visual positioning method for unmanned aerial vehicles (UAVs), comprising the following steps:
[0010] Step 1: Download the MegaDepth dataset. Convert the original images in this dataset to grayscale and resize them. Calculate the true scale factor labels based on camera parameters to obtain the training set and its corresponding true scale factor. Download the UAV-VisLoc dataset. Convert the original images in this dataset to grayscale and resize them. Calculate the true scale factor labels based on camera parameters to obtain the test set and its corresponding true scale factor.
[0011] The training and test sets mentioned above contain several pairs of UAV aerial images and satellite base maps, with the UAV aerial images in each pair matched with the satellite base map.
[0012] Proceed to step 2.
[0013] Step 2: Construct a scale-adaptive visual localization network for UAVs:
[0014] The scale-adaptive visual localization network for UAVs includes a multi-scale feature extraction and reconstruction network, an anti-illumination coarse matching module, a dynamic ROI locking module, a blind scale estimation network, and a scale-aligned fine matching module; proceed to step 3.
[0015] Step 3: Use the training set to train the scale-adaptive visual localization network for UAVs to obtain the trained scale-adaptive visual localization model.
[0016] Step 3-1: Input several pairs of UAV aerial images and satellite base maps from the training set into the multi-scale feature extraction and reconstruction network. Use a backbone network with shared weights to extract multi-level feature pyramids, and output the resolution of the input images. The coarse-grained feature map is generated; to address the yaw problem of the UAV, a rotation position encoding is applied to the coarse-grained feature map, and the position information is encoded as a rotation matrix in the complex field; then, a global feature interaction is performed through an aggregation attention mechanism to reconstruct a global coarse-grained feature map rich in long-distance context dependencies.
[0017] Step 3-2: Input the global coarse-grained feature map into the anti-lighting coarse matching module, normalize the feature descriptors of the global coarse-grained feature map to eliminate the influence of amplitude, then calculate the cosine similarity score matrix between feature points to replace the traditional dot product operation, and then use the mutual nearest neighbor criterion to filter the similarity matrix to obtain the initial coarse matching pairs, and then obtain the point set of the initial coarse matching pairs.
[0018] Step 3-3: Input the initial coarse matching point set into the dynamic ROI locking module, calculate the coordinate offset between the two images in each initial coarse matching pair as a clustering feature; use a density-based spatial clustering algorithm to perform cluster analysis on the clustering feature, identify and remove outlier noise points with inconsistent offsets, and obtain the inlier set; introduce... The criteria remove outliers from the inlier set that deviate from the spatial distribution mean by more than 3 standard deviations, resulting in a filtered inlier set. Based on the spatial distribution of the filtered inlier set, a dynamic ROI bounding box covering the main matching area is generated, which includes UAV ROI images and satellite ROI base maps.
[0019] Step 3-4: Input the global coarse-grained feature map obtained in Step 3-1 into the blind scale estimation network, and use the spatial pyramid pooling layer to extract global texture statistical features under different receptive fields. The global texture statistical features include the statistical features and differential features of the UAV aerial image and the satellite base map. After concatenating the above statistical features and differential features, the relative scale factor between the two images is predicted end-to-end by the regression network, and the network is supervised by the true scale factor.
[0020] Steps 3-5: Input the ROI bounding box output from Step 3-3, the relative scale factor output from Step 3-4, and the images in the training set into the fine matching module; firstly, use the relative scale factor to guide the UAV ROI images to perform physical scale alignment resampling, so that their resolution is similar to that of the satellite ROI. Figure 1The resampled image is then input into the backbone network to extract fine-grained features, resulting in scale-normalized fine-grained features. These scale-normalized fine-grained features are then fused with global coarse-grained features to obtain fused features. Finally, local correlations are calculated on the fused features, and the final geographic location coordinates are solved through spatial expectation aggregation to obtain the trained scale-adaptive visual positioning model.
[0021] Step 4: Input the test set images into the trained scale-adaptive visual localization model, output the predicted geographic coordinates, calculate the average localization error between the predicted and actual coordinates, and evaluate the localization accuracy of the model.
[0022] Compared with the prior art, the significant advantages of this invention are:
[0023] (1) Enhanced robustness to changes in illumination and contrast: This invention uses cosine similarity instead of the traditional dot product operation as the metric for feature matching and performs L2 normalization on the feature descriptors. This method eliminates the direct influence of feature amplitude on the matching score and can still maintain high matching reliability even when there are drastic differences in illumination between the satellite base map and the UAV viewpoint (such as day and night, seasonal changes).
[0024] (2) Sensorless scale-adaptive positioning is achieved: The present invention innovatively designs a blind scale estimation (BSE) module, which can accurately predict the relative scale factor end-to-end based solely on the global statistical information of visual features without relying on external sensors such as barometers or altimeters.
[0025] Significantly reduce computational overhead and meet airborne real-time requirements: The DBSCAN density clustering method is introduced to eliminate mismatches and lock ROIs, reducing the computational scope of fine matching from the entire image to local texture regions, thus avoiding computational redundancy of invalid backgrounds.
[0026] (3) This invention innovatively designs a scale-adaptive visual positioning method for UAVs. It enhances illumination robustness by introducing cosine similarity to optimize feature metrics, integrates the DBSCAN method to remove outliers to lock dynamic regions of interest (ROIs), and designs a blind scale estimation network based on spatial pyramid pooling to achieve sensorless end-to-end relative scale factor regression. It effectively solves the positioning failure problem of UAVs in GNSS-denied environments caused by large-scale changes and illumination differences, achieving a balance between accuracy and speed. Attached Figure Description
[0027] Figure 1 This is a network architecture diagram of an improved scale-adaptive visual localization method for unmanned aerial vehicles (UAVs) according to the present invention.
[0028] Figure 2 This is a flowchart of the present invention.
[0029] Figure 3 Flowchart for ROI extraction.
[0030] Figure 4 This is a structural diagram of the BSE module in this invention. Detailed Implementation
[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0032] The technical solutions of the various embodiments of the present invention can be combined with each other, but only if they can be implemented by those skilled in the art. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0033] The following section will further introduce the specific implementation method, as well as the technical difficulties and inventive points of this invention, using this design example as an example.
[0034] This invention provides a scale-adaptive visual positioning method for unmanned aerial vehicles (UAVs), aiming to solve the positioning failure problem caused by drastic changes in illumination, large background interference, and changes in flight altitude in GNSS-denied environments, and to improve the accuracy and robustness of UAV visual positioning. The embodiments of this invention are described in further detail below.
[0035] Combination Figures 1-4 The present invention provides a scale-adaptive visual localization method for unmanned aerial vehicles (UAVs), comprising the following steps:
[0036] Step 1: Construct and preprocess the UAV visual localization dataset:
[0037] Download the MegaDepth and UAV-VisLoc datasets. The MegaDepth dataset contains drone aerial images and satellite base maps, representing outdoor scenes with extreme perspective changes. The original images in this dataset are converted to grayscale and resized. Based on camera parameters, the true scale factor labels are calculated to obtain the training set and its corresponding true scale factor, used for model training. The UAV-VisLoc dataset contains drone aerial images and satellite base maps at different flight altitudes. The original images in this dataset are converted to grayscale and resized. Based on camera parameters, the true scale factor labels are calculated to obtain the test set and its corresponding true scale factor, used for model testing and validation.
[0038] Preprocess the original image to convert the input drone aerial image into a digital format. and satellite base map The data is uniformly converted to grayscale and resized, and the focal length is determined based on the camera intrinsic parameters provided in the dataset. Flight altitude of external reference Calculate the ground sampling distance (GSD) ratio between image pairs, i.e., the ground scale factor. .
[0039] Proceed to step 2.
[0040] Step 2: Construct a scale-adaptive visual localization network for UAVs. This network includes a multi-scale feature extraction and reconstruction network, an anti-illumination coarse matching module, a dynamic ROI locking module, a blind scale estimation network (BSE), and a scale-aligned fine matching module. The multi-scale feature extraction and reconstruction network uses RepVGG as its backbone and introduces rotational position encoding (RoPE) on the coarse-grained features. The anti-illumination coarse matching module uses cosine similarity measurement. The dynamic ROI locking module is based on the DBSCAN density clustering algorithm. The blind scale estimation network is constructed based on spatial pyramid pooling (SPP) and multilayer perceptron (MLP). The scale-aligned fine matching module is responsible for image resampling and sub-pixel coordinate regression. Proceed to Step 3.
[0041] Step 3: Train the scale-adaptive visual localization network for UAVs using the training set to obtain the trained scale-adaptive visual localization model, as follows:
[0042] Step 3-1: Multi-scale feature extraction and reconstruction network, such as... Figure 2 As shown, the drone aerial images and satellite base maps from the training set are input into the multi-scale feature extraction and reconstruction network. The RepVGG backbone network is used to extract multi-level feature pyramids, and the output resolution is the same as the input image. coarse-grained feature map and ( This indicates an aerial photograph taken by a drone. Represents satellite base map, (Indicates coarse grain size) Represents the coarse-grained characteristics of drone aerial photography. This represents the coarse-grained characteristics of the satellite base map.
[0043] For changes in the yaw angle of drones, in coarse-grained features and The algorithm introduces Rotation Position Encoding (RoPE), which encodes positional information as a rotation matrix in the complex field, making the features rotation-invariant. Then, through the aggregation attention mechanism in the Transformer module, self-attention and mutual attention calculations are performed alternately to reconstruct a global coarse-grained feature map rich in long-range contextual dependencies. and Proceed to step 3-2.
[0044] Step 3-2: Calculate the global coarse-grained features output in Step 3-1. and For the input anti-illuminance coarse matching module, considering that traditional dot product operations are sensitive to feature magnitudes and have poor robustness under drastic changes in illumination, this invention uses cosine similarity to replace dot product operations, as detailed below:
[0045] First, L2 normalization is performed on the coarse-grained feature descriptors, and then the cosine similarity score between UAV feature points and satellite feature points is calculated. The formula is as follows:
[0046] ,
[0047] in, Represents the cosine similarity score; Indicates the location of drone aerial images Coarse-grained feature vector at the location; Indicates the location of the satellite base map The coarse-grained feature vector at the given location. The nearest neighbor (MNN) criterion and confidence threshold are used. Quickly filter the similarity score matrix if and only if the position and They are each other's maximum value in the row and column and their scores are higher than each other's. At that time, retain them as the initial coarse matching pairs. This leads to the initial coarse matching pair point set, and then proceeds to step 3-3.
[0048] Step 3-3, Combining Figure 3 The initial coarse matching pairs generated in step 3-2 are... The point set input is used in the dynamic ROI locking module. Considering that satellite base maps contain a large number of similar texture structures that can easily lead to discrete mismatches, the DBSCAN algorithm is used for geometric denoising, as detailed below:
[0049] Calculate the coordinate offset of the initial matching pair between the two images. As a clustering feature, if a certain matching point The number of samples in the neighborhood exceeds the threshold If a cluster is identified as a core point, then the cluster with the highest density is retained as the set of interior points. The formula is as follows:
[0050] ,
[0051] in, Represent the set of interior points; These are the initial coarse matching pairs; This is the coordinate offset; Indicates the number of samples in the neighborhood; This represents the minimum sample size threshold. This represents the coordinates of matching points in a UAV aerial image and their corresponding coordinates in a satellite base map. (Introduction) Criterion for eliminating interior point sets Outliers that deviate from the spatial distribution mean by more than 3 times the standard deviation are identified, and a set of inliers is obtained. The minimum bounding rectangle is calculated based on the set of inliers to generate dynamic ROI bounding boxes on the UAV and satellite base map. These dynamic ROI bounding boxes contain the UAV ROI image and the satellite ROI base map. Proceed to steps 3-5.
[0052] Steps 3-4, combined Figure 4 The global coarse-grained features output in step 3-1 and The input blind scale estimation network (BSE) takes into account the drastic scale differences caused by changes in the drone's flight altitude. It uses global statistical features to regress the relative scale factor end-to-end, as follows:
[0053] Construct a Spatial Pyramid Pooling (SPP) layer to process the global coarse-grained feature map. and Perform separately , , Max pooling at the grid scale flattens the output into a feature vector containing multi-scale spatial information, namely, the feature vector of the UAV aerial image, the feature vector of the satellite base map, and their difference feature vectors. The UAV aerial image feature vector, the satellite base map feature vector, and their difference feature vectors are then concatenated and input into a multilayer perceptron (MLP) network, utilizing the true scale factor. The network is supervised using the log-space L1 loss function, as shown in the following formula:
[0054] ,
[0055] in, Indicates scale loss; Represents the relative scaling factor of the prediction; Represents the true scale factor; regression predicts the relative scale factor between two images. Proceed to steps 3-5.
[0056] Step 3-5: Combine the ROI bounding box obtained in Step 3-3 with the relative scale factor obtained in Step 3-4. And the fine-grained matching module for image input in the training set, utilizing relative scale factors. Guided image resampling, specifically as follows: using the satellite ROI base map as a reference, and utilizing the relative scale factor... Perform physical scale-aligned resampling on the UAV ROI image to make its resolution match that of the satellite ROI. Figure 1 To obtain scale-aligned drone aerial images Satellite base map aligned with scale The resampled image and The backbone network is input again to extract scale-normalized fine-grained features, which are then concatenated and fused with global coarse-grained features to obtain fused features. and ( This indicates an aerial photograph taken by a drone. Represents satellite base map, (Indicates fine granularity).
[0057] Local correlations are calculated on the fused feature map. The nearest neighbor criterion is applied to search for pixel-level matching points, and a local window is cropped centered on these points. Sub-pixel offsets are solved using spatial expectation aggregation, combined with ROI cropping coordinates and relative scale factors. Reverse mapping outputs the final high-precision geolocation coordinates. And obtain the trained scale-adaptive visual localization model, then proceed to step 4.
[0058] Step 4: Input the test set into the trained scale-adaptive visual localization model and output the geographic coordinates of each target in the test set image to evaluate the model accuracy.
[0059] The scale-adaptive visual localization method for UAVs described in this invention is implemented using the Python language and PyTorch framework, and the model is trained using an NVIDIA RTX 4080 GPU.
[0060] In the experiment, the AdamW optimizer was used for training, with an initial learning rate of 0.001 and a batch size of 8. The confidence threshold for the coarse matching stage was also used. Set to 0.2, DBSCAN clustering threshold The value is set to 8. To demonstrate the effectiveness of this invention, mainstream algorithms such as SIFT, LoFTR, and EfficientLoFTR were selected as comparison models.
[0061] Table 1. Comparison of Positioning Errors
[0062]
[0063] Table 2 Model Inference Time
[0064]
[0065] Combining Tables 1 and 2, on the UAV-VisLoc dataset, the average localization error of the method proposed in this invention is 2.61m, which is approximately 25.9% lower than the benchmark algorithm EfficientLoFTR. The average inference time on the NVIDIA Jetson TX2 embedded platform is 123ms, meeting the requirements for near real-time localization. Experimental results demonstrate the practicality and effectiveness of the method proposed in solving problems related to large-scale variations and illumination interference.
[0066] The scope of protection of this invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this invention should be included within the scope of protection of this invention. Therefore, the scope of protection of this invention should be determined by the scope of the claims.
Claims
1. A scale-adaptive visual localization method for unmanned aerial vehicles (UAVs), characterized in that, Includes the following steps: Step 1: Download the MegaDepth dataset. Convert the original images in the dataset to grayscale and resize them. Calculate the true scale factor labels based on camera parameters to obtain the training set and its corresponding true scale factor. Download the UAV-VisLoc dataset, convert the original images in the dataset to grayscale and resize them, and calculate the true scale factor labels based on the camera parameters to obtain the test set and its corresponding true scale factor. The training and test sets mentioned above contain several pairs of UAV aerial images and satellite base maps, with the UAV aerial images in each pair matched with the satellite base map; Proceed to step 2; Step 2: Construct a scale-adaptive visual localization network for UAVs: The scale-adaptive visual localization network for UAVs includes a multi-scale feature extraction and reconstruction network, an anti-illumination coarse matching module, a dynamic ROI locking module, a blind scale estimation network, and a scale-aligned fine matching module; proceed to step 3; Step 3: Use the training set to train the scale-adaptive visual localization network for UAVs to obtain the trained scale-adaptive visual localization model. Step 3-1: Input several pairs of UAV aerial images and satellite base maps from the training set into the multi-scale feature extraction and reconstruction network. Use a backbone network with shared weights to extract multi-level feature pyramids, and output the resolution of the input images. The coarse-grained feature map is constructed. To address the yaw problem of the UAV, a rotation position encoding is applied to the coarse-grained feature map, and the position information is encoded as a rotation matrix in the complex field. Then, a global feature interaction is performed through an aggregation attention mechanism to reconstruct a global coarse-grained feature map rich in long-distance context dependencies. Step 3-2: Input the global coarse-grained feature map into the anti-lighting coarse matching module, normalize the feature descriptors of the global coarse-grained feature map to eliminate the influence of amplitude, then calculate the cosine similarity score matrix between feature points to replace the traditional dot product operation, and then use the mutual nearest neighbor criterion to filter the similarity matrix to obtain the initial coarse matching pairs, and then obtain the point set of the initial coarse matching pairs. Step 3-3: Input the initial coarse matching point set into the dynamic ROI locking module, and calculate the coordinate offset between the two images in each initial coarse matching pair as the clustering feature; Density-based spatial clustering algorithms are used to perform clustering analysis on clustering features, identifying and removing outlier noise points with inconsistent offsets to obtain a set of interior points; [The text then abruptly shifts to a different topic:] ...introducing... The criteria remove outliers from the inlier set that deviate from the spatial distribution mean by more than 3 times the standard deviation, resulting in a filtered inlier set. Based on the spatial distribution of the filtered inlier set, a dynamic ROI bounding box covering the main matching area is generated, which includes UAV ROI images and satellite ROI base maps. Step 3-4: Input the global coarse-grained feature map obtained in step 3-1 into the blind scale estimation network, and use the spatial pyramid pooling layer to extract global texture statistical features under different receptive fields. The global texture statistical features include the statistical features and differential features of the UAV aerial image and the satellite base map. After concatenating the above statistical features and differential features, the relative scale factor between the two images is predicted end-to-end through the regression network. The network is supervised by the real scale factor. Steps 3-5: Input the ROI bounding box output from Step 3-3, the relative scale factor output from Step 3-4, and the images in the training set into the fine matching module; firstly, use the relative scale factor to guide the UAV ROI image to perform physical scale alignment resampling so that its resolution is consistent with the satellite ROI base map; The resampled image is input into the backbone network again to extract fine-grained features, resulting in scale-normalized fine-grained features. These scale-normalized fine-grained features are then fused with global coarse-grained features to obtain fused features. Finally, local correlations are calculated on the fused features, and the final geographic location coordinates are solved by spatial expectation aggregation to obtain the trained scale-adaptive visual positioning model. Step 4: Input the test set images into the trained scale-adaptive visual localization model, output the predicted geographic coordinates, calculate the average localization error between the predicted and actual coordinates, and evaluate the localization accuracy of the model.
2. The scale-adaptive visual positioning method for unmanned aerial vehicles (UAVs) according to claim 1, characterized in that, In step 1, the original image is preprocessed to convert the input drone aerial image into a digital format. and satellite base map The data is uniformly converted to grayscale and resized, and the focal length is determined based on the camera intrinsic parameters provided in the dataset. Flight altitude of external reference Calculate the ratio of the true ground sampling distance between image pairs, i.e., the true scale factor. .
3. The scale-adaptive visual positioning method for unmanned aerial vehicles (UAVs) according to claim 2, characterized in that, In step 2, the multi-scale feature extraction and reconstruction network uses RepVGG as the backbone and introduces RoPE on the coarse-grained features; the illumination-resistant coarse matching module uses cosine similarity measurement; the dynamic ROI locking module is based on the DBSCAN density clustering algorithm; the blind scale estimation network is based on spatial pyramid pooling and multilayer perceptron; and the scale alignment fine matching module is responsible for image resampling and sub-pixel coordinate regression.
4. The scale-adaptive visual positioning method for unmanned aerial vehicles according to claim 3, characterized in that, In step 3-1, the specific details are as follows: The training set of UAV aerial images and satellite base maps are input into a multi-scale feature extraction and reconstruction network. The RepVGG backbone network is used to extract multi-level feature pyramids, and the output resolution is the same as the input image. coarse-grained feature map and , Represents the coarse-grained characteristics of drone aerial photography. Represents the coarse-grained characteristics of the satellite base map; For changes in the yaw angle of drones, in coarse-grained features and The RoPE algorithm is introduced to encode positional information as a rotation matrix in the complex field, making the features rotation-invariant. Then, through the aggregation attention mechanism in the Transformer module, self-attention and mutual attention calculations are performed alternately to reconstruct a global coarse-grained feature map rich in long-distance context dependencies. and .
5. The scale-adaptive visual positioning method for unmanned aerial vehicles according to claim 4, characterized in that, In step 3-2, the specific details are as follows: The global coarse-grained features output in step 3-1 and For the input anti-lighting coarse matching module, considering that traditional dot product operations are sensitive to feature amplitude and have poor robustness under drastic lighting changes, cosine similarity is used to replace dot product operations: L2 normalization is performed on the coarse-grained feature descriptors, and the cosine similarity score between UAV feature points and satellite feature points is calculated. The formula is as follows: , in, Represents the cosine similarity score; Indicates the location of drone aerial images Coarse-grained feature vector at the location; Indicates the location of the satellite base map Coarse-grained feature vectors at the location; using the MNN criterion and confidence threshold. Quickly filter the similarity score matrix if and only if the position and They are each other's maximum value in the row and column and their scores are higher than each other's. At that time, retain them as the initial coarse matching pairs. This leads to the initial set of coarsely matched points.
6. The scale-adaptive visual positioning method for unmanned aerial vehicles according to claim 5, characterized in that, Step 3-3, as follows: The initial coarse matching pairs generated in step 3-2 The point set input is used in the dynamic ROI locking module. Considering that satellite base maps contain a large number of similar texture structures that can easily lead to discrete mismatches, the DBSCAN algorithm is used for geometric denoising. Calculate the coordinate offset of the initial matching pair between the two images. As a clustering feature, if a certain matching point The number of samples in the neighborhood exceeds the threshold If a cluster is identified as a core point, then the cluster with the highest density is retained as the set of interior points. The formula is as follows: , in, Represent the set of interior points; These are the initial coarse matching pairs; This is the coordinate offset; Indicates the number of samples in the neighborhood; This represents the minimum sample size threshold. This represents the coordinates of matching points in the drone aerial image and their corresponding coordinates in the satellite base map. Introduction Criterion for eliminating interior point sets Outliers that deviate from the spatial distribution mean by more than 3 times the standard deviation are identified, and a set of filtered inliers is obtained. The minimum bounding rectangle is calculated based on the set of filtered inliers to generate a dynamic ROI bounding box on the UAV and satellite base map. This dynamic ROI bounding box contains the UAV ROI image and the satellite ROI base map.
7. A scale-adaptive visual positioning method for unmanned aerial vehicles according to claim 6, characterized in that, Steps 3-4 are as follows: The global coarse-grained features output in step 3-1 and The input blind scale estimation network takes into account the drastic scale differences caused by changes in the flight altitude of the UAV, and uses global statistical features to regress the relative scale factor end-to-end. Construct a spatial pyramid pooling layer to process the global coarse-grained feature map. and Perform separately , , Max pooling at the grid scale flattens the output into a feature vector containing multi-scale spatial information, namely, the feature vector of the UAV aerial image, the feature vector of the satellite base map, and their difference feature vectors. The UAV aerial image feature vector, the satellite base map feature vector, and their difference feature vectors are then concatenated and input into the MLP, utilizing the true scale factor. The network is supervised using the log-space L1 loss function, as shown in the following formula: , in, Indicates scale loss; Represents the relative scaling factor of the prediction; Represents the true scale factor; Regression predicts the relative scale factor between two images. .
8. A scale-adaptive visual positioning method for unmanned aerial vehicles according to claim 7, characterized in that, Steps 3-5 are as follows: The bounding box of the ROI obtained in step 3-3 and the relative scale factor obtained in step 3-4 are used to define the bounding box of the ROI obtained in step 3-3. And the fine-grained matching module for image input in the training set, utilizing relative scale factors. Guided image resampling: Based on the satellite ROI base map, using the relative scale factor Physically scale-aligned resampling of the UAV ROI image was performed to make its resolution consistent with the satellite ROI base map, resulting in a scale-aligned UAV aerial image. Satellite base map aligned with scale ; Resampled image and The backbone network is input again to extract scale-normalized fine-grained features, which are then concatenated and fused with global coarse-grained features to obtain fused features. and ; Local correlations are calculated on the fused feature map, and pixel-level matching points are searched using the nearest neighbor criterion. A local window is then centered on this point, and sub-pixel offsets are solved by spatial expectation aggregation. This is combined with ROI clipping coordinates and relative scale factors. Reverse mapping outputs the final high-precision geolocation coordinates. And obtain a trained scale-adaptive visual localization model.