Cross-view image matching and positioning method and system based on feature relationship guidance
By employing a cross-view image matching method based on Siamese neural networks and utilizing deformable convolution and global relationship mining techniques, this method addresses the problem of insufficient utilization of ground-to-air image geometric relationships in traditional algorithms, achieving higher-precision image matching and localization results, and is suitable for autonomous driving and robot navigation.
Patent Information
- Application Number
- CN202311349747.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-18
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-10-18
AI Technical Summary
Traditional cross-view image matching and localization algorithms struggle to effectively utilize the geometric relationships between ground and aerial images, resulting in image content distortion and poor matching and localization performance, especially in complex scenes and changing viewpoints.
A cross-view image matching method based on Siamese neural networks is adopted. Deformable convolution is used to extract multi-scale contextual information and global relationship perception. Combined with polar coordinate transformation and global relationship mining, more discriminative image descriptors are generated through feature descriptors.
It improves the performance of cross-view image matching and localization, enhances the robustness and adaptability of features, and improves the matching and localization accuracy of image data, making it easier to apply in autonomous driving and robot navigation.
Smart Images

Figure CN117495956B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of remote sensing image processing technology in the field of computer vision, and in particular to a cross-view image matching and localization method and system based on feature relationship guidance. Background Technology
[0002] With the development of autonomous driving and robot navigation technologies, image-based geolocation technology has attracted widespread attention in the field of computer vision. Traditional image-based geolocation is usually performed when both the query image and the reference image are taken from ground views. However, due to the difficulty in acquiring ground images in some areas, it is difficult to build a globally covering reference image database, which limits the applicability of this technology. Considering the dense global coverage of satellites and drones today, cross-view image matching and localization, which matches ground images with aerial remote sensing images, has gradually become an increasingly popular method. However, because there is a huge difference in shooting perspective between ground and aerial images, it is difficult to effectively establish feature associations for the same ground object in images from different perspectives, making this technology a challenging scientific task since its inception. It is worth noting that with the development of deep learning technology, effective solutions have been provided for this task. Currently, most cross-view image matching and localization algorithms based on deep learning choose to transform this problem into a metric learning task. Specifically, this involves building a feature extraction network to extract the depth features of the images, and then training the network to bring image pairs with high matching scores closer together and image pairs with low matching scores further apart. Therefore, extracting robust global feature descriptors for images has become the key to achieving this task.
[0003] Early research found that algorithm networks based solely on image content (image appearance or semantics) without considering the geometric relationships between ground and aerial images are often difficult to train and perform poorly. To reduce feature gaps caused by cross-viewpoints, the geometric correspondence between ground and aerial images is utilized, namely: (1) the horizontal lines in ground panoramic images have an approximately constant depth, thus corresponding to concentric circles in aerial remote sensing images; (2) the vertical lines in ground panoramic images have a depth that increases with the y-coordinate, thus corresponding to radial lines in aerial remote sensing images. Based on this geometric correspondence, polar coordinate transformation is applied to aerial remote sensing images, so that the transformed aerial remote sensing images have a similar geometric layout to the corresponding ground panoramic images, thereby achieving approximate image domain alignment between image pairs. However, since polar coordinate transformation relies entirely on prior knowledge of the corresponding geometric structures of the two views without considering the image scene content, it can lead to significant geometric deformation and severe distortion of image content. To address the above problems, a common solution is to add an attention mechanism to the algorithm network to improve the ability to extract key image features. However, because these attention mechanisms generate local feature attention through ordinary convolution with limited receptive fields, without exploring the positional layout between various feature objects from a global perspective, it is difficult to utilize rich structural knowledge in a global scope. This limits the improvement of the algorithm's performance to a certain extent, thus affecting the matching and localization effect of aerial remote sensing images. Summary of the Invention
[0004] To this end, the present invention provides a cross-view image matching and localization method and system based on feature relationship guidance. It guides cross-view image matching and localization based on global structural relationship, improves the matching and localization effect between ground panoramic images and aerial remote sensing images, and can cope with complex image scenes and changing viewpoints.
[0005] According to the design scheme provided by the present invention, on the one hand, a cross-view image matching and localization method based on feature relationship guidance is provided, comprising:
[0006] Preprocess the target aerial remote sensing image data based on the geometric correspondence between image pairs in the ground-air imagery to transform the target aerial remote sensing image into a ground view that matches the query ground panoramic image.
[0007] A cross-view image matching model based on Siamese neural network is constructed. The model is trained using a preset loss function and sample data. In the cross-view image matching model, deformable convolution is used to extract multi-scale contextual information of the input image. At the same time, global relation awareness is used to mine the relationship between different feature nodes. Based on the multi-scale contextual information and the relationship between different feature nodes, the feature positions are reweighted to obtain feature descriptors jointly represented by contextual information and global relations. Similarity matching between input images is completed based on feature descriptors.
[0008] For the preprocessed reference aerial remote sensing image and the query ground panoramic image, image matching is performed based on the trained cross-view image matching model to achieve the localization task of the query ground panoramic image.
[0009] As a cross-view image matching and localization method based on feature relationships, the present invention further preprocesses the reference aerial remote sensing image data according to the geometric correspondence between image pairs in ground-air imagery, including:
[0010] First, set the origin of the polar coordinates to the center of the aerial remote sensing image corresponding to the geographic label, and select the 0° direction as the north direction corresponding to the positive y-axis on the ground image aligned with the geographic coordinates.
[0011] Next, the size of the image after polar coordinate transformation is set to be the same as that of the ground panoramic image, and the angle corresponding to each column of the aerial remote sensing image in the polar coordinate transformation is set to be the same as that of the ground panoramic image.
[0012] Then, sampling is performed along the radial lines in the aerial remote sensing image using a uniform sampling strategy, so that the innermost and outermost circles of the aerial remote sensing image are mapped to the bottom and top lines of the transformed image, respectively.
[0013] As a feature-relationship-guided cross-view image matching and localization method of the present invention, the constructed cross-view image matching model further includes:
[0014] The ResNet50 network is used to extract feature maps from input image data; the attention generation mechanism is used to weight feature locations by combining feature context information and global relationships; and the feature aggregation strategy is used to aggregate global image feature descriptors.
[0015] As a cross-view image matching and localization method based on feature relationship guidance in this invention, the attention generation mechanism further employs two branches to complete feature position weighting. Branch one extracts image features through deformable convolution with convolution kernels of different sizes and enhances the contextual information in image feature extraction by changing different receptive fields. Branch two uses position encoding to embed position layout information into image features and mines the relative relationships between feature nodes after position encoding through relationship affinity matrix.
[0016] As a cross-view image matching and localization method based on feature relationships in this invention, further, in branch one, the predicted offset is used to transform the regular convolution into an irregular convolution in the deformable convolution, wherein the calculation process of the predicted offset includes:
[0017] First, the relative offset of each pixel in the input feature map is learned using different convolutional kernels. Then, the absolute offset of the pixel index in the input feature map is obtained by adding the relative offset of each pixel to the pixel index value of the original image. Then, based on the absolute offset, the offset index pixel value is obtained by bilinear interpolation. A new feature map is obtained based on the offset index pixel value.
[0018] As a cross-view image matching and localization method based on feature relationship guidance in this invention, in branch two, the relationship affinity matrix is used to represent the pairwise relationship between all feature nodes in the input feature map. Attention relationship feature extraction and channel number change operation are performed on each feature node according to the relationship affinity matrix to generate a feature map of the same size. The generated feature map is then stitched along the feature channel to obtain the relationship feature map of global relationship mining. The attention relationship feature is obtained by stacking the pairwise relationship between the feature node and all feature nodes.
[0019] As a cross-view image matching and localization method based on feature relationship guidance in this invention, the global descriptor feature aggregation strategy further utilizes a feature mixer with the same structure and composed of multilayer perceptrons to iteratively incorporate global relationships into each feature map, so as to output a global feature descriptor through aggregation. The iterative incorporation of global relationships into each feature map includes: firstly, flattening the input feature map and using the first feature mixer to generate an output of the same shape, then sending the output to the second feature mixer to generate a corresponding output, and so on, until a preset number of connection blocks are output, and finally obtaining the output dimension to be the same as the input feature map dimension.
[0020] As a cross-view image matching and localization method based on feature relationship guidance in this invention, the preset loss function adopts weighted soft-margin triplet loss as the target loss function, and the distance metric between feature descriptors is learned based on the target loss function.
[0021] Furthermore, the present invention also provides a cross-view image matching and localization system guided by feature relationships, comprising: a data processing module, a model building module, and a data matching and localization module, wherein,
[0022] The data processing module is used to preprocess the reference aerial remote sensing image data according to the geometric correspondence between image pairs in the ground-air image, so that the reference aerial remote sensing image data is converted into the same ground view as the query ground panoramic image.
[0023] The model building module is used to construct a cross-view image matching model based on Siamese neural network. The cross-view image matching and localization model is pre-trained according to a preset loss function and sample data. In the cross-view image matching model, deformable convolution is used to extract multi-scale contextual information of the input image. At the same time, global relation awareness is used to mine the relationship between different feature nodes. Based on the multi-scale contextual information and the relationship between different feature nodes, the feature positions are re-weighted to obtain feature descriptors jointly represented by contextual information and global relations. Similarity matching between input images is completed based on feature descriptors.
[0024] The data matching and localization module is used to perform image matching based on a pre-trained cross-view image matching model on pre-processed reference aerial remote sensing images and ground panoramic images, so as to realize the localization task of querying ground panoramic images.
[0025] The beneficial effects of this invention are:
[0026] This invention achieves effective feature aggregation by fully learning the relationships between image features and using these relationships to guide attention generation, generating more discriminative image descriptors and improving the performance of cross-view image matching and localization. Specifically, deformable convolution is introduced to address image geometric distortions caused by the imaging principles of ground panoramic images and polar coordinate transformations in aerial images. Multiple deformable convolutions with different receptive fields are used to extract rich image details and multi-scale contextual information, enhancing the understanding of image content while improving the robustness and adaptability of features, enabling them to handle complex image scenes and changing viewpoints. For global information mining, an affinity matrix is established to extract connections between feature nodes, thereby modeling global relationships. Finally, the relationships extracted from the two branches are combined to guide reweighting at different locations, applying different levels of attention, and using a feature aggregation strategy to generate global image feature descriptors. This makes the image descriptors more discriminative, improving the matching and localization accuracy of image data, and facilitating applications in autonomous driving and robot navigation. Attached image description:
[0027] Figure 1This is a schematic diagram of a cross-view image matching process guided by feature relationships in the embodiment;
[0028] Figure 2 This is a schematic diagram of the overall architecture of the algorithm using a twin neural network in the embodiment;
[0029] Figure 3 This is a schematic diagram of a ground-to-air image pair with geometric distortion in the embodiment;
[0030] Figure 4 This is a schematic diagram of the MC_GRAT principle structure in the embodiment;
[0031] Figure 5 This is a schematic diagram of the deformable convolution principle in the embodiment;
[0032] Figure 6 This is a schematic diagram of the MixVPR principle structure in the embodiment. Detailed implementation method:
[0033] To make the objectives, technical solutions, and advantages of this invention clearer and more understandable, the invention will be further described in detail below with reference to the accompanying drawings and technical solutions.
[0034] Cross-view image matching and localization aims to determine the location of a given ground image by matching it with a set of geographically labeled aerial remote sensing images. It has significant application value in fields such as remote sensing information utilization and augmented reality. Addressing the problem that most current cross-view image matching and localization algorithms focus primarily on image content while neglecting the relationships between feature nodes, leading to insufficient effective information mining, this invention provides a cross-view image matching and localization method guided by feature relationships. (See [link to relevant documentation]). Figure 1 As shown, it contains the following content:
[0035] S101. Based on the geometric correspondence between image pairs in the ground-to-air imagery, preprocess the reference aerial remote sensing image data to convert it into the same ground perspective as the query ground panoramic image.
[0036] S102. Construct a cross-view image matching model based on Siamese neural network. Train the cross-view image matching model according to a preset loss function and sample data. In the cross-view image matching model, deformable convolution is used to extract multi-scale contextual information of the input image. At the same time, global relation awareness is used to mine the relationship between different feature nodes. Based on the multi-scale contextual information and the relationship between different feature nodes, the feature positions are reweighted to obtain the feature descriptor jointly represented by the contextual information and the global relationship. The similarity matching between input images is completed based on the feature descriptor.
[0037] S103. For the preprocessed reference aerial remote sensing image and the query ground panoramic image, image matching is performed based on the trained cross-view image matching model to achieve the localization task of the query ground panoramic image.
[0038] In cross-view image matching and localization, effective global structural knowledge is a valuable supplement to the image scene content. For example, during cross-view image matching and localization by the human eye, in addition to comparing features at the target location, the positional layout and spatial relationships between various features are usually compared repeatedly. Therefore, this embodiment focuses on extracting the correlations beyond the feature content itself and cleverly utilizes these corresponding positional feature geometric relationships to guide the completion of cross-view image matching and localization. For the algorithm implementation, see [link to implementation details]. Figure 2 As shown, a Siamese neural network is used as the overall architecture of the algorithm.
[0039] To reduce the image domain gap between ground and aerial imagery, polar coordinate transformation can be used to preprocess aerial remote sensing images based on the geometric correspondence between image pairs. The specific preprocessing procedure can be designed to include the following:
[0040] First, set the origin of the polar coordinates to the center of the aerial remote sensing image corresponding to the geographic label, and select the 0° direction as the north direction corresponding to the positive y-axis on the ground image aligned with the geographic coordinates.
[0041] Next, the size of the image after polar coordinate transformation is set to be the same as that of the ground panoramic image, and the angle corresponding to each column of the aerial remote sensing image in the polar coordinate transformation is set to be the same as that of the ground panoramic image.
[0042] Then, sampling is performed along the radial lines in the aerial remote sensing image using a uniform sampling strategy, so that the innermost and outermost circles of the aerial remote sensing image are mapped to the bottom and top lines of the transformed image, respectively.
[0043] Original aerial remote sensing image point coordinates Transformation point of the target polar coordinates The polar coordinate transformation formula between them can be expressed as:
[0044]
[0045]
[0046] Aerial remote sensing images transformed by polar coordinates produce ground-view images that largely respect the scene content, meaning the corresponding ground-to-air image pairs have roughly the same arrangement of scene objects. However, this alone is insufficient to completely reduce the domain gap between the two views, mainly because the overlap between the image pairs is incomplete; many features, such as the sky present in the ground view, cannot be recovered in this way. Furthermore, exploring the principles of polar coordinate transformation and the imaging principles of ground panoramic images reveals that both types of images undergo significant geometric distortion, manifesting as content distortion in the image appearance. Figure 3 As shown, (a) is a real panoramic image of the ground, and (b) is an aerial remote sensing image after polar coordinate transformation. This ubiquitous geometric distortion can affect the generation of image feature descriptors to some extent, thus affecting the accuracy of the algorithm. Therefore, finding a suitable method to weaken this geometric distortion is a new attempt in the research of cross-view image matching and localization algorithms.
[0047] Specifically, the constructed cross-view image matching model may include:
[0048] The ResNet50 network is used to extract feature maps from input image data; the attention generation mechanism is used to weight feature locations by combining feature context information and global relations; and the feature aggregation mechanism uses a feature aggregation strategy to generate global image feature descriptors.
[0049] See Figure 2 As shown, the model input in this embodiment is a ground panoramic image and an aerial remote sensing image after polar coordinate transformation. The backbone network for feature extraction can use the ResNet50 operator with the fourth residual block, pooling layer, and fully connected layer removed. After the backbone network, a spatial relationship-guided attention generation module—MC_GRAT (Multiscale Context and Global Relationships Attention Module)—can be added, and a novel feature aggregation module, MixVPR model, can be introduced to aggregate global features. Finally, the model is trained using a weighted soft-margin triplet loss function so that the network can learn the relationship between image features while focusing on image content, and use this relationship to guide attention generation, achieving effective feature aggregation and generating more discriminative image descriptors, thereby further improving the performance of cross-view image matching and localization algorithms.
[0050] The attention generation mechanism can use two branches to complete feature location weighting. Branch one extracts image features through deformable convolution with different sized kernels and enhances the contextual information in image feature extraction by changing different receptive fields. Branch two uses position encoding to embed position layout information into image features and mines the relative relationships between feature nodes after position encoding through relation affinity matrix.
[0051] See Figure 4 As shown, multi-scale contextual information and global relationships jointly guide the attention generation module.
[0052] —MC_GRAT (Multiscale Context and Global Relationships AttentionModule) can be divided into two branches. Branch one processes the feature image using two deformable convolutions with kernels of different sizes. This reduces the impact of geometric distortion and enhances the extraction of contextual information by varying the receptive field. Branch two embeds positional layout information into the image features using positional encoding and introduces a relation affinity matrix to mine the relative relationships between the positionally encoded feature nodes. Finally, by combining the feature relationship information extracted from the two branches, modeling guides the assignment of weights to features at different positions, achieving a joint representation of the image.
[0053] Specifically, in branch one, the predicted offset is used to transform the regular convolution into an irregular convolution in deformable convolution. The calculation process of the predicted offset includes:
[0054] First, the relative offset of each pixel in the input feature map is learned using different convolutional kernels. Then, the absolute offset of the pixel index in the input feature map is obtained by adding the relative offset of each pixel to the pixel index value of the original image. Then, based on the absolute offset, the offset index pixel value is obtained by bilinear interpolation. A new feature map is obtained based on the offset index pixel value.
[0055] Specifically, in branch two, the relationship affinity matrix is used to represent the pairwise relationships between all feature nodes in the input feature map. Attention relationship feature extraction and channel number change operations are performed on each feature node according to the relationship affinity matrix to generate feature maps of the same size. The generated feature maps are then stitched together along the feature channels to obtain the relationship feature map for global relationship mining. The attention relationship features are obtained by stacking the pairwise relationships between the feature nodes and all feature nodes.
[0056] In deep learning-based image processing tasks, the contextual information of an image refers to the influence of surrounding pixels or regions on the current pixel. Contextual information provides the relationship between the feature of interest and its surrounding features, including layout information between features, thus providing additional information for cross-view image matching and localization tasks. Therefore, a contextual information extraction branch is added to the relationship-guided attention generation module in this embodiment.
[0057] Influenced by the spatial attention operator of CBAM, operators can be extracted using contextual information from the same architecture, such as... Figure 4 As shown. However, unlike the CBAM operator, in practice, deformable convolutions of size 3×3 and 5×5 can be used instead of the standard 7×7 convolution to learn the spatial attention mask. This not only addresses the scale and deformation of features, but also achieves the purpose of extracting image context information through changes in different receptive fields.
[0058] The use of deformable convolution is primarily to address the adverse effects of geometric distortions in ground-to-air images. Conventional convolution methods typically encode feature information using fixed geometric structures to capture the receptive field. However, because the shapes of objects are varied and irregular, this encoding method struggles to capture a suitable receptive field, resulting in limited network expressive power. Deformable convolution, on the other hand, uses deformable kernels to allow sampling points to adaptively adjust according to the semantic regions of the object.
[0059] The traditional convolutional structure can be defined by formula (3). Taking a 3×3 convolution as an example, for each output c, 9 positions are sampled from x, and these 9 positions spread outwards from the center position x(p0). Therefore, the output of the traditional convolution is:
[0060]
[0061] Deformable convolution adds an offset to the traditional convolution operation, transforming a regular convolution into an irregular one. The output of deformable convolution is:
[0062]
[0063] Here, Δp n The predicted offset is calculated as follows: Figure 5As shown in the diagram, for an input feature map, assuming the original convolution operation is 3×3, to learn the offset, we first use another 3×3 convolution to learn the offset of each pixel. The offset feature map in the diagram has 2N channels, indicating that each pixel has an offset in both the x and y directions. Then, the calculated relative offset is added to the pixel index value of the original image to obtain the absolute offset of the pixel index of the input feature map. Next, bilinear interpolation is used to obtain the offset index pixel value, thus obtaining a new feature map. Then, regular convolution is performed to achieve deformable convolution.
[0064] For the extraction of contextual information, given the input feature map F∈R H×W×C Then, the relation embedding graph U' after the context information extraction and branching process can be represented as:
[0065]
[0066]
[0067] in, and These represent the max pooling and average pooling operators along the feature channels, respectively. n×n Represents an n×n convolution. This represents an n×n deformable convolution.
[0068] In addition to utilizing multi-scale deformable convolution to extract image context information, this embodiment also employs a global relationship mining module. Based on a self-attention mechanism, it captures the spatial dependencies between any two locations in the feature map and introduces a relationship affinity matrix based on the same principle to mine the relationships between different feature nodes. The relationship affinity matrix, also known as an association matrix, is a statistical technique used to organize the similarity between a set of data points. In the global relationship mining module, the relationship affinity matrix provides rich global relevant information.
[0069] like Figure 4 As shown, given the input image feature map F∈R C×H×W The C-dimensional feature vector at each spatial location is used as a feature node. That is, for a feature map with length H and width W, the spatial relationship mining module learns the relationships between N = H × W feature nodes. The spatial locations of the feature map are raster-scanned, and the labels between feature nodes are assigned as 1,...,N. Each feature node is then represented as... Where i = 1, ..., N.
[0070] The relationship r between each pair of feature nodes i, j i,j The relational affinity defined as that of the embedding space is expressed by the formula:
[0071] r i,j =f s (x i ,x j )=θ s (x i ) T φ s (x j (7)
[0072] Where θ s and φ s The embedding function, which is implemented by 1×1 spatial convolution followed by batch normalization (BN) and ReLU activation, is expressed by the following formula:
[0073] θ s (x i ) = ReLU(W θ x i (8)
[0074] φ s (x i ) = ReLU(W φ x i (9)
[0075] Using (r i,j ,r j,i ) represents feature node x i and feature node x j The bidirectional relationship between them is represented by the affinity matrix. Represents the pairwise relationships between all feature nodes, such as Figure 4 As shown. For the i-th feature node, its pairwise relationships with all feature nodes are used as the relationship vector to be mined, and these pairwise relationships are stacked to obtain the attention relationship features at that spatial location, denoted as... The specific operation involves using the generated affinity matrix R... s Extract R for each feature node i s (i,:) and change the number of channels to generate a feature map U with the same size as the input feature map", then extract R again. s (:,i) The same operation generates feature map U”'. Then, feature maps U” and U”' are concatenated along the feature channels to obtain S, which is the relation feature map obtained by global relation mining from the input feature map.
[0076] S=(U”,U”') (10)
[0077] To further utilize the information extracted from the two relation extraction branches to guide attention generation, in this embodiment, the extracted contextual information and global structural information are concatenated through an embedding function to obtain a spatial relation-aware feature map M(F):
[0078] M(F) = [f 1×1 (U',S)] (11)
[0079] Among them, f 1×1 This indicates a 1×1 convolution operation, the purpose of which is to reduce the feature map channel dimension to 1. Then, through a modeling function, the spatial attention of each feature node is generated using the relational feature map M(F), and combined with the feature node itself to complete the joint representation of feature relationships. The formula is shown below:
[0080] A i =Sigmoid(W2 ReLU(W1M(F))) (12)
[0081]
[0082] W1 and W2 represent the attention generation guidance functions, implemented using 1×1 convolutions and batch normalization (BN). Sigmoid represents the activation function, A... i Attention graph of feature nodes generated to guide the relationship. This indicates element-wise multiplication.
[0083] To address significant differences in perspective, global feature descriptors are frequently employed in cross-view image matching and localization tasks. Therefore, a suitable feature aggregation strategy is crucial. The attention generation mechanism in this embodiment utilizes a feature mixer with identical structure, composed of multilayer perceptrons, to iteratively incorporate global relationships into each feature map. This incorporation outputs a global feature descriptor. The process of iteratively incorporating global relationships into each feature map includes: first, flattening the input feature map and generating an output of the same shape using a first feature mixer; then, feeding this output into a second feature mixer to generate a corresponding output; and so on, until a preset number of connection blocks are output, ultimately resulting in an output with the same dimension as the input feature map.
[0084] Specifically, MixVPR, currently the most advanced feature aggregation strategy in geolocation tasks, can be adopted. MixVPR takes feature maps extracted by a pre-trained backbone network as input, and then uses multiple feature mixers with identical structures, all composed of multilayer perceptrons (MLPs), to iteratively incorporate global relationships into each individual feature map. This eliminates the need for local or pyramid aggregation in NetVLAD, significantly improving the effectiveness and trainability of the global descriptor. Its principle structure diagram is shown below. Figure 6 As shown.
[0085] For a given input F∈R c×n First, the shape is flattened, and then a feature mixer is used to produce an output Z∈R with the same shape. c×n Then it is fed into the second feature mixer block, and so on, until L consecutive blocks are achieved, as shown in the following formula:
[0086] Z=FM L (FM L-1 (...FM1(F))) (14)
[0087] The dimension of Z is the same as that of the extracted feature map F. To further reduce its dimension, two fully connected layers are added after the feature mixer to reduce its depth (channels) and row dimensions, respectively. This operation can be viewed as a weighted pooling operation to control the size of the final global descriptor. First, depth projection is used to project Z from R... c×n Mapping to R d×n As shown in the following formula:
[0088] Z' = W d (Transpose(Z)) (15)
[0089] Among them W d These are the weights of the fully connected layer. Next, a row-wise projection is applied to transfer the output Z' from R... d×n Mapping to R d ×r As shown in equation (16):
[0090] O = W r (Transpose(Z')) (16)
[0091] Among them W r These are the weights of the fully connected layer, and the final output O has a dimension of d×r. Finally, flattening and L2 normalization are performed to output the global feature descriptor.
[0092] During model training, the weighted soft-margin triplet loss is generally considered the most suitable objective function for geolocation tasks based on deep metric learning. Therefore, the preset loss function in this embodiment uses the weighted soft-margin triplet loss as the objective loss function. The main purpose of the triplet loss is to learn the distance metric between feature descriptors, making the matching image closer to the query image, while the non-matching image is further away from the query image. The specific formula can be expressed as follows:
[0093]
[0094] Where d pos and d negThis represents the Euclidean distance between matched and unmatched image pairs, while the parameter γ is used to adjust the loss gradient, thereby controlling the convergence speed of the function.
[0095] Based on the ground-to-air imagery data to be matched, a trained cross-view image matching model can be used to achieve matching and localization of query ground panoramic images.
[0096] and utilize Figure 2 The algorithm framework shown was validated on the publicly available and popular cross-perspective dataset CVUSA. Its top 1, top 5, and top 10 metrics reached 92.08%, 97.70%, and 98.66%, respectively. Compared with similar algorithms, it achieved better performance and is easy to deploy in real-world scenarios.
[0097] Furthermore, based on the above method, this embodiment of the invention also provides a cross-view image matching system guided by feature relationships, comprising: a data processing module, a model building module, and a data matching module, wherein,
[0098] The data processing module is used to preprocess the reference aerial remote sensing image data according to the geometric correspondence between image pairs in the ground-air image, so that the reference aerial remote sensing image data is converted into the same ground view as the query ground panoramic image;
[0099] The model building module is used to construct a cross-view image matching model of Siamese neural network. The cross-view image matching model is trained based on a preset loss function and sample data. In the cross-view image matching model, deformable convolution is used to extract multi-scale contextual information of the input image. At the same time, global relation awareness is used to mine the relationship between different feature nodes. Based on the multi-scale contextual information and the relationship between different feature nodes, the feature positions are reweighted to obtain feature descriptors jointly represented by contextual information and global relations. Similarity matching between input images is completed based on feature descriptors.
[0100] The data matching module is used to perform image matching based on a trained cross-view image matching model on preprocessed reference aerial remote sensing images and ground panoramic images, so as to realize the localization task of querying ground panoramic images.
[0101] Unless otherwise specifically stated, the relative steps, numerical expressions, and values of the components and steps described in these embodiments do not limit the scope of the invention.
[0102] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.
[0103] The units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations are not considered to be beyond the scope of this invention.
[0104] Those skilled in the art will understand that all or part of the steps in the above methods can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk. Optionally, all or part of the steps in the above embodiments can also be implemented using one or more integrated circuits. Accordingly, each module / unit in the above embodiments can be implemented in hardware or as a software functional module. This invention is not limited to any particular combination of hardware and software.
[0105] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A feature-relationship-guided cross-view image matching and localization method for cross-view localization of ground panoramic images, characterized in that, Include: Preprocessing the reference aerial remote sensing image data based on the geometric correspondence between image pairs in the ground-to-air imagery transforms the reference aerial remote sensing image data into a ground view that matches the query ground panoramic imagery. A cross-view image matching model based on Siamese neural network is constructed. The model is trained using sample data based on a preset loss function. In the cross-view image matching model, deformable convolution is used to extract multi-scale contextual information of the input image. At the same time, global relation awareness is used to mine the relationship between different feature nodes. Based on the multi-scale contextual information and the relationship between different feature nodes, the feature positions are reweighted to obtain feature descriptors jointly represented by contextual information and global relations. Similarity matching between input images is completed based on feature descriptors. For preprocessed reference aerial remote sensing images and ground panoramic images, image matching is performed based on a pre-trained cross-view image matching model to achieve the localization task of querying ground panoramic images.
2. The cross-view image matching and localization method based on feature relationship guidance according to claim 1, characterized in that, Preprocessing of reference aerial remote sensing image data based on the geometric correspondence between image pairs in ground-to-air imagery includes: First, set the origin of the polar coordinates to the center of the aerial remote sensing image corresponding to the geographic label, and select the 0° direction as the north direction corresponding to the positive y-axis on the ground image aligned with the geographic coordinates. Next, the size of the image after polar coordinate transformation is set to be the same as that of the ground panoramic image, and the angle corresponding to each column of the aerial remote sensing image in the polar coordinate transformation is set to be the same as that of the ground panoramic image. Then, sampling is performed along the radial lines in the aerial remote sensing image using a uniform sampling strategy, so that the innermost and outermost circles of the aerial remote sensing image are mapped to the bottom and top lines of the transformed image, respectively.
3. The cross-view image matching and localization method based on feature relationship guidance according to claim 1, characterized in that, The constructed cross-view image matching model includes: The ResNet50 network is used to extract feature maps from input image data; an attention generation mechanism is used to jointly guide feature location weighting with feature context information and global relationships; and a feature aggregation strategy is used to aggregate global image feature descriptors.
4. The cross-view image matching and localization method based on feature relationship guidance according to claim 3, characterized in that, The attention generation mechanism employs two branches to assign weights to feature locations. Branch one extracts image features through deformable convolutions with kernels of different sizes and enhances the contextual information in image feature extraction by varying the receptive field. Branch two embeds positional layout information into image features using positional encoding and mines the relative relationships between feature nodes after positional encoding using a relation affinity matrix.
5. The cross-view image matching and localization method based on feature relationship guidance according to claim 4, characterized in that, In branch one, the predicted offset is used to transform regular convolutions into irregular convolutions within deformable convolutions. The calculation process of the predicted offset includes: First, the relative offset of each pixel in the input feature map is learned using different convolutional kernels. Then, the absolute offset of the pixel index in the input feature map is obtained by adding the relative offset of each pixel to the pixel index value of the original image. Then, based on the absolute offset, the offset index pixel value is obtained by bilinear interpolation. A new feature map is obtained based on the offset index pixel value.
6. The cross-view image matching and localization method based on feature relationship guidance according to claim 4, characterized in that, In branch two, the affinity matrix is used to represent the pairwise relationships between all feature nodes in the input feature map. Based on the affinity matrix, attention relationship feature extraction and channel number modification are performed on each feature node to generate feature maps of the same size. The generated feature maps are then stitched together along the feature channels to obtain the global relationship mining relationship feature map. The attention relationship features are obtained by stacking the pairwise relationships between the feature nodes and all feature nodes.
7. The cross-view image matching and localization method based on feature relationship guidance according to claim 3, characterized in that, In the feature aggregation strategy of global image feature descriptors, a feature mixer with the same structure and composed of multilayer perceptrons is used to iteratively incorporate global relations into each feature map so as to output a global feature descriptor through aggregation. The iterative incorporation of global relations into each feature map includes: firstly, flattening the input feature map and using the first feature mixer to generate an output with the same shape; then, feeding the output into the second feature mixer to generate a corresponding output, and so on, until a preset number of connection blocks are output, and finally obtaining the output dimension to be the same as the input feature map dimension.
8. The cross-view image matching and localization method based on feature relationship guidance according to claim 1, characterized in that, The preset loss function uses weighted soft-margin triplet loss as the target loss function, and the distance metric between feature descriptors is learned based on the target loss function.
9. A cross-view image matching and localization system guided by feature relationships, characterized in that, It includes: a data processing module, a model building module, and a data matching module, among which, The data processing module is used to preprocess the target aerial remote sensing image data according to the geometric correspondence between image pairs in the ground-air image, so that the reference aerial remote sensing image data is transformed into a ground view that matches the query ground panoramic image. The model building module is used to construct a cross-view image matching model based on Siamese neural network. The cross-view image matching model is trained based on a preset loss function and sample data. In the cross-view image matching model, deformable convolution is used to extract multi-scale contextual information of the input image. At the same time, global relation awareness is used to mine the relationship between different feature nodes. Based on the multi-scale contextual information and the relationship between different feature nodes, the feature positions are reweighted to obtain feature descriptors jointly represented by contextual information and global relations. Similarity matching between input images is completed based on feature descriptors. The data matching module is used to perform image matching based on a pre-trained cross-view image matching model on pre-processed reference aerial remote sensing images and ground panoramic images, so as to realize the localization task of querying ground panoramic images.
10. An electronic device, characterized in that, include: At least one processor, and a memory coupled to said at least one processor; The memory stores a computer program that can be executed by the at least one processor to implement the method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Cross-view-angle image real-time matching geographic positioning method and system based on deep learning
CN114241464A
Four-branch cross-view-angle image geographic positioning system and method of collaborative perspective view angle and polar coordinate view angle
CN116310813A
