Cross-view-angle geographic positioning method based on unmanned aerial vehicle image

Through the division of UAV images and the use of Transformer encoders, combined with the self-attention mechanism and cross-entropy loss optimization, the problem of insufficient understanding of global context information in cross-view geolocation of UAV images is solved, and the recognition performance and Computationally efficient, suitable for multiple application areas.

CN118711081APending Publication Date: 2024-09-27NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410835344.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-09-27

AI Technical Summary

Technical Problem

Existing cross-view geolocation methods based on UAV images have deficiencies in understanding global context information and adapting to changes in viewing angles, resulting in limited recognition performance. In addition, Transformer-based methods have high computational complexity and require large hardware resources.

Method used

Using a symmetric structure, the UAV image is divided into multiple image blocks, global information is encapsulated through linear expansion layers and position embeddings, the Transformer encoder and self-attention mechanism are used to capture image block relationships, and cross-entropy loss and KL divergence are used Global features are optimized, combined with active heatmap segmentation to extract representative feature vectors, and triplet loss is calculated to enhance cross-view matching capabilities.

Benefits of technology

It improves the fine-grained feature extraction accuracy and matching accuracy of the model in cross-view geographical positioning, enhances the discrimination and generalization capabilities, reduces the computational complexity, and is suitable for agriculture, aerial photography and other fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118711081A
    Figure CN118711081A
Patent Text Reader

Abstract

The invention discloses a cross-view-angle geographic positioning method based on an unmanned aerial vehicle image, and the method comprises the steps: employing a symmetric structure, dividing an image of two view angles into a plurality of image blocks, transmitting the image blocks to a linear expansion layer, packaging the global image information through position embedding and class marking, and employing an attention mechanism to clarify the relation between the image blocks, thereby achieving the positioning of the image. Therefore, the discrimination capability of the model in the aspect of cross-view matching is enhanced. The method can be applied to the fields of agriculture, aerial photography, event detection and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer vision, and in particular relates to a cross-viewing geographic positioning method based on unmanned aerial vehicle images. Background Art

[0002] In the geolocation process, using drone images to achieve cross-view geolocation is an important technology. This technology has a wide range of applications in drone navigation, urban planning, and event monitoring. However, due to the large changes in the perspective of drone images and the complexity of terrain and buildings, cross-view geolocation becomes challenging. Currently, there are two main categories of cross-view geolocation methods based on drone images: convolutional neural network (CNN) based methods and Transformer based methods.

[0003] The first is a method based on convolutional neural network (CNN). This method extracts features from the image through the convolution layer, uses the pooling layer to reduce the dimension of the features, and then performs classification or regression through the fully connected layer. CNN has strong capabilities in image processing and feature extraction, and can better extract significant local features of the image. For example, Wang et al. introduced a simple and effective deep convolutional neural network, namely the local pattern network (LPN), in the document "Wang T, Zheng Z, Yan C, et al. Each part matters: Local patterns facilitate cross-view geo-localization [J]. IEEE Transactions on Circuits and Systems for Video Technology, 2021, 32 (2): 867-879." A square ring partitioning strategy is used to learn spatial features using the distance from the center of the image to different regions, thereby improving recognition performance. CNN-based methods have achieved certain success in geolocation, but their shortcomings are the lack of understanding of global contextual information, which hinders the analysis and extraction of geospatial information from images. These methods cannot generate descriptors with sufficient discrimination to adapt to significant changes in viewing angles.

[0004] The second is the Transformer-based method. Transformer encodes features in the image through the self-attention mechanism, which can capture a wider range of contextual information in the image. Transformer performs well in processing sequence data and has gradually been applied to image processing tasks in recent years. For example, Zhu et al. proposed a Transformer-based network structure named TransGeo in the paper "Zhu S, Shah M, Chen C. Transgeo: Transformer is all you need for cross-view image geo-localization [C] / / Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition. 2022: 1162-1171.". An attention-guided non-uniform cropping method is designed to remove image blocks without important information while ignoring the impact on performance, thereby reducing costs. This strategy is similar to the behavior of humans when observing images, that is, focusing on important parts and magnifying them. Compared with traditional CNN methods, Transformer-based methods show stronger robustness in dealing with perspective changes and complex scenes, but their computational complexity is high and they require more hardware resources. Summary of the invention

[0005] In order to overcome the shortcomings of the prior art, the present invention provides a cross-view geolocation method based on drone images. The method adopts a symmetrical structure, first divides the images of two views into multiple image blocks, and then feeds them into a linear expansion layer, and then uses position embedding and class labeling to encapsulate global image information. The attention mechanism is used to clarify the relationship between image blocks, thereby enhancing the model's discrimination ability in cross-view matching. The method can be applied to agriculture, aerial photography, event detection and other fields.

[0006] The technical solution adopted by the present invention to solve the technical problem is as follows:

[0007] Step 1: Prepare the dataset. The images in the dataset are from drone and satellite perspectives of buildings. These images are segmented into image blocks, flattened and mapped through a linear layer to obtain feature representation in high-dimensional space.

[0008] Step 2: Add position embedding and additional learnable [class] token to summarize the global information of the entire image;

[0009] Step 3: The image blocks processed by the linear expansion layer enter the Transformer encoder, which captures the relationship between the image blocks through the self-attention mechanism and outputs a series of feature vectors;

[0010] Step 4: Global feature branch: The [class] tokens processed by the Transformer encoder for the drone and satellite perspectives are passed through the classification layer, which not only maps the global information to the category label and calculates the cross entropy loss for each, but also calculates the KL divergence loss for the drone and satellite perspectives.

[0011] Step 5: AHS branch: In addition to the other feature vectors of [class] token processed by the Transformer encoder, the active heat map segmenter AHS is used to sort the heat map of the feature value in descending order into two regions, namely the foreground and the background, and then the representative feature vector is extracted by average pooling operation for each block; after the AHS module division, the active feature vectors corresponding to the drone image and the satellite image are subjected to triple loss;

[0012] Step 6: Finally, the entire model is evaluated using recall@1 and average precision AP on the test set.

[0013] Preferably, the data set is the University-1652 data set.

[0014] Preferably, the step 3 is specifically:

[0015] The vector after the linear expansion layer is fed into the Transformer encoder; the Transformer encoder contains multiple encoder layers, each of which has two parts: a multi-head self-attention mechanism and a multi-layer perceptron; the input vector is transformed by linear projection and a separate query Q, key K, and value V set are derived, as shown in formula (1):

[0016]

[0017] Where X represents the input matrix, W QKV is a block matrix containing the query Key W K Sum value W V The weight matrix is ​​shown in formula (2):

[0018]

[0019] The core of the attention mechanism is to calculate the similarity between the query Q and the key K by scaling the dot product. Scaling refers to adjusting by the square root of the dimension of the key K, and then applying the softmax function to calculate the weight of the value, as shown in formula (3):

[0020]

[0021] Among them, d k Represents the dimension of the key vector;

[0022] The process of the multi-head attention mechanism is shown in formula (4):

[0023]

[0024] Where W O is the output weight matrix used to merge the results of all attention heads; W i Q , W i K , W i V Represents different Q, K and V sets respectively, head 1 ,…,head h Respectively represent different Transform heads.

[0025] Preferably, the step 4 is specifically:

[0026] The calculation method of the cross entropy loss function is shown in formula (5):

[0027]

[0028] Where N represents the number of observations, y i Indicates the actual label (0 or 1), Indicates the probability that the prediction result belongs to 1;

[0029] The calculation method of KL divergence is shown in formula (6):

[0030]

[0031] Among them, P(x) and Q(x) represent the true distribution and estimated distribution respectively.

[0032] Preferably, the step 5 is specifically:

[0033] After the Transformer encoder processes the feature vectors other than the [class] token, the active heat map segmenter AHS is used to sort the heat map of the feature values ​​in descending order and divide them into two regions, namely the foreground and the background. The calculation method of the heat map is shown in formula (7):

[0034]

[0035] Among them, F i represents the i-th channel of the feature map F, and C represents the number of channels;

[0036] Then, the average pooling operation is used for each block to extract the representative feature vector. The calculation method of the pooling operation is shown in formula (8):

[0037]

[0038] Where N i Represents the number of eigenvectors in the i-th region.

[0039] The beneficial effects of the present invention are as follows:

[0040] 1. Fine-grained feature extraction: The Transformer encoder in the VAGeo model captures contextual information through a multi-head self-attention mechanism, which can better distinguish fine-grained features in the image, thereby improving the accuracy of the task.

[0041] 2. Cross-view feature alignment: By calculating the triplet loss, the Euclidean distance between the feature vectors of the drone view and the satellite view is reduced, which enhances the model's discrimination ability and matching accuracy in cross-view geolocation.

[0042] 3. Global feature optimization: For the global feature vector of [class] token processed by the Transformer encoder, the cross entropy loss is calculated and the KL divergence is introduced to measure the similarity of the features of the two perspectives, further improving the generalization ability and accuracy of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a specific flow chart of the present invention;

[0044] Figure 2 The original images of the drone and satellite view of the present invention and the characteristic thermal map after being processed by the present invention. DETAILED DESCRIPTION

[0045] The present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0046] Cross-view geolocation technology has become a hot topic in the current technological progress and application expansion. Traditional GPS positioning accuracy is insufficient in bad weather and dense areas, so a more accurate, flexible and reliable method is needed. Drones are equipped with high-resolution cameras and sensors, which can obtain high-definition images at different heights and angles, providing a new perspective for cross-view geolocation.

[0047] The present invention aims to solve the problem of positioning drone images in different viewpoints and complex scenes. The proposed Vision Transformer-based method adopts a symmetrical structure, initially divides the images of two viewpoints into multiple image blocks, and then feeds them into a linear expansion layer, and then uses position embedding and class labeling to encapsulate global image information, and uses the attention mechanism to clarify the relationship between image blocks, thereby enhancing the model's discriminative ability in cross-view matching. This method can be applied to agriculture, aerial photography, event detection and other fields.

[0048] The present invention proposes a method for cross-viewing geolocation based on drone images, comprising the following steps:

[0049] 1. Prepare the dataset (containing drone and satellite images of buildings). These images are segmented into image patches, which are then flattened and mapped through a linear layer to obtain feature representation in a high-dimensional space.

[0050] 2. Add position embedding and additional learnable [class] token to summarize the global information of the entire image.

[0051] 3. The image blocks processed by the linear expansion layer enter the Transformer encoder. The relationship between image blocks is captured through the self-attention mechanism, and a series of feature vectors are output.

[0052] 4. Global feature branch: The [class] tokens processed by the Transformer encoder for the drone and satellite perspectives are passed through the classification layer, which not only maps the global information to the category label and calculates the cross entropy loss for each, but also calculates the KL divergence loss for the drone and satellite perspectives.

[0053] 5. AHS branch: In addition to the other feature vectors of [class] token processed by the Transformer encoder, the Active Heatmap Splitter (AHS) is used to sort the heatmap of the feature value in descending order into two regions (foreground and background), and then the average pooling operation is used to extract the representative feature vector for each block. After the AHS module is divided, the active feature vectors corresponding to the drone image and the satellite image are subjected to triple loss.

[0054] 6. Finally, the entire model is evaluated using Recall@1 and Average Precision (AP) on the test set.

[0055] Example:

[0056] 1. Prepare the dataset;

[0057] Prepare the University-1652 dataset (containing drone and satellite images of buildings), which are segmented into image patches.

[0058] 2. Linear expansion layer;

[0059] The segmented image patches are introduced into position embedding, then flattened and mapped through a linear layer to obtain feature representation in high-dimensional space.

[0060] 3. Transformer encoder layer;

[0061] The vector after the linear expansion layer above is fed into the Transformer encoder. The Transformer encoder contains multiple encoder layers, each of which has two main parts: a multi-head self-attention mechanism and a multi-layer perceptron. The input vector is transformed through a unique linear projection and a separate set of queries (Q), keys (K), and values ​​(V) are derived, as shown in the following formula (1):

[0062]

[0063] In the above formula, X represents the input matrix, and W QKV is a block matrix containing the query Key W K Sum value W V The weight matrix is ​​as shown in the following formula (2):

[0064]

[0065] The core of the attention mechanism is to calculate the similarity between the query Q and the key K through the scaled dot product, where the scaling refers to adjusting by the square root of the dimension of the key K, and then applying the softmax function to calculate the weight of the value, as shown in the following formula (3):

[0066]

[0067] The process of the multi-head attention mechanism is shown in the following formula (4):

[0068]

[0069] Among them, W O It is the output weight matrix used to merge the results of all attention heads. This weight matrix can be learned and optimized during the training process.

[0070] 4. Global feature branch;

[0071] The [class] token processed by the Transformer encoder for the drone and satellite perspectives respectively passes through the classification layer, which not only maps the global information to the category label and calculates the cross entropy loss for each, but also calculates the KL divergence loss for the drone and satellite perspectives.

[0072] The calculation method of the cross entropy loss function is shown in formula (5):

[0073]

[0074] The calculation method of KL divergence is shown in formula (6):

[0075]

[0076] 5. AHS branch;

[0077] After the Transformer encoder processes the feature vectors other than the [class] token, the Active Heatmap Splitter (AHS) is used to sort the feature value heat map in descending order and divide it into two regions (foreground and background). The heat map is calculated as shown in formula (7):

[0078]

[0079] Among them, F i Represents the i-th channel of the feature map F. Then, the average pooling operation is used for each block to extract the representative feature vector. The calculation method of the pooling operation is shown in formula (8):

[0080]

[0081] This formula describes all the features in a certain area i. The mean pooling operation of N i Represents the number of eigenvectors in the i-th region.

[0082] After the AHS module is divided, the active feature vectors corresponding to the drone image and the satellite image are subjected to triplet loss. By calculating the triplet loss of the two perspectives, the network is helped to minimize the Euclidean distance between the drone and satellite perspectives, thus improving the accuracy of the task.

[0083] The effect of the present invention can be further illustrated by the following experiments.

[0084] 1. Experimental conditions;

[0085] The present invention conducts experiments in the following environment: the hardware includes Intel Core i5-10300H CPU and NVIDIAGeForce GTX 1650Ti GPU, and the operating system is Windows 11. The experiment uses Python 3.9 and CUDA 11.6 versions, PyTorch 1.13.1 as the deep learning framework, and PyCharm software is used for development and testing.

[0086] The data used in the experiment is the University-1652 dataset collected by Zheng Zhedong et al. from the University of Technology Sydney. The dataset is proposed in the paper “Zheng Z, Wei Y, Yang Y. University-1652: A multi-view multi-source benchmark for drone-based geo-localization [C] / / Proceedings of the 28th ACM international conference on Multimedia. 2020: 1395-1403”.

[0087] 2. Experimental content;

[0088] The experiment is based on the University-1652 dataset, and conducts two tasks: drone target positioning (drone -> satellite) and drone navigation (satellite -> drone). The dataset contains 72 universities, including 33 universities in the training set and 39 universities in the test set. The training set includes image data of 701 buildings.

[0089] The present invention uses two indicators, Recall@1 and Average Precision (AP), to evaluate the performance of the model, which respectively measure the accuracy of the model in finding the most relevant images in the gallery and the area under the precision-recall curve. These indicators directly reflect the performance of the model in the cross-view geo-localization task. In order to compare the effectiveness of the present invention, the LPN method proposed by Wang et al. in the document “Wang T, Zheng Z, Yan C, et al. Each part matters: Local patterns facilitate cross-view geo-localization [J]. IEEE Transactions on Circuits and Systems for Video Technology, 2021, 32 (2): 867-879.” was selected. The comparison results are shown in Table 1.

[0090] Table 1

[0091]

[0092] As shown in Table 1, in the UAV target positioning (UAV->satellite) task, the Recall@1 of the model of the present invention reaches 81.10% and the AP reaches 83.36%; in the UAV navigation (satellite->UAV) task, the Recall@1 reaches 87.02% and the AP reaches 80.87%.

Claims

1. A cross-view geolocation method based on drone images, characterized in that: The steps include: Step 1: Prepare the dataset. The images in the dataset are from drone and satellite perspectives of buildings. These images are segmented into image blocks, flattened and mapped through a linear layer to obtain feature representation in high-dimensional space. Step 2: Add position embedding and additional learnable [class] token to summarize the global information of the entire image; Step 3: The image blocks processed by the linear expansion layer enter the Transformer encoder, which captures the relationship between the image blocks through the self-attention mechanism and outputs a series of feature vectors; Step 4: Global feature branch: The [class] tokens processed by the Transformer encoder for the drone and satellite perspectives are passed through the classification layer, which not only maps the global information to the category label and calculates the cross entropy loss for each, but also calculates the KL divergence loss for the drone and satellite perspectives. Step 5: AHS branch: In addition to the other feature vectors of [class] token processed by the Transformer encoder, the active heat map segmenter AHS is used to sort the heat map of the feature value in descending order into two regions, namely the foreground and the background, and then the representative feature vector is extracted by average pooling operation for each block; after the AHS module division, the active feature vectors corresponding to the drone image and the satellite image are subjected to triple loss; Step 6: Finally, the entire model is evaluated using recall@1 and average precision AP on the test set.

2. The method for cross-viewing geolocation based on drone images according to claim 1 is characterized in that: The dataset is the University-1652 dataset.

3. The method for cross-viewing geolocation based on drone images according to claim 1 is characterized in that: The step 3 is specifically as follows: The vector after the linear expansion layer is fed into the Transformer encoder; the Transformer encoder contains multiple encoder layers, each of which has two parts: a multi-head self-attention mechanism and a multi-layer perceptron; the input vector is transformed by linear projection and a separate query Q, key K, and value V set are derived, as shown in formula (1): Where X represents the input matrix, W QKV is a block matrix containing the query Key W K Sum value W V The weight matrix is ​​shown in formula (2): The core of the attention mechanism is to calculate the similarity between the query Q and the key K by scaling the dot product. Scaling refers to adjusting by the square root of the dimension of the key K, and then applying the softmax function to calculate the weight of the value, as shown in formula (3): Among them, d k Represents the dimension of the key vector; The process of the multi-head attention mechanism is shown in formula (4): Where W O is the output weight matrix used to merge the results of all attention heads; W i Q , W i K , W i V Represent different sets of Q, K and V, head1,…,head h Represents different Transform heads respectively.

4. The method for cross-viewing geolocation based on drone images according to claim 3 is characterized in that: The step 4 is specifically as follows: The calculation method of the cross entropy loss function is shown in formula (5): Where N represents the number of observations, y i Indicates the actual label (0 or 1), Indicates the probability that the prediction result belongs to 1; The calculation method of KL divergence is shown in formula (6): Among them, P(x) and Q(x) represent the true distribution and estimated distribution respectively.

5. The method for cross-viewing geolocation based on drone images according to claim 4 is characterized in that: The step 5 is specifically as follows: After the Transformer encoder processes the feature vectors other than the [class] token, the active heat map segmenter AHS is used to sort the heat map of the feature values ​​in descending order and divide them into two regions, namely the foreground and the background. The calculation method of the heat map is shown in formula (7): Among them, F i represents the i-th channel of the feature map F, and C represents the number of channels; Then, the average pooling operation is used for each block to extract the representative feature vector. The calculation method of the pooling operation is shown in formula (8): Where N i Represents the number of eigenvectors in the i-th region.

Citation Information

Cited By

  • Cross-visual-angle geographic positioning method based on feature center region diffusion and edge radiation

    CN119723020A

  • Multi-view target image fusion method, device and equipment and readable storage medium

    CN120747686A