An attention-like cross-domain scene matching method for edge deployment

By building a cross-domain scene matching model suitable for edge deployment, using large-core convolution splitting and quasi-attention mechanisms, the problems of feature extraction and edge deployment are solved, the matching accuracy and robustness are improved, and it is suitable for infrared light and visible light. cross-domain matching.

CN118506031BActive Publication Date: 2024-10-01NORTHWESTERN POLYTECHNICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410947146.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-10-01
Estimated Expiration
2044-07-16

AI Technical Summary

Technical Problem

Existing cross-domain scene matching technology has discrete features during feature extraction, making it difficult to distinguish between foreground and background. The infrared imaging resolution is low and the self-attention mechanism has high computational cost, making it difficult to achieve lightweight deployment at the edge.

Method used

Construct a cross-domain scene matching model, including a feature extraction network and a regression constraint network, build an attention-like mechanism through large-core convolution splitting, combine data enhancement and deep cross-correlation processing, optimize feature extraction and regression analysis, and be suitable for edge deployment.

Benefits of technology

It improves the accuracy and robustness of cross-domain scene matching, reduces computational costs, and is suitable for real-time solution at the edge. It is especially more robust when matching between infrared light and visible light.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118506031B_ABST
    Figure CN118506031B_ABST
Patent Text Reader

Abstract

The present application is about a cross-domain scene matching method of the type of attention suitable for edge deployment, and belongs to the field of image processing technology. It includes: constructing a cross-domain scene matching model, including a connected feature extraction network and a regression constraint network; using a public image data set to pre-train the feature extraction network to obtain the pre-trained weights of the feature extraction network; obtaining multiple cross-domain images, and performing data enhancement processing to obtain a cross-domain scene data set; using the cross-domain scene data set to train and verify the cross-domain scene matching model to obtain the final output result; according to the final output result, image matching algorithm reasoning is performed to obtain the cross-domain scene matching results of the real-time scene map and the satellite image map. The present application can improve the stability of drones in dealing with all-weather scene matching, especially improve the robustness of drones in dealing with cross-domain scene matching between infrared light and visible light, reduce the difficulty of edge deployment, and improve the real-time solution speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an attention-like cross-domain scene matching method suitable for edge deployment. Background Art

[0002] Scene matching technology is a very important technology and research direction in the field of navigation, with broad application prospects. Especially in the field of drones, it has extremely important application value in the face of denial environments and satellite signal loss environments. The core idea of ​​scene matching technology is to shoot real-time ground scene images on an air-based platform, compare the captured real-time ground scene images with the pre-stored satellite map images, and determine the location information of the current shooting image by calculating the most similar area.

[0003] The cross-domain scene matching currently used has the following problems:

[0004] First, when extracting features of the target area through cross-domain scene matching, the extracted features are often relatively discrete and do not have highly aggregated semantic features, making it difficult to distinguish the foreground and background of the target area.

[0005] Secondly, when dealing with cross-domain scene matching in all-weather scenarios, although the infrared imaging system has strong anti-interference capabilities when dealing with complex meteorological conditions such as low illumination, rain and fog, the resolution of infrared imaging is low, the imaging color information is single, and the details such as image texture are relatively fuzzy. This leads to large inter-domain differences in imaging between infrared light and visible light, which is not conducive to feature extraction of cross-domain images.

[0006] Thirdly, at present, when conducting cross-domain scene matching simulation experiments, a self-attention mechanism is introduced to learn the image feature information of cross-domain images. The self-attention mechanism can convert cross-domain images into a one-dimensional sequence, and dynamically calculate the attention weight of each element by comparing the representation of each element in the one-dimensional sequence with the representation of all other elements, thereby realizing the attention and weighted fusion of the internal information of the one-dimensional sequence. However, for image processing from a spatial perspective, the self-attention mechanism destroys the transmission change projection relationship between cross-domain images, and for high-resolution images, the self-attention mechanism is computationally expensive, time-consuming, and difficult to achieve lightweight deployment at the edge.

[0007] Therefore, it is necessary to propose a solution to improve one or more problems existing in the above-mentioned related technical solutions.

[0008] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0009] The present application embodiment provides an attention-like cross-domain scene matching method suitable for edge deployment, comprising the following steps:

[0010] Constructing a cross-domain scene matching model, wherein the cross-domain scene matching model includes a connected feature extraction network and a regression constraint network;

[0011] Pre-training the feature extraction network using a public image dataset to obtain pre-trained weights of the feature extraction network;

[0012] Acquire multiple cross-domain images, and perform data enhancement processing on all the cross-domain images to obtain a cross-domain scene data set, wherein the cross-domain scene data set includes a cross-domain scene training set and a cross-domain scene test set, and the cross-domain scene training set and the cross-domain scene test set respectively include multiple real-time scene images and multiple satellite image images;

[0013] Using the cross-domain scene training set to train the cross-domain scene matching model, fine-tuning the pre-training weights, and using the cross-domain scene test set to verify the trained cross-domain scene matching model to obtain a final output result;

[0014] According to the final output result, an image matching algorithm is inferred to obtain a cross-domain scene matching result of the real-time scene map and the satellite image map.

[0015] In an exemplary embodiment of the present application, the step of constructing the feature extraction network includes:

[0016] Multiple sizes The large kernel convolution is split into sequentially connected Convolution kernel, Convolution kernel and Convolution kernel;

[0017] In the After the convolution kernel, add batch normalization layer and activation function in turn. and clipping layers;

[0018] Said Convolution kernel, batch normalization layer, activation function , the clipping layer, the Convolution kernel, and the The convolution kernels are jointly constructed into an attention-like module;

[0019] The feature extraction network includes two networks with the same structure and parameters, wherein each network includes a plurality of the class attention modules;

[0020] Said The convolution kernel size is The dilated convolution kernel of represents the expansion coefficient, represents the convolution coefficient;

[0021] Said The convolution kernel size is The local convolution kernel of

[0022] Said The convolution kernel size is Point convolution kernel of ;

[0023] The expression of each network in the feature extraction network is:

[0024]

[0025] in, express Convolutional layers, It represents the attention-like mechanism constructed by large kernel convolution splitting. The four numbers in the parentheses represent the number of channels, convolution coefficient, expansion coefficient and step size respectively. represents the batch normalization layer, Represents the activation function , Represents the activation function , Represents the clipping layer;

[0026] The expression of the class attention mechanism is: ,in, Represents the output of the attention-like mechanism constructed by large kernel convolution splitting feature map, Represents the first input of the class attention mechanism feature vectors, express Convolution kernel, express Convolution kernel, express Convolution kernel, Represents the calculation of local convolution kernel, Indicates the calculation of the dilated convolution kernel, Represents the calculation of the point convolution kernel.

[0027] In an exemplary embodiment of the present application, the step of pre-training the feature extraction network using a public image dataset to obtain the pre-trained weights of the feature extraction network includes:

[0028] Inputting the public image data set into the feature extraction network, and performing classification training on the feature extraction network using the public image data set, and using the result of the classification training as the pre-training weight;

[0029] The public image dataset includes Dataset.

[0030] In an exemplary embodiment of the present application, the data enhancement process includes randomly changing image contrast, image rotation, image transmission transformation and adding random noise.

[0031] In an exemplary embodiment of the present application, the step of training the cross-domain scene matching model using the cross-domain scene training set, fine-tuning the pre-training weights, and verifying the trained cross-domain scene matching model using the cross-domain scene test set to obtain a final output result includes:

[0032] The feature extraction network is trained using the cross-domain scene training set, wherein the training process is a process of fine-tuning the pre-trained weights to obtain the final weights of the feature extraction network;

[0033] Using the final weights, extracting features from the real-time scene image and the satellite image, and performing deep cross-correlation processing on the extracted features to obtain cross-domain fusion features;

[0034] Analyzing and processing the cross-domain fusion features using the regression constraint network to obtain an analysis and processing result, and verifying the analysis and processing result using the cross-domain scene test set to obtain the final output result;

[0035] The expression of the cross-domain fusion feature is: ,in, represents cross-domain fusion features, Indicates satellite imagery. Indicates the real-time scene graph, represents the deep cross-correlation processing, Represents the final weights of the feature extraction network.

[0036] In an exemplary embodiment of the present application, the step of training the feature extraction network using the cross-domain scene training set includes: freezing the For the convolutional layers and the first type of attention module, only the remaining parameters are trained with gradients.

[0037] In an exemplary embodiment of the present application, the regression constraint network includes Constrained branching and target regression constrained branching;

[0038] Said The response of the constraint branch is expressed as: ,in, express Constrain the branch's response, represents the width of cross-domain fusion features, Indicates the high cross-domain fusion feature, 1 means the number of channels is 1, express The output layer of the constraint branch, express Constraint branches, Represents cross-domain fusion features;

[0039] The response of the target regression constraint branch is expressed as: ,in, represents the response of the target regression constraint branch, 4 represents the number of channels is 4, represents the output layer of the target regression constraint branch, Represents the target regression constraint branch.

[0040] In an exemplary embodiment of the present application, the step of analyzing and processing the cross-domain fusion features using the regression constraint network to obtain the analysis and processing results includes:

[0041] For the The constraint branch is trained using the first loss function, where the expression of the first loss function is:

[0042] (1)

[0043] in, represents the first loss function, express Constrain the branch for each prediction box Predicted value, Indicates the result calculated using the predicted box and the true target box True value, represents the binary cross entropy operation;

[0044] For the target regression constraint branch, a second loss function is used for training, and the expression of the second loss function is:

[0045] (2)

[0046] in, represents the second loss function, , Represents pixel points The vector distance to the upper, lower, left, and right borders of the real target box, Represents pixel Whether it falls within the real target frame, when When both are > 0, ,otherwise, , express Loss function, Indicates that the target regression constraint branch is at the pixel point The response value of

[0047] The final loss function of the regression constraint network is expressed as:

[0048] (3)

[0049] in, represents the final loss function, represents the weight of the first loss function, represents the weight of the second loss function;

[0050] The final loss function is used as the analysis and processing result.

[0051] In an exemplary embodiment of the present application, the step of performing image matching algorithm reasoning according to the final output result to obtain a cross-domain scene matching result of the real-time scene map and the satellite image map includes:

[0052] Using the final loss function, the image matching algorithm is used to infer the real-time scene image and the satellite image to obtain the cross-domain scene matching result;

[0053] The expression of the cross-domain scene matching result is: ,in, Indicates the cross-domain scene matching result, Represents pixel points The absolute distance to the top, bottom, left, and right borders of the ground-truth target box.

[0054] In an exemplary embodiment of the present application, the process of performing the image matching algorithm reasoning includes:

[0055] According to the Prediction value, sort each pixel point from high to low, and after introducing a scale change penalty term at each pixel point, re-sort each pixel point, the re-sorting expression is:

[0056] (4)

[0057] in, Represents pixel The corresponding coordinate positions after reordering, represents the balance weight, represents the scale change penalty term, represents the cosine window, express Constrain the branch for each prediction box Predicted value, Indicates when The pixel corresponding to the maximum value The value of

[0058] Calculate the target pixel and its neighborhood The pixel points correspond to The average value of The average values ​​of are taken as the absolute distances from the target pixel to the upper border, lower border, left border and right border of the real target frame respectively;

[0059] Will The corresponding pixel position is used as the position of the target pixel.

[0060] Beneficial effects:

[0061] The present application provides an attention-like cross-domain scene matching method suitable for edge deployment, which has at least the following beneficial effects:

[0062] (1) This application constructs a feature extraction network with a similar attention mechanism through a large kernel convolution splitting method, which can ensure the accuracy of cross-domain scene matching while being more suitable for edge deployment and real-time solving, thereby improving the real-time solving speed;

[0063] (2) This application enhances the regression capability when distinguishing foreground and background by constructing a regression constraint network, changes the mode of using the maximum value of the response area as the output during the image matching algorithm reasoning process, improves the accuracy and stability of image matching analysis, and especially improves the robustness of drones when performing cross-domain scene matching between infrared light and visible light. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0065] Figure 1 A schematic diagram showing the steps of an attention-like cross-domain scene matching method suitable for edge deployment in an exemplary embodiment of the present application;

[0066] Figure 2 A schematic diagram showing the splitting of a large kernel convolution in an exemplary embodiment of the present application is shown;

[0067] Figure 3 A schematic diagram showing the structure of a class attention module in an exemplary embodiment of the present application is shown;

[0068] Figure 4 A schematic diagram of a process for training and verifying a cross-domain scene matching model using a cross-domain scene dataset to obtain a final output result in an exemplary embodiment of the present application is shown;

[0069] Figure 5 A schematic diagram showing a real-time infrared scene of a first location in an exemplary embodiment of the present application;

[0070] Figure 6 A schematic diagram showing a visible light satellite map image of a first location in an exemplary embodiment of the present application;

[0071] Figure 7 A schematic diagram showing a cross-domain scene matching result of a first location in an exemplary embodiment of the present application;

[0072] Figure 8 A schematic diagram showing a real-time infrared scene of a second location in an exemplary embodiment of the present application;

[0073] Fig. 9 A schematic diagram showing a visible light satellite map image of a second location in an exemplary embodiment of the present application;

[0074] Fig.10 A schematic diagram showing a cross-domain scene matching result of a second location in an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0075] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0076] In addition, the accompanying drawings are only schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0077] This example embodiment provides an attention-like cross-domain scene matching method suitable for edge deployment, such as Figure 1 As shown, the following steps may be included:

[0078] Step S101: constructing a cross-domain scene matching model, wherein the cross-domain scene matching model includes a connected feature extraction network and a regression constraint network.

[0079] Step S102: pre-training the feature extraction network using a public image dataset to obtain pre-trained weights of the feature extraction network.

[0080] Step S103: Acquire multiple cross-domain images, and perform data enhancement processing on all the cross-domain images to obtain a cross-domain scene dataset, wherein the cross-domain scene dataset includes a cross-domain scene training set and a cross-domain scene test set, and the cross-domain scene training set and the cross-domain scene test set respectively contain multiple real-time scene images and multiple satellite image images.

[0081] Step S104: using the cross-domain scene training set to train the cross-domain scene matching model, fine-tuning the pre-training weights, and using the cross-domain scene test set to verify the trained cross-domain scene matching model to obtain a final output result.

[0082] Step S105: performing image matching algorithm reasoning according to the final output result to obtain a cross-domain scene matching result of the real-time scene map and the satellite image map.

[0083] The present application embodiment proposes an attention-like cross-domain scene matching method suitable for edge deployment, which has at least the following beneficial effects:

[0084] (1) This application constructs a feature extraction network with a similar attention mechanism through a large kernel convolution splitting method, which can ensure the accuracy of cross-domain scene matching while being more suitable for edge deployment and real-time solving, thereby improving the real-time solving speed;

[0085] (2) This application enhances the regression capability when distinguishing foreground and background by constructing a regression constraint network, changes the mode of using the maximum value of the response area as the output during the image matching algorithm reasoning process, improves the accuracy and stability of image matching analysis, and especially improves the robustness of drones when performing cross-domain scene matching between infrared light and visible light.

[0086] Next, a method for cross-domain scene matching similar to attention suitable for edge deployment proposed in this example embodiment will be described in more detail.

[0087] In order to meet the all-weather scene matching needs of air-based platforms, it is necessary to solve the cross-domain scene matching and edge real-time settlement problems, as follows:

[0088] First, the feature representation of infrared images and visible light images is inconsistent when performing cross-domain scene matching. The existing attention mechanism has the problem of large amount of computation and difficult edge deployment. It is necessary to fully explore the global and local feature relationships between cross-domain scenes and improve the learning ability and feature representation ability of convolutional networks.

[0089] Second, in order to address the problem that the semantic information of the target area is discrete and it is difficult to distinguish the foreground and background in the cross-domain scene matching task, it is necessary to extract the information correlation between the scene features in the target area to improve the matching accuracy and robustness of the scene matching task from an air-based perspective.

[0090] To this end, this application proposes an attention-like cross-domain scene matching method suitable for edge deployment.

[0091] In step S101 of this embodiment, a cross-domain scene matching model is constructed, and the cross-domain scene matching model includes a feature extraction network and a regression constraint network connected in sequence.

[0092] Furthermore, a feature extraction network with a similar attention mechanism is constructed here by using the large kernel convolution splitting method. The construction process includes:

[0093] First, multiple sizes are The large kernel convolution is split into sequentially connected Convolution kernel, Convolution kernel and Convolution kernel.

[0094] Then, if Figure 3 As shown, in Add batch normalization layer and activation function after the convolution kernel and clipping layers, these added parts are separated from Convolution kernel, Convolution kernel and Convolution kernels, together constitute an attention-like module.

[0095] Should The convolution kernel size is The dilated convolution kernel of represents the expansion coefficient, Represents the convolution coefficient.

[0096] Should The convolution kernel size is The local convolution kernel.

[0097] Should The convolution kernel size is The point convolution kernel.

[0098] It should be noted that Figure 3 middle That is the clipping layer, use To express. Figure 3 The GELU in is the activation function , Figure 3 In It is the batch normalization layer, express. Figure 3 In Represents the attention-like mechanism constructed by large kernel convolution splitting.

[0099] In this embodiment, in order to fully extract the global and local image feature information of the cross-domain scene, multiple attention-like modules are constructed. Thus, the output layer of the feature extraction network can fully obtain the correlation between each pixel of the image and its neighborhood, improve the global attention and local feature learning of the cross-domain scene matching model, and reduce the computational complexity of the cross-domain scene matching model, which is convenient for the deployment of the cross-domain scene matching model at the edge.

[0100] In this way, the expression of each network in the feature extraction network is:

[0101]

[0102] in, express Convolutional layers, It represents the attention-like mechanism constructed by large kernel convolution splitting. The four numbers in the parentheses represent the number of channels, convolution coefficient, expansion coefficient and step size respectively. represents the batch normalization layer, Represents the activation function , Represents the activation function , Represents a clipping layer.

[0103] The expression of this type of attention mechanism is: ,in, Represents the output of the attention-like mechanism constructed by large kernel convolution splitting feature map, Represents the first input of the class attention mechanism feature vectors, express Convolution kernel, express Convolution kernel, express Convolution kernel, Represents the calculation of local convolution kernel, Indicates the calculation of the dilated convolution kernel, Represents the calculation of the point convolution kernel.

[0104] Finally, the constructed feature extraction network includes two networks with the same structure and parameters, where each network includes multiple attention-like modules.

[0105] Furthermore, twin network matching based on deep learning is mainly divided into two methods: the first method is to use the real-time scene map and satellite image map to directly compare the extracted feature map after extracting the image features, output the area with the largest response on the feature map, that is, the area with the most similar image features, and reversely map it back to the original image as the determined image matching position. The second method is to use the feature map extracted by the image feature extraction network for regression calculation, and predict the matching result by directly predicting the distance from the matching point to the four sides of the real target border.

[0106] In this embodiment, since cross-domain scene matching is performed under the perspective of airborne observation, there are uncertain factors such as scale change and perspective difference, so the second method is used to match cross-domain scenes. A regression constraint network is constructed. The regression constraint network includes Constrained branching and target regression constrained branching.

[0107] The response of the constraint branch is expressed as: ,in, express Constrain the branch's response, represents the width of cross-domain fusion features, Indicates the high cross-domain fusion feature, 1 means the number of channels is 1, express The output layer of the constraint branch, express Constraint branches, Represents cross-domain fusion features.

[0108] The response of the target regression constraint branch is expressed as: ,in, represents the response of the target regression constraint branch, 4 represents the number of channels is 4, represents the output layer of the target regression constraint branch, Represents the target regression constraint branch.

[0109] In step S102 of this embodiment, it is first necessary to collect and filter out the required public image dataset in the network, and use the public image dataset to pre-train the feature extraction network to obtain the pre-trained weights of the feature extraction network.

[0110] Furthermore, the pre-training process includes: inputting a public image dataset into a feature extraction network, preferably dataset, and using The dataset performs classification training on the feature extraction network and uses the results of the classification training as pre-training weights.

[0111] In step S103 of this embodiment, since the number of public cross-domain scene matching data sets is limited, in order to expand the data samples, it is necessary to use a dual-light pod drone equipped with infrared light and visible light to take aerial photos of multiple cross-domain images with different geographical environments and scene environments. The shooting areas include fields, cities, rivers and other areas.

[0112] At the same time, in order to make the feature distribution of the final cross-domain scene dataset more comprehensive, data enhancement processing was performed on the multiple cross-domain images taken.

[0113] Furthermore, the data enhancement processing includes randomly changing the image contrast, image rotation and image transmission transformation, adding random noise and the like.

[0114] In step S104 of this embodiment, Figure 4 As shown, Figure 4 It is shown that the cross-domain scene matching model is trained using the cross-domain scene training set, the pre-training weights are fine-tuned, and the trained cross-domain scene matching model is verified using the cross-domain scene test set to obtain the final output result. In this embodiment, step S104 may include the following sub-steps:

[0115] Sub-step S1041: train the feature extraction network using the cross-domain scene training set. The training process is the process of fine-tuning the pre-training weights to obtain the final weights of the feature extraction network.

[0116] This embodiment gives a specific example: Figure 2 As shown, for a convolution coefficient of The convolution kernel is split into a dilation coefficient , size is A dilated convolution kernel of size A local convolution kernel of size The point convolution kernel.

[0117] In the feature extraction network training stage, the present embodiment fully extracts the global image features and local image feature information of the cross-domain scene, respectively. and The two large kernel convolutions are split: When the large kernel convolution is split, the expansion coefficient , after splitting, an expansion coefficient is formed , size is A dilated convolution kernel of size A local convolution kernel of size Point convolution kernel. When the large kernel convolution is split, the expansion coefficient , after splitting, an expansion coefficient is formed , size is A dilated convolution kernel of size A local convolution kernel of size The point convolution kernel.

[0118] Furthermore, in the process of performing sub-step S1041, it is necessary to freeze the first two layers of parameters in each network of the feature extraction network, that is, For the convolutional layer and the first attention-like module layer, only the remaining parameters are trained with gradients.

[0119] Sub-step S1042: extract features from the real-time scene image and the satellite image using the final weights, and perform deep cross-correlation processing on the extracted features to obtain cross-domain fusion features.

[0120] Furthermore, the expression of the cross-domain fusion feature is: ,in, represents cross-domain fusion features, Indicates satellite imagery. Indicates the real-time scene graph, represents the deep cross-correlation processing, Represents the final weights of the feature extraction network.

[0121] Sub-step S1043: using the regression constraint network to analyze and process the cross-domain fusion features to obtain analysis and processing results, including the following processes:

[0122] for The constraint branch uses the first loss function for training. The expression of the first loss function is:

[0123] (1)

[0124] in, represents the first loss function, express Constrain the branch for each prediction box Predicted value, Indicates the result calculated using the predicted box and the true target box True value, Represents the binary cross entropy operation.

[0125] For the target regression constraint branch, the second loss function is used for training. The expression of the second loss function is:

[0126] (2)

[0127] in, represents the second loss function, , Represents pixel points The vector distance to the upper, lower, left, and right borders of the real target box, Represents pixel Whether it falls within the real target frame, when When both are > 0, ,otherwise, , express Loss function, Indicates that the target regression constraint branch is at the pixel point The response value of .

[0128] The final loss function of the regression constraint network is expressed as:

[0129] (3)

[0130] in, represents the final loss function, represents the weight of the first loss function, represents the weight of the second loss function. In this embodiment, the balance weight is set to 0.1, the cosine window is set to 0.4, and the penalty coefficient is set to 0.04. .

[0131] The final loss function is used as the analysis result.

[0132] Sub-step S1044: verify the analysis and processing results using the cross-domain scene test set to obtain the final output result.

[0133] In step S105 of this embodiment, image matching algorithm reasoning is performed based on the final output result to obtain a cross-domain scene matching result of the real-time scene map and the satellite image map.

[0134] Using the final loss function, the image matching algorithm is inferred for the real-time scene map and the satellite image map to obtain the cross-domain scene matching result. The cross-domain scene matching result is a cross-domain scene matching atlas synthesized by the corresponding matching of all real-time scene maps and all satellite image maps, that is, the cross-domain scene matching atlas includes multiple pairs of cross-domain scene matching maps, and each pair of cross-domain scene matching maps includes a real-time scene map and a corresponding satellite image map.

[0135] Furthermore, the expression of the cross-domain scene matching result is: ,in, Indicates the cross-domain scene matching result, Represents pixel points The absolute distance to the top, bottom, left, and right borders of the ground-truth target box.

[0136] The expression In essence, it is a column vector synthesized by the corresponding matching of the real-time scene map and the satellite image map.

[0137] Furthermore, in order to solve the problem of jitter between adjacent frames in the real matching process, the following steps need to be performed during the image matching algorithm reasoning process:

[0138] First, according to Prediction value, sort each pixel from high to low, and after introducing the scale change penalty term at each pixel, re-sort each pixel. The expression of the re-sort is:

[0139] (4)

[0140] in, Represents pixel The corresponding coordinate positions after reordering, represents the balance weight, represents the scale change penalty term, represents the cosine window, express Constrain the branch for each prediction box Predicted value, Indicates when The pixel corresponding to the maximum value The value of .

[0141] Then, calculate the target pixel and its neighborhood The pixels correspond to The average value of The average values ​​of are taken as the absolute distances from the target pixel to the upper border, lower border, left border, and right border of the true target box.

[0142] Finally, The corresponding pixel position is taken as the position of the target pixel.

[0143] Here, different matching algorithms are used for comparison on the cross-domain scene test set. The comparison results are shown in Table 1 below:

[0144] Table 1: Comparison results of different matching algorithms

[0145]

[0146] In Table 1, the SOMatch algorithm, the OS-FPI algorithm and the OSMNet algorithm are all commonly used cross-domain scene matching algorithms in the art, and this application will not describe these three algorithms in detail.

[0147] In Table 1, MIoU represents the average intersection over union ratio between the predicted target box and the true target box; Success represents mAP represents the average L2 distance between the center point of the predicted target box and the center point of the real target box; CMR represents the proportion of the center point pixel deviation less than 10 pixels; Params represents the model parameter amount. As can be seen from Table 1, although the model parameter amount of the algorithm proposed in this application is slightly larger than that of the OS-FPI algorithm, compared with all the listed algorithms, this application has a more accurate matching effect in terms of various indicators related to matching accuracy.

[0148] like Figure 5 , Figure 6 , Figure 7 , Figure 8 , Fig. 9 and Fig.10 As shown, infrared real-time scene shooting and visible light satellite map image shooting are performed on the first location and the second location respectively, and then cross-domain scene matching is performed on the two locations respectively, and cross-domain matching result diagrams of the two locations are obtained respectively. It can be clearly seen that the cross-domain scene matching method suitable for edge deployment proposed in this application can effectively realize cross-domain scene matching, and the matching judgment box can change with the altitude and scale of the drone.

[0149] This application effectively utilizes the advantages of large kernel convolution splitting, achieves the beneficial effects of the attention-like mechanism, and designs a feature extraction network with the attention-like mechanism based on this. Compared with the existing methods, this application is more suitable for edge deployment and real-time solution while ensuring matching accuracy. At the same time, this application constructs a regression constraint network, which enhances the regression ability when dealing with the problem of difficult foreground and background distinction, changes the previous mode of using the maximum value of the response area as the output, and improves the accuracy and stability of cross-domain scene matching.

[0150] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0151] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification.

[0152] The above description is only a specific implementation manner of the present application, but the protection scope of the present application 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 application, and these modifications or substitutions should be included in the protection scope of the present invention.

[0153] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application.

Claims

1. An attention-like cross-domain scene matching method suitable for edge deployment, It is characterized in that The following steps are involved: Constructing a cross-domain scene matching model, wherein the cross-domain scene matching model includes a connected feature extraction network and a regression constraint network; Pre-training the feature extraction network using a public image dataset to obtain pre-trained weights of the feature extraction network; Acquire multiple cross-domain images, and perform data enhancement processing on all the cross-domain images to obtain a cross-domain scene data set, wherein the cross-domain scene data set includes a cross-domain scene training set and a cross-domain scene test set, and the cross-domain scene training set and the cross-domain scene test set respectively include multiple real-time scene images and multiple satellite image images; Using the cross-domain scene training set to train the cross-domain scene matching model, fine-tuning the pre-training weights, and using the cross-domain scene test set to verify the trained cross-domain scene matching model to obtain a final output result; According to the final output result, an image matching algorithm is inferred to obtain a cross-domain scene matching result of the real-time scene map and the satellite image map; The steps of constructing the feature extraction network include: Split multiple large kernel convolutions of size k×k into sequentially connected DConv convolution kernels, Conv convolution kernels, and Conv 1×1 Convolution kernel; In the Conv 1×1 The batch normalization layer, activation function GELU and cropping layer are added after the convolution kernel in sequence; The Conv 1×1 The convolution kernel, the batch normalization layer, the activation function GELU, the cropping layer, the DConv convolution kernel, and the Conv convolution kernel together constitute a class attention module; The feature extraction network includes two networks with the same structure and parameters, wherein each network includes a plurality of the class attention modules; The DConv convolution kernel represents a dilated convolution kernel of size (k / d)×(k / d), where d represents the dilation coefficient and k represents the convolution coefficient; The Conv convolution kernel represents a local convolution kernel of size (2d-1)×(2d-1); The Conv 1×1 The convolution kernel represents a point convolution kernel of size 1×1; The expression of each network in the feature extraction network is: {CNN(3,7,1,2)BR}-{LKA(64,13,3,1)BGC}-{LKA(128,13,3,1)BGC} -{LKA(320,9,2,1)BGC}-{LKA(512,9,2,1)BGC} Among them, CNN represents the CNN convolution layer, LKA represents the attention-like module constructed by large kernel convolution splitting, the four numbers in the parentheses represent the number of channels, convolution coefficient, expansion coefficient and step size respectively, B represents the batch normalization layer, R represents the activation function RELU, G represents the activation function GELU, and C represents the cropping layer; The expression of the class attention module is: LKA x =Conv 1×1 (DConv(Conv(F n ))), among which, LKA x represents the x-th feature map output by the attention-like module constructed by the large kernel convolution split, F n represents the nth feature vector of the attention-like module input, Conv(·) represents the calculation of the local convolution kernel, DConv(·) represents the calculation of the hole convolution kernel, Conv 1×1 (·) indicates the calculation of the point convolution kernel.

2. According to the attention-like cross-domain scene matching method suitable for edge deployment according to claim 1, It is characterized in that The step of pre-training the feature extraction network using a public image dataset to obtain pre-trained weights of the feature extraction network comprises: Inputting the public image data set into the feature extraction network, and performing classification training on the feature extraction network using the public image data set, and using the result of the classification training as the pre-training weight; Wherein, the public image dataset includes the ImageNet dataset.

3. According to claim 2, the attention-like cross-domain scene matching method suitable for edge deployment, It is characterized in that The data enhancement process includes randomly changing image contrast, image rotation, image transmission transformation and adding random noise.

4. According to claim 3, the attention-like cross-domain scene matching method suitable for edge deployment, It is characterized in that The step of training the cross-domain scene matching model by using the cross-domain scene training set, fine-tuning the pre-training weights, and verifying the trained cross-domain scene matching model by using the cross-domain scene test set to obtain a final output result comprises: The feature extraction network is trained using the cross-domain scene training set, wherein the training process is a process of fine-tuning the pre-trained weights to obtain the final weights of the feature extraction network; Using the final weights, extracting features from the real-time scene image and the satellite image, and performing deep cross-correlation processing on the extracted features to obtain cross-domain fusion features; Analyzing and processing the cross-domain fusion features using the regression constraint network to obtain an analysis and processing result, and verifying the analysis and processing result using the cross-domain scene test set to obtain the final output result; The expression of the cross-domain fusion feature is: Among them, F represents the cross-domain fusion feature, I map Indicates satellite imagery, I p represents the real-time scene graph, ⊙ represents the depth cross-correlation processing, Represents the final weights of the feature extraction network.

5. According to claim 4, the attention-like cross-domain scene matching method suitable for edge deployment, It is characterized in that The step of training the feature extraction network using the cross-domain scene training set includes: freezing the CNN convolutional layer and the first attention-like module in each network of the feature extraction network, and only performing gradient training on the remaining parameters.

6. According to claim 5, the attention-like cross-domain scene matching method suitable for edge deployment, It is characterized in that The regression constraint network includes an IoU constraint branch and a target regression constraint branch; The response of the IoU constraint branch is expressed as: in, represents the response of the IoU constraint branch, w represents the width of the cross-domain fusion feature, h represents the height of the cross-domain fusion feature, 1 represents the number of channels is 1, C IoU represents the output layer of the IoU constraint branch, f IoU represents the IoU constraint branch, and F represents the cross-domain fusion feature; The response of the target regression constraint branch is expressed as: in, represents the response of the target regression constraint branch, 4 represents the number of channels is 4, C reg represents the output layer of the target regression constraint branch, f reg Represents the target regression constraint branch.

7. According to claim 6, the attention-like cross-domain scene matching method suitable for edge deployment, It is characterized in that The step of analyzing and processing the cross-domain fusion features by using the regression constraint network to obtain the analysis and processing results comprises: For the IoU constraint branch, a first loss function is used for training, and the expression of the first loss function is: Among them, L BCE represents the first loss function, Represents the IoU prediction value of each prediction box by the IoU constraint branch, IoU i,j represents the true IoU value calculated using the predicted box and the true target box, and BCE(·) represents the binary cross entropy operation; For the target regression constraint branch, a second loss function is used for training, and the expression of the second loss function is: Among them, L reg represents the second loss function, d(i,j)=(l * ,r * ,t * ,b * ), l * ,r * ,t * ,b * They represent the vector distances from the pixel point (i, j) to the upper border, lower border, left border, and right border of the real target box, respectively. δ(i, j) represents the judgment form of whether the pixel point (i, j) falls within the real target box. When l * ,r * ,t * ,b * When both are greater than 0, δ(i,j)=1, otherwise, δ(i,j)=0, L IoU represents the IoU loss function, R reg (i,j,l * ,r * ,t * ,b * ) represents the response value of the target regression constraint branch at pixel point (i, j); The final loss function of the regression constraint network is expressed as: L=λ 1 L BCE +λ 2 L reg (3) Among them, L represents the final loss function, λ 1 represents the weight of the first loss function, λ 2 represents the weight of the second loss function; The final loss function is used as the analysis and processing result.

8. According to claim 7, the attention-like cross-domain scene matching method suitable for edge deployment, It is characterized in that The step of performing image matching algorithm reasoning according to the final output result to obtain a cross-domain scene matching result of the real-time scene map and the satellite image map comprises: Using the final loss function, the image matching algorithm is used to infer the real-time scene image and the satellite image to obtain the cross-domain scene matching result; The expression of the cross-domain scene matching result is: Among them, Vector represents the cross-domain scene matching result, l, r, t, b represent the absolute distance from the pixel point (i, j) to the upper border, lower border, left border and right border of the real target box respectively.

9. According to claim 8, the attention-like cross-domain scene matching method suitable for edge deployment, It is characterized in that The process of performing the image matching algorithm reasoning includes: According to the IoU prediction value, each pixel point is sorted from high to low, and after introducing a scale change penalty term at each pixel point, each pixel point is reordered. The expression of the reordering is: Among them, q represents the coordinate position of the pixel point (i, j) after reordering, λ d represents the balance weight, P i,j represents the scale change penalty term, H represents the cosine window, Represents the IoU prediction value of each prediction box by the IoU constraint branch, Indicates when The value of the pixel point (i, j) corresponding to the maximum value; Calculate the average values ​​of l, r, t, and b corresponding to the target pixel and the m pixel points in the neighborhood of the target pixel, and use the average values ​​of l, r, t, and b as the absolute distances from the target pixel to the upper border, lower border, left border, and right border of the real target frame; The pixel position corresponding to q is used as the position of the target pixel.