Four-branch cross-view image geographic positioning system and method based on coordinated perspective and polar coordinate perspective
By coordinating the perspective perspective and the polar coordinate perspective, a four-branch cross-view image geolocation system, combined with the attention mechanism and auxiliary loss function, solves the problem of existing methods ignoring the spatial geometric correspondence, and achieves more accurate cross-view image geolocation , improving positioning accuracy and robustness.
Patent Information
- Application Number
- CN202310204153.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-06
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2043-03-06
AI Technical Summary
Existing cross-view image geolocation methods ignore the spatial geometric correspondence and scene location relationships between images, resulting in inaccurate positioning results.
A four-branch cross-view image geolocation system using collaborative perspective perspective and polar coordinate perspective, extracts the location information and space of the image through the image transformation module, feature extraction module, coordinate attention module and spatial scale attention module, combined with the auxiliary loss function layout information, and calculate feature similarity to improve matching accuracy.
It significantly improves the accuracy and robustness of geographical positioning, enables more accurate positioning of targets of interest, and enhances the accuracy and application value of the algorithm.
Smart Images

Figure CN116310813B
Abstract
Description
Technical Field
[0001] The present invention relates to a geolocation method for ground-satellite cross-view images, in particular to a four-branch cross-view image geolocation system and method that cooperates with perspective view and polar coordinate view. Background Art
[0002] In recent years, the popularization and application of geolocation technology has brought great convenience to people's daily life. At present, the popular geolocation technologies include GPS positioning, Beidou positioning, base station positioning, WiFi positioning, Bluetooth positioning, etc. GPS positioning has good signals and high positioning accuracy, but the disadvantage is that the signal cannot penetrate metal and reinforced concrete mixture, so it cannot be used indoors. Beidou positioning confirms the current position based on satellites, but it has a certain gap with GPS positioning in positioning accuracy and application scale, and is now mainly used in the military. Base station positioning is based on base stations. Regardless of the number of base stations, the error of base station positioning is about tens of meters or even hundreds of meters. WiFi positioning and Bluetooth positioning are generally used indoors. Although the positioning accuracy is high, the disadvantage is that the client must be able to access the Internet and there are many restrictions. In summary, the existing geolocation technologies have the disadvantages of weak signals in remote areas and crowded urban areas, large positioning errors, and limited application areas. Therefore, there is an urgent need for an auxiliary geolocation technology that can overcome the above disadvantages. Image geolocation is a good auxiliary solution. As a research direction in the field of computer vision, image geolocation has received widespread attention. Image geolocation is a task to predict the location (latitude and longitude) of a query image by matching it with a large number of images in an image database tagged with geographic information. With the gradual development of remote sensing and drone technology, cross-view image geolocation technology has gradually become a research hotspot. It has a wide range of computer vision applications, such as precise positioning, autonomous driving, and robot navigation.
[0003] The paper "CVM-Net: Cross-View Matching Network for Image-Based Ground-to-Aerial Geo-Localization" proposes a cross-view image matching method based on NetVLAD. The algorithm first uses the VGG16 deep convolutional neural network to extract local features of image pairs, obtains local feature vectors of the same dimension through the fully connected layer, and then sends the local feature vectors to the NetVLAD layer, which aggregates the residuals of the local feature vectors to the center points of their respective clusters, and then generates global descriptors to overcome the appearance differences caused by perspective changes, and then extracts the perspective-invariant global feature descriptors of the image pairs. This method effectively overcomes the problem of huge differences in image appearance caused by perspective changes, extracts more discriminative image features, and thus improves the accuracy of image matching. However, this method treats the geolocation task as a pure image retrieval problem. When solving the cross-view image geolocation problem, it ignores important information such as the spatial geometric correspondence between images and the positional relationship of the scene, resulting in inaccurate positioning results. Summary of the invention
[0004] Technical issues to be solved
[0005] In order to overcome the problem that existing methods tend to ignore the spatial geometric correspondence between cross-view image pairs and fail to combine image global information with local information for positioning, resulting in inaccurate positioning results, the present invention provides a four-branch cross-view image geographic positioning method that coordinates perspective perspective and polar coordinate perspective.
[0006] Technical Solution
[0007] A four-branch cross-view image geolocation system that cooperates with perspective view and polar coordinate view, characterized by comprising an image transformation module, a feature extraction module, a coordinate attention module, and a spatial scale attention module;
[0008] The image transformation module applies perspective transformation to the ground panoramic image and polar coordinate transformation to the satellite image to obtain the ground panoramic image after perspective transformation. And the satellite image after polar coordinate transformation
[0009] The feature extraction module is to extract the ground panoramic image I g , satellite image after polar coordinate transformation Ground panoramic image after perspective transformation Satellite Image I s The high-dimensional abstract features of F g , F s ;
[0010] The coordinate attention module is to transform the feature F g , F s Perform spatial global average pooling along the X-coordinate direction and the Y-coordinate direction to generate two feature maps of size C×H×1 and C×1×W, where C represents the number of channels, and H and W represent the height and width of the image, respectively. Secondly, stack along the channel dimension and then perform 1×1 convolution, batch normalization, and Sigmoid activation function to generate a feature map of size C×1×(H+W). Then, perform 1×1 convolution and Sigmoid activation function along the X-coordinate direction and the Y-coordinate direction, respectively, to obtain the attention weights in the X-coordinate direction and the attention weights in the Y-coordinate direction, which are C×H×1 and C×1×W, respectively. Finally, the weight vector is combined with the input feature map F g , F s Multiply them separately to get the feature map F with position information g-ca , F s-ca ;
[0011] The spatial scale attention module is to transform the feature F g-ca , F s-ca After 1×1 convolution and maximum pooling along the channel dimension, the channel attention vector is obtained. Then, the obtained channel attention vector is stacked along the channel dimension after 3×3, 5×5, and 7×7 convolutions respectively to obtain a multi-scale feature map. The obtained multi-scale feature map is then used to learn the weights of objects at different scales through 1×1 convolution, and then normalized to between 0 and 1 through the Sigmoid function. Finally, the weight vector is multiplied by the input feature map to obtain the feature map F embedded with multi-scale spatial layout information. g-ca-ssa , F s-ca-ssa .
[0012] A four-branch cross-view image geolocation method that cooperates with perspective view and polar coordinate view, characterized by the following steps:
[0013] Step 1: Transform the images in the dataset
[0014] Apply perspective transformation to the ground panoramic image and polar coordinate transformation to the satellite image to obtain the ground panoramic image after perspective transformation. And the satellite image after polar coordinate transformation
[0015] Step 2: Build an image matching network
[0016] The entire network consists of four network branches with the same structure and non-shared weights. Each network branch contains a feature extraction module, a coordinate attention module, and a spatial scale attention module in sequence.
[0017] The specific method is as follows:
[0018] Step 2-1: Construct feature extraction layer
[0019] The feature extraction module is to extract the ground panoramic image I g , satellite image after polar coordinate transformation Ground panoramic image after perspective transformation Satellite Image I s The high-dimensional abstract features of F g , F s As output;
[0020] Step 2-2: Construct the coordinate attention module
[0021] The coordinate attention module is to transform the feature F g , F s Perform spatial global average pooling along the X-coordinate direction and the Y-coordinate direction to generate two feature maps of size C×H×1 and C×1×W, where C represents the number of channels, and H and W represent the height and width of the image, respectively. Secondly, stack along the channel dimension and then perform 1×1 convolution, batch normalization, and Sigmoid activation function to generate a feature map of size C×1×(H+W). Then, perform 1×1 convolution and Sigmoid activation function along the X-coordinate direction and the Y-coordinate direction, respectively, to obtain the attention weights in the X-coordinate direction and the attention weights in the Y-coordinate direction, which are C×H×1 and C×1×W, respectively. Finally, the weight vector is combined with the input feature map F g , F s Multiply them separately to get the feature map F with position information g-ca , F s-ca As output;
[0022] Step 2-3: Constructing the spatial scale attention module
[0023] The spatial scale attention module is to transform the feature F g-ca , F s-caAfter 1×1 convolution and maximum pooling along the channel dimension, the channel attention vector is obtained. Then, the obtained channel attention vector is stacked along the channel dimension after 3×3, 5×5, and 7×7 convolutions respectively to obtain a multi-scale feature map. The obtained multi-scale feature map is then used to learn the weights of objects at different scales through 1×1 convolution, and then normalized to between 0 and 1 through the Sigmoid function. Finally, the weight vector is multiplied by the input feature map to obtain the feature map F embedded with multi-scale spatial layout information. g-ca-ssa , F s-ca-ssa As output;
[0024] Step 2-4: Calculate feature similarity
[0025] Use Euclidean distance to calculate the similarity between features and use F g-ca-ssa , F s-ca-ssa Construct a soft margin triplet objective function to shorten the distance between matching image pairs and make the distance between unmatched image pairs as far as possible;
[0026]
[0027] Here, d p and d n They represent the Euclidean distances from the anchor point to the positive sample and the negative sample respectively. α is a hyperparameter that accelerates the convergence of the network during the training phase.
[0028] At the same time, in order to give full play to the role of image features of different branches, the present invention proposes an auxiliary loss function to train the network; specifically, the output feature F of the ground panoramic image branch is g-ca-ssa Output features of satellite image branch with polar coordinate transformation The weighted soft margin triplet loss function L1 is sent for training; the output features of the ground panoramic image branch after perspective transformation are The output feature F of the satellite image branch s-ca-ssa Another weighted soft margin triplet loss function L2 is sent for training; the ground panoramic image feature F g-ca-ssa Perspective Transformation Ground Image Features Stack the channel dimension to get feature F G , transform the polar coordinates into satellite image features With satellite image features F s-ca-ssa Stack the channel dimension to get feature F S ; F G and F S Then send it to a new weighted soft interval triplet loss function L3 for training; at the same time, assign different weights to each loss function:
[0029] L=0.4·L1+0.1·L2+0.5·L3 (2)
[0030] Step 3: Train the constructed network
[0031] The training data is put into the network in batches to generate the top K satellite images most similar to each ground panoramic image. The loss is calculated using the predicted labels and the real matching labels. Specifically, the weighted soft margin triplet loss function and the auxiliary loss function are used. The Adam optimizer is used for optimization until the value of the objective function does not decrease. The training ends.
[0032] Step 4: Test image set
[0033] Input the test image into the image matching network trained in step 3, and use the Euclidean distance to calculate the similarity score between the ground panoramic image and the satellite image to obtain the top K satellite image query results that are most similar, and use the recall rate indicator Recall@K for evaluation;
[0034] Step 5: Locate the ground panorama image
[0035] The positioning task of the ground panoramic image is completed by querying the GPS longitude and latitude position information corresponding to the first K closest satellite images.
[0036] A further technical solution of the present invention: in step 2-1, the feature extraction module refers to the input image passing through convolution module 1, pooling layer 1, convolution module 2, pooling layer 2, convolution module 3, pooling layer 3, convolution module 4, pooling layer 4, convolution module 5, and pooling layer 5 respectively in sequence; wherein convolution module 1 is composed of 2 convolution layers, each convolution layer contains 64 3×3 convolution kernels, and the step size of the convolution is 1; pooling layer 1 is a maximum pooling operation with a step size of 2 and a convolution kernel size of 3×3; convolution module 2 is also composed of 2 convolution layers, each convolution layer contains 128 3×3 convolution kernels, and the step size of the convolution is 1; pooling layer 2 is a step size of 2 and a convolution kernel size of 3×3. The convolution module 3 is composed of 3 convolutional layers, each of which contains 256 3×3 convolution kernels, and the step size of the convolution is 1; the pooling layer 3 is a maximum pooling operation with a step size of 2 and a convolution kernel size of 3×3; the convolution module 4 is also composed of 3 convolutional layers, each of which contains 512 3×3 convolution kernels, and the step size of the convolution is 1; the pooling layer 4 is a maximum pooling operation with a step size of 2 and a convolution kernel size of 3×3; the convolution module 5 is composed of 3 convolutional layers containing 512 3×3 convolution kernels, and the step size of the convolution is 1; the pooling layer 5 is a maximum pooling operation with a step size of 2 and a convolution kernel size of 3×3.
[0037] A computer system, characterized in that it comprises: one or more processors, and a computer-readable storage medium for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned method.
[0038] A computer-readable storage medium, characterized in that it stores computer-executable instructions, which are used to implement the above method when executed.
[0039] Beneficial Effects
[0040] The ground panoramic image and the satellite image after polar coordinate transformation can significantly display the spatial global layout information of roads, buildings, trees, etc., and the ground panoramic image after perspective transformation and the original satellite image can significantly represent the local road detail information. The present invention pays attention to both the spatial global layout information and the local road detail information (i.e., the combined image global information and local information), and proposes a four-branch cross-view image geolocation network that cooperates with the perspective perspective and the polar coordinate perspective. Polar coordinate transformation is applied to satellite images, and perspective transformation is applied to ground panoramic images to reduce the domain difference between ground and satellite image pairs. At the same time, the coordinate attention mechanism and the spatial scale attention mechanism are applied, and the relationship between channels and position information are considered. While capturing cross-channel information, the direction perception and position-sensitive information are included, so that the network can more accurately locate the target of interest. In addition, the auxiliary loss function is applied to train and optimize the network, which prompts the network to learn the feature similarity between cross-view image pairs, further improve the geolocation accuracy, and improve the robustness and accuracy of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.
[0042] Figure 1 It is the overall network structure diagram of the present invention.
[0043] Figure 2 This is the structural diagram of convolution modules 1, 2, 3, 4, and 5.
[0044] Figure 3 is the ground image after inverse polar coordinate transformation
[0045] Figure 4 is the ground image after perspective transformation.
[0046] Figure 5 It is a ground image after the inverse polar coordinate transformation and perspective transformation are combined.
[0047] Figure 6 It is a satellite image after polar coordinate transformation.
[0048] Figure 7 It is the structure diagram of the coordinate attention module.
[0049] Figure 8 This is the structure diagram of the spatial scale attention module. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0051] Aiming at the problems of different perspectives, appearances, objects in various scales and different positions of ground panoramic images and satellite images, the present invention proposes a four-branch cross-perspective image geolocation network that cooperates with perspective and polar coordinate perspectives. The network consists of five parts: image transformation module, feature extraction module, coordinate attention module, spatial scale attention module, and auxiliary loss function.
[0052] The image transformation module applies perspective transformation to the ground panoramic image and polar coordinate transformation to the satellite image, thereby obtaining a ground panoramic image after perspective transformation. And the satellite image after polar coordinate transformation
[0053] The feature extraction module is to extract the ground panoramic image I g , satellite image after polar coordinate transformation Ground panoramic image after perspective transformation Satellite Image I s The high-dimensional abstract features of F g , F s .
[0054] The coordinate attention module is to transform the feature F g , F s Perform spatial global average pooling along the X-coordinate direction and the Y-coordinate direction to generate two feature maps of size C×H×1 and C×1×W, where C represents the number of channels, and H and W represent the height and width of the image, respectively. Secondly, stack along the channel dimension and then perform 1×1 convolution, batch normalization, and Sigmoid activation function to generate a feature map of size C×1×(H+W). Then, perform 1×1 convolution and Sigmoid activation function along the X-coordinate direction and the Y-coordinate direction respectively to obtain the attention weights in the X-coordinate direction and the attention weights in the Y-coordinate direction, which are C×H×1 and C×1×W, respectively. Finally, the weight vector is combined with the input feature map Fg , F s Multiply them separately to get the feature map F with position information g-ca , F s-ca .
[0055] The spatial scale attention module is to transform the feature F g-ca , F s-ca After 1×1 convolution and maximum pooling along the channel dimension, the channel attention vector is obtained. Then, the obtained channel attention vector is stacked along the channel dimension after 3×3, 5×5, and 7×7 convolutions (the step size of the convolution is 1) to obtain a multi-scale feature map. The obtained multi-scale feature map is then used to learn the weights of objects at different scales through 1×1 convolution, and then normalized to between 0 and 1 through the Sigmoid function. Finally, the weight vector is multiplied by the input feature map to obtain the feature map F embedded with multi-scale spatial layout information. g-ca-ssa , F s-ca-ssa .
[0056] The auxiliary loss function is to transform the feature F g-ca-ssa , F s-ca-ssa The features are input into three weighted soft margin triplet loss functions with different weights respectively to calculate the similarity of the features and obtain the positioning results.
[0057] This embodiment provides a four-branch cross-view image geolocation method that cooperates with perspective view and polar coordinate view.
[0058] The following steps are included:
[0059] Step 1: Transform the image
[0060] The present invention performs perspective transformation on ground panoramic images in the public large-scale cross-view image geolocation datasets CVUSA and CVACT, and performs polar coordinate transformation on satellite images.
[0061] Step 1-1: Apply perspective transformation to the ground panoramic image.
[0062] In order to reduce the domain difference between cross-view image pairs, a perspective transformation is applied to the ground panoramic image, and the ground panoramic image is converted to the same perspective as the satellite image, so that the ground panoramic image after perspective transformation roughly corresponds to the original satellite image in content and can more significantly display local road detail information. Polar coordinate transformation is applied to the satellite image, and the satellite image is converted to the same perspective as the ground panoramic image, so that the ground panoramic image roughly corresponds to the satellite image after polar coordinate transformation in content and can more significantly display global layout information such as roads, buildings, and trees. Get the ground panoramic image after perspective transformation And the satellite image after polar coordinate transformation
[0063] ① Apply inverse polar coordinate transformation to the ground panoramic image (such as Figure 3 As shown in Figure 2.1.1.1, each column of the ground panoramic image represents an angle, which is somewhat similar to the principle of the polar coordinate function. Therefore, the inverse polar coordinate transformation is applied to the ground panoramic image to transform the image perpendicular to the ground perspective into the image parallel to the ground perspective. The inverse polar coordinate transformation is to convert the rectangular coordinate system into the polar coordinate system.
[0064]
[0065] Among them, r represents the radius, c h represents the camera height from the ground (in pixels), (x, y) represents the coordinates of any point in the ground panoramic image, (u, v) represents the coordinates of any point in the ground panoramic image after inverse polar coordinate transformation, H g and W g They represent the height and width of the ground panoramic image respectively, and α represents the angle.
[0066] ② In order to solve the road deformation problem of the ground panoramic image after the inverse polar coordinate transformation, the perspective transformation is applied to the ground panoramic image, so that the ground panoramic image after the perspective transformation is more similar to the satellite image on the road. Perspective transformation is also called projection transformation, which is to map the current image to another plane by projection. This process includes two steps: one is to convert the two-dimensional coordinate system into a three-dimensional coordinate system, and the other is to project the three-dimensional coordinate system to a new two-dimensional coordinate system. The matrix transformation formula of perspective transformation is:
[0067]
[0068] in, represents the perspective transformation matrix, represents the source and target points (the points to be moved), Indicates the target point (fixed point) to move to.
[0069] Transform from two-dimensional space to three-dimensional space, because the image is in a two-dimensional plane, so divide by C. So the calculation formula is:
[0070]
[0071] in, Represents the coordinates of any point projected onto the new plane.
[0072] Substituting formula (4) into formula (5) yields:
[0073]
[0074] Let a 33 =1, expand the formula, and you can get the coordinates of a point:
[0075]
[0076] By calculating the coordinates of four points in total, we can get eight equations, which can be used to solve the perspective transformation matrix.
[0077] By applying the above perspective transformation method and combining it with formula (3), the ground panoramic image can be converted into a perspective transformed image (such as Figure 4 shown).
[0078] ③ The ground image after perspective transformation is very similar to the satellite image on the road, but the surrounding buildings and trees are seriously distorted. In order to solve this problem, the image after inverse polar coordinate transformation is combined with the image after perspective transformation, that is, the road part of the image after inverse polar coordinate transformation is replaced by the road part of the image after perspective transformation. In this way, the ground image obtained can ensure that the road is similar to the satellite image, and the layout of the buildings and trees around the road can be clearly seen (such as Figure 5 Then we can get the ground panoramic image after perspective transformation.
[0079] Step 1-2: Apply polar coordinate transformation to the satellite image.
[0080] Pixels located in the same azimuth direction in the satellite image roughly correspond to vertical image columns in the ground panoramic image, so the geometric correspondence gap between the cross-view image domains is roughly eliminated by explicitly transforming the satellite image. By doing so, the task of learning multiple correspondences (i.e., geometric and feature representations) is simplified, and only a simple feature mapping task needs to be learned, which significantly promotes network convergence. Specifically, the center of each satellite image is taken as the polar coordinate origin and the north direction is taken as the 0° angle. To facilitate training the network, the size of the satellite image after polar coordinate transformation is restricted to the same size as the ground panoramic image W. g ×H g The same, the original satellite image size is S s ×Ss Therefore, the original satellite image point And the satellite image points after polar coordinate transformation The transformation formula between them is:
[0081]
[0082] like Figure 6 As shown in FIG. 1 , the objects in the satellite image after polar coordinate transformation are located at positions similar to the corresponding objects in the ground panoramic image.
[0083] Step 2: Build an image matching network
[0084] The network mainly has four branches with the same structure and each branch does not share weights. Each branch contains a feature extraction layer, a coordinate attention module, and a spatial scale attention module. The specific steps are as follows:
[0085] Step 2-1: Construct feature extraction layer (such as Figure 2 shown).
[0086] The ground panoramic image I g , satellite image after polar coordinate transformation Ground panoramic image after perspective transformation Satellite Image I s The input images are input into different branch networks respectively. The input images of each branch are sequentially passed through convolution module 1, pooling layer 1, convolution module 2, pooling layer 2, convolution module 3, pooling layer 3, convolution module 4, pooling layer 4, convolution module 5, and pooling layer 5. Convolution module 1 consists of 2 convolution layers, each of which contains 64 3×3 convolution kernels, and the step size of the convolution is 1. Pooling layer 1 is a maximum pooling operation with a step size of 2 and a convolution kernel size of 3×3. Convolution module 2 also consists of 2 convolution layers, each of which contains 128 3×3 convolution kernels, and the step size of the convolution is 1. Pooling layer 2 is a maximum pooling operation with a step size of 2 and a convolution kernel size of 3×3. Convolution module 3 consists of 3 convolution layers, each of which contains 256 3×3 convolution kernels, and the step size of the convolution is 1. Pooling layer 3 is a maximum pooling operation with a stride of 2 and a convolution kernel size of 3×3. Convolution module 4 also consists of 3 convolution layers, each of which contains 512 3×3 convolution kernels, and the convolution stride is 1. Pooling layer 4 is a maximum pooling operation with a stride of 2 and a convolution kernel size of 3×3. Convolution module 5 consists of 3 convolution layers containing 512 3×3 convolution kernels, and the convolution stride is 1. Pooling layer 5 is a maximum pooling operation with a stride of 2 and a convolution kernel size of 3×3. Then, the features F are obtained respectively. g , F s as output.
[0087] Step 2-2: Construct the coordinate attention module (such as Figure 7 shown).
[0088] The feature F g , F s Perform spatial global average pooling along the X-coordinate direction and the Y-coordinate direction to generate two feature maps of size C×H×1 and C×1×W, where C represents the number of channels, and H and W represent the height and width of the image, respectively. Secondly, stack along the channel dimension and then perform 1×1 convolution, batch normalization, and Sigmoid activation function to generate a feature map of size C×1×(H+W). Then, perform 1×1 convolution and Sigmoid activation function along the X-coordinate direction and the Y-coordinate direction respectively to obtain the attention weights in the X-coordinate direction and the attention weights in the Y-coordinate direction, which are C×H×1 and C×1×W, respectively. Finally, the weight vector is combined with the input feature map F g , F s Multiply them separately to get the feature map F with position information g-ca , F s-ca as output.
[0089] Step 2-3: Construct a spatial scale attention module (such as Figure 8 shown).
[0090] The feature F g-ca , F s-ca After 1×1 convolution and maximum pooling along the channel dimension, the channel attention vector is obtained. Then, the obtained channel attention vector is stacked along the channel dimension after 3×3, 5×5, and 7×7 convolutions (the step size of the convolution is 1) to obtain a multi-scale feature map. The obtained multi-scale feature map is then used to learn the weights of objects at different scales through 1×1 convolution, and then normalized to between 0 and 1 through the Sigmoid function. Finally, the weight vector is multiplied by the input feature map to obtain the feature map F embedded with multi-scale spatial layout information. g-ca-ssa , F s-ca-ssa as output.
[0091] Step 2-4, calculate feature similarity.
[0092] Use Euclidean distance to calculate the similarity between features and use F g-ca-ssa , F s-ca-ssa A soft margin triplet objective function is constructed to shorten the distance between matching image pairs and make the distance between unmatched image pairs as far as possible.
[0093]
[0094] Here, d p and d n They represent the Euclidean distance from the anchor point to the positive sample and the negative sample respectively. α is a hyperparameter, which is generally set to 10 to accelerate network convergence during the training phase.
[0095] At the same time, in order to give full play to the role of image features of different branches, the present invention proposes an auxiliary loss function to train the network. Specifically, the output feature F of the ground panoramic image branch is g-ca-ssa Output features of satellite image branch with polar coordinate transformation The output features of the ground panoramic image branch after perspective transformation are sent to the weighted soft margin triplet loss function L1 for training. The output feature F of the satellite image branch s-ca-ssa Another weighted soft margin triplet loss function L2 is sent for training. g-ca-ssa Perspective Transformation Ground Image Features Stack the channel dimension to get feature F G , transform the polar coordinates into satellite image features With satellite image features F s-ca-ssa Stack the channel dimension to get feature F S . G and F S Then it is sent to a new weighted soft margin triplet loss function L3 for training. At the same time, different weights are assigned to each loss function.
[0096] L=0.4·L1+0.1·L2+0.5·L3 (10)
[0097] Step 3: Network training
[0098] The constructed network is trained. The ground panoramic images and satellite images in the training set are put into the network in batches to generate the top K satellite images most similar to each ground panoramic image. The loss is calculated using the predicted labels and the real matching labels. Specifically, the weighted soft margin triplet loss function and the auxiliary loss function are adopted. The Adam optimizer is used for optimization until the training is terminated when the value of the objective function does not decrease.
[0099] Step 4: Test image
[0100] The ground panoramic images and satellite images of the test set are input into the image matching network trained in step 3. The similarity scores between the ground panoramic images and satellite images are calculated using the Euclidean distance to obtain the top K most similar satellite image query results, which are evaluated using the recall rate indicator Recall@K.
[0101] Step 5: Locate the ground panoramic image
[0102] By querying the GPS latitude and longitude position information corresponding to the first K satellite images closest to the ground panoramic image, the ground panoramic image is correctly positioned. On the CVUSA and CVACT test sets, the Recall@1 accuracy results are 92.07% and 84.57% respectively, as shown in the table below, which is 2-7 times higher than the results of 31.99% and 11.50% in the reference "CVMNet".
[0103]
[0104] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should be included in the protection scope of the present invention.
Claims
1. A four-branch cross-view image geolocation system that cooperates with perspective and polar coordinate perspectives, characterized in that It includes image transformation module, feature extraction module, coordinate attention module, spatial scale attention module and auxiliary loss function; The image transformation module applies perspective transformation to the ground panoramic image and polar coordinate transformation to the satellite image to obtain the perspective transformation. The ground panoramic image after transformation and the satellite image after polar coordinate transformation The feature extraction module is to extract the ground panoramic image I g , satellite image after polar coordinate transformation Ground panoramic image after perspective transformation Satellite Image I s The high-dimensional abstract features of F g , F s ; The coordinate attention module is to transform the feature F g , F s Perform spatial global average pooling along the X-coordinate direction and the Y-coordinate direction to generate two feature maps of size C×H×1 and C×1×W, where C represents the number of channels, and H and W represent the height and width of the image, respectively. Secondly, stack along the channel dimension and then perform 1×1 convolution, batch normalization, and Sigmoid activation function to generate a feature map of size C×1×(H+W). Then, 1×1 convolution and Sigmoid activation function are performed again along the X-coordinate direction and the Y-coordinate direction to obtain the attention weight in the X-coordinate direction and the attention weight in the Y-coordinate direction, which are C×H×1 and C×1×W respectively; finally, the weight vector is combined with the input feature map F g , F s Multiply them separately to get the feature map F with position information g-ca , F s-ca ; The spatial scale attention module is to transform the feature F g-ca , F s-ca After 1×1 convolution and maximum pooling along the channel dimension, the channel attention vector is obtained. Then, the obtained channel attention vector is stacked along the channel dimension after 3×3, 5×5, and 7×7 convolutions respectively to obtain a multi-scale feature map. The obtained multi-scale feature map is then used to learn the weights of objects at different scales through 1×1 convolution, and then normalized to between 0 and 1 through the Sigmoid function. Finally, the weight vector is multiplied by the input feature map to obtain the feature map F embedded with multi-scale spatial layout information. g-ca-ssa , F s-ca-ssa ; The auxiliary loss function is to transform the feature F g-ca-ssa , F s-ca-ssa The features are input into three weighted soft margin triplet loss functions with different weights respectively to calculate the similarity of the features and obtain the positioning results.
2. A four-branch cross-view image geolocation method that cooperates with perspective and polar coordinate perspectives, characterized in that Here are the steps: Step 1: Transform the images in the dataset Apply perspective transformation to the ground panoramic image and polar coordinate transformation to the satellite image to obtain the ground panoramic image after perspective transformation. And the satellite image after polar coordinate transformation Step 2: Build an image matching network The entire network consists of four network branches with the same structure and non-shared weights. Each network branch contains a feature extraction module, a coordinate attention module, and a spatial scale attention module in sequence. The specific method is as follows: Step 2-1: Construct feature extraction layer The feature extraction module is to extract the ground panoramic image I g , satellite image after polar coordinate transformation Ground panoramic image after perspective transformation Satellite Image I s The high-dimensional abstract features of F g , F s As output; Step 2-2: Construct the coordinate attention module The coordinate attention module is to transform the feature F g , F s Perform spatial global average pooling along the X-coordinate direction and the Y-coordinate direction to generate two feature maps of size C×H×1 and C×1×W, where C represents the number of channels, and H and W represent the height and width of the image, respectively. Secondly, stack along the channel dimension and then perform 1×1 convolution, batch normalization, and Sigmoid activation function to generate a feature map of size C×1×(H+W). Then, 1×1 convolution and Sigmoid activation function are performed again along the X-coordinate direction and the Y-coordinate direction to obtain the attention weight in the X-coordinate direction and the attention weight in the Y-coordinate direction, which are C×H×1 and C×1×W respectively; finally, the weight vector is combined with the input feature map F g , F s Multiply them separately to get the feature map F with position information g-ca , F s-ca As output; Step 2-3: Constructing the spatial scale attention module The spatial scale attention module is to transform the feature F g-ca , F s-ca After 1×1 convolution and maximum pooling along the channel dimension, the channel attention vector is obtained. Then, the obtained channel attention vector is stacked along the channel dimension after 3×3, 5×5, and 7×7 convolutions respectively to obtain a multi-scale feature map. The obtained multi-scale feature map is then used to learn the weights of objects at different scales through 1×1 convolution, and then normalized to between 0 and 1 through the sigmoid function. Finally, the weight vector is multiplied by the input feature map to obtain the feature map F embedded with multi-scale spatial layout information. g-ca-ssa , F s-ca-ssa As output; Step 2-4: Calculate feature similarity Use Euclidean distance to calculate the similarity between features and use F g-ca-ssa , F s-ca-ssa Construct a soft margin triplet objective function to shorten the distance between matching image pairs and make the distance between unmatched image pairs as far as possible; Here, d p and d n They represent the Euclidean distances from the anchor point to the positive sample and the negative sample respectively. α is a hyperparameter that accelerates the convergence of the network during the training phase. At the same time, in order to give full play to the role of image features of different branches, an auxiliary loss function is used to train the network; including: the output feature F of the ground panoramic image branch g-ca-ssa Output features of the satellite image branch with polar coordinate transformation The weighted soft margin triplet loss function L1 is sent for training; the output features of the ground panoramic image branch after perspective transformation are The output feature F of the satellite image branch s-ca-ssa Another weighted soft margin triplet loss function L2 is sent for training; the ground panoramic image feature F g-ca-ssa Perspective Transformation Ground Image Features Stack the channel dimension to get feature F G , transform the polar coordinates into satellite image features With satellite image features F s-ca-ssa Stack the channel dimension to get feature F S ; F G and F S Then send it to a new weighted soft interval triplet loss function L3 for training; at the same time, assign different weights to each loss function: L=0.4·L1+0.1·L2+0.5·L3 (2) Step 3: Train the constructed network The training data is put into the network in batches to generate the top K satellite images most similar to each ground panoramic image. The loss is calculated using the predicted labels and the real matching labels. Specifically, the weighted soft margin triplet loss function and the auxiliary loss function are used. The Adam optimizer is used for optimization until the value of the objective function does not decrease. The training ends. Step 4: Test Image Set Input the test image into the image matching network trained in step 3, and use the Euclidean distance to calculate the similarity score between the ground panoramic image and the satellite image to obtain the top K satellite image query results that are most similar, and use the recall rate indicator Recall@K for evaluation; Step 5: Locate the ground panorama image The positioning task of the ground panoramic image is completed by querying the GPS longitude and latitude position information corresponding to the first K closest satellite images.
3. The four-branch cross-view image geolocation method of coordinating perspective view and polar coordinate view according to claim 2, characterized in that: The feature extraction module in step 2-1 refers to the input image passing through convolution module 1, pooling layer 1, convolution module 2, pooling layer 2, convolution module 3, pooling layer 3, convolution module 4, pooling layer 4, convolution module 5, pooling layer 5 in sequence; where convolution module 1 consists of 2 convolution layers, each of which contains 64 3×3 convolution kernels, and the convolution step size is 1; pooling layer 1 is a maximum pooling operation with a step size of 2 and a convolution kernel size of 3×3; convolution module 2 also consists of 2 convolution layers, each of which contains 128 3×3 convolution kernels, and the convolution step size is 1; pooling layer 2 is a step size of 2 and a convolution kernel size of 3×3. 3; convolution module 3 consists of 3 convolution layers, each of which contains 256 3×3 convolution kernels, and the step size of the convolution is 1; pooling layer 3 is a maximum pooling operation with a step size of 2 and a convolution kernel size of 3×3; convolution module 4 also consists of 3 convolution layers, each of which contains 512 3×3 convolution kernels, and the step size of the convolution is 1; pooling layer 4 is a maximum pooling operation with a step size of 2 and a convolution kernel size of 3×3; convolution module 5 consists of 3 convolution layers containing 512 3×3 convolution kernels, and the step size of the convolution is 1; pooling layer 5 is a maximum pooling operation with a step size of 2 and a convolution kernel size of 3×3.
4. A computer system, characterized in that include: One or more processors, and a computer-readable storage medium for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are enabled to implement the method of claim 2.
5. A computer-readable storage medium, characterized in that Computer executable instructions are stored, and when the instructions are executed, they are used to implement the method of claim 2.
