Polarimetric SAR image registration method based on attention mechanism
Through polarization whitening filtering and deep feature descriptor matching, combined with the twin attention network, the problem of inconspicuous key point selection and low accuracy in polarimetric SAR image registration in the existing technology is solved, achieving more efficiency and accuracy. Polarimetric SAR image registration.
Patent Information
- Application Number
- CN202211653564.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-21
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-12-21
AI Technical Summary
Existing polarimetric SAR image registration methods fail to make full use of polarization data when using amplitude maps to determine image key points and construct feature descriptors, resulting in inconspicuous and uneven key point selection and poor registration timeliness. The accuracy is not high.
The edge data processed by polarization whitening filtering is used for adaptive constraints, morphological erosion and non-maximum suppression, and deep feature descriptors and twin attention networks are combined for matching to improve the registration efficiency and accuracy of polarimetric SAR images.
Through polarization whitening filtering and deep feature descriptor matching, coherence patch noise interference is reduced, the reliability of edge data and point selection speed are improved, the robustness of feature descriptors is enhanced, and the configuration of polarimetric SAR images is significantly improved. Accurate efficiency and precision.
Smart Images

Figure CN116363175B
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of polarimetric SAR image registration, and in particular to a polarimetric SAR image registration method based on an attention mechanism. Background Art
[0002] Synthetic Aperture Radar (SAR) is an active microwave sensor with a certain penetration capability. It can obtain ground information all day and all weather without being affected by weather conditions. Polarimetric Synthetic Aperture Radar (SAR) has different polarization working modes and can use SAR complex images in different polarization channels to analyze target attributes, such as target shape, structure, direction, etc.
[0003] However, the polarimetric SAR imaging process will be interfered by various internal and external factors, such as system factors and environmental factors. These interferences will limit the acquisition of multi-phase polarimetric SAR images in the same area, resulting in differences in resolution, angle, etc., which will affect subsequent processing and applications. Therefore, it is necessary to align two or more polarimetric SAR images with differences to eliminate the differences caused by factors such as angle, resolution, and sensor, and to prepare for subsequent applications.
[0004] The existing polarimetric SAR image registration methods are generally divided into the following three types: region-based registration methods, feature-based registration methods, and deep learning registration methods. Currently, most feature-based registration methods use amplitude maps to determine image key points and construct feature descriptors, without fully utilizing the polarization information of polarization data, resulting in problems such as insignificant and uneven key point selection, poor registration timeliness, and low registration accuracy. Other related prior arts include: CN110458876A "Multi-phase POLSAR image registration method based on SAR-SIFT features", and CN102520407A "Polarization interferometric SAR image registration method based on optimal linearity of coherence coefficient". Summary of the invention
[0005] The embodiment of the present invention provides a polarimetric SAR image registration method, device and medium based on an attention mechanism, which implements fast point selection by adaptively constraining edge data after polarimetric whitening filtering, performing morphological corrosion and non-maximum suppression, and uses deep feature descriptors for matching, thereby improving the registration efficiency and accuracy of polarimetric SAR images.
[0006] In a first aspect, an embodiment of the present invention provides a polarimetric SAR image registration method based on an attention mechanism, comprising:
[0007] Polarization whitening filtering is performed on two different polarization SAR images of the same scene to obtain respective filtered images, wherein both polarization SAR images are C3 data, and the filtered images include edge and texture information of the polarization SAR images;
[0008] Performing adaptive threshold constraint, morphological erosion and non-maximum suppression operations on the two filtered images to determine key points with significant features in the two polarimetric SAR images;
[0009] The data blocks of set sizes around each key point in the two polarized SAR images are respectively input into two branches of the trained twin attention network for deep feature extraction to obtain the deep feature descriptors of each key point. The trained twin attention network can make the deep feature descriptors of the matched key points tend to be consistent;
[0010] Using a brute force matching method and a random sampling consensus algorithm, the depth feature descriptors of the key points in the two polarimetric SAR images are matched to obtain a perspective transformation matrix from one polarimetric SAR image to another polarimetric SAR image;
[0011] The perspective transformation matrix is used to transform the one polarimetric SAR image into a registered image having coordinates consistent with those of the other polarimetric SAR image.
[0012] In a second aspect, an embodiment of the present invention provides an electronic device, the electronic device comprising:
[0013] one or more processors;
[0014] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the polarization SAR image registration methods based on the attention mechanism.
[0015] In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium, including:
[0016] a memory storing one or more computer programs;
[0017] When the stored program is executed by the processor, any of the polarization SAR image registration methods based on the attention mechanism is implemented.
[0018] The technical effects of the embodiments of the present invention are as follows:
[0019] 1. This embodiment performs polarization whitening filtering on the polarimetric SAR image to obtain edge data after image denoising, and then performs threshold constraints on it. The threshold value is generated by adaptive calculation to obtain the constrained edge data, and then further performs morphological corrosion and non-maximum suppression operations on it to obtain the final selected key points. This point selection method, on the one hand, reduces the interference of coherent speckle noise, making the acquired edge data more reliable; on the other hand, the point selection speed is very fast, and most of the selected key points are in the edge and texture area of the image, and the number of selected points can be controlled by the non-maximum suppression method, which is flexible.
[0020] 2. This embodiment uses the twin attention network to extract the deep features of the data block and construct the deep feature descriptor. The two branches of the twin attention network share training parameters to improve training efficiency and training quality. The network input data is the C3 data of the polarization SAR image, which fully utilizes the scattering information of the ground object target in the polarization SAR image data. Compared with training only with image amplitude information, it can fully learn the scattering characteristics of the ground object target, which is more suitable for learning the deep features of the polarization SAR image. At the same time, it can better extract the deep features of the polarization SAR image, and the constructed deep feature descriptor is more robust. At the same time, the key point is taken as the center, and the image block of 32×32 size around it is selected to construct the feature descriptor of the point. There is no need to input a fixed-size image, which can further improve the registration performance.
[0021] 3. Combining the above measures can effectively improve the registration efficiency and accuracy of polarimetric SAR images. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flow chart of a polarization SAR image registration method based on an attention mechanism provided by an embodiment of the present invention;
[0023] Figure 2 It is a flow chart of a polarization SAR image registration method based on an attention mechanism provided by an embodiment of the present invention;
[0024] Figure 3 is a flowchart of key point selection provided by an embodiment of the present invention;
[0025] Figure 4 is a schematic diagram of the structure of a channel attention module provided by an embodiment of the present invention;
[0026] Figure 5 is a schematic diagram of the structure of a spatial attention module provided by an embodiment of the present invention;
[0027] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described clearly and completely below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0029] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0030] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0031] Figure 1 This is a flow chart of a polarimetric SAR image registration method based on an attention mechanism provided by an embodiment of the present invention. This method is implemented based on a twin attention network based on deep learning. In order to illustrate this method, the twin attention network model that supports the implementation of this method is first described. Figure 1As shown, the structure of the twin attention network is shown in the largest dotted box in the middle. It can be seen that the network includes two branches with the same structure, and the branches share weights. Each branch includes a first convolution module, a first hybrid attention module, a second convolution module, a second hybrid attention module and a third convolution module. The first convolution module is used to extract features from the input data block to obtain a feature map; the first hybrid attention module is used to perform feature aggregation and attention weighting on the feature map in the channel and spatial dimensions to obtain a shallow feature map. The second convolution module extracts features from the shallow feature map and reduces the size to obtain another feature map; the second hybrid attention module further aggregates features and weights the attention on the other feature map in the channel and spatial dimensions to obtain a deep feature map; through the third hybrid attention module, the deep feature map is extracted and reduced in size to obtain a deep feature descriptor. For the convenience of distinction and description, the feature map output by the first convolution module is called the first feature map, and the feature map output by the second convolution module is called the second feature map.
[0032] Each hybrid attention module includes a channel attention module and a spatial attention module connected in sequence. The input feature map of the hybrid attention module is directly input into the channel attention module, the output feature map of the channel attention module is the input feature map of the spatial attention module, and the output feature map of the spatial attention module is the output feature map of the entire hybrid attention module. Furthermore, the channel attention module is used to obtain the relationship between the channels of the input feature map, recalibrate the input feature map in the channel dimension based on the attention mechanism, strengthen the significant features therein, suppress the non-significant features therein, and obtain the output feature map. The spatial attention module is used to obtain the spatial information of the input feature map, recalibrate the output feature map of the channel attention module in the spatial dimension based on the attention mechanism, strengthen the significant features therein, suppress the non-significant features therein, and obtain the output feature map of the spatial attention module. The specific structure and function of each module will be described in detail in subsequent embodiments.
[0033] Based on the above twin attention network, Figure 2 This is a flow chart of another polarization SAR image registration method based on the attention mechanism provided by an embodiment of the present invention. The method is applicable to the case of registering different polarization SAR images in the same scene. The method is executed by an electronic device, and the specific method includes the following steps:
[0034] S110, performing polarization whitening filtering on two different polarization SAR images of the same scene respectively to obtain respective filtered images, wherein both polarization SAR images are C3 data, and the filtered images include edge and texture information of the polarization SAR images.
[0035] The scene here refers to the content presented by the polarimetric SAR image, which can be a certain area or the same building, etc. The two different polarimetric SAR images are the data source of the entire registration method. They can be polarimetric SAR images acquired by different sensors, or two polarimetric SAR images with different bands or different illumination angles. Furthermore, any one of the two polarimetric SAR images can be used as a reference image, and the other as the image to be registered. The process of image registration is to convert the image to be registered into a registered image with the same coordinates as the reference image.
[0036] Different from the prior art that uses SAR amplitude maps for image registration, the polarimetric SAR image used as the data source in this embodiment is C3 data. The original polarimetric SAR image data is generally a polarimetric scattering matrix S, which contains all polarimetric information of ground objects. C3 data refers to polarimetric covariance matrix data, which is calculated based on the polarimetric scattering matrix S. C3 data includes 9 channels, which correspond to 9 parameters of the polarimetric covariance matrix, each of which has a physical meaning, such as intensity, phase, energy, backscattering, electromagnetic scattering, etc. Among them, phase information and scattering information are both unique to C3 data, and play an important role in the accuracy of subsequent image registration. In addition, C3 data is calculated based on the scattering matrix S, and the data accuracy is all double type, which has a more detailed description of ground object information.
[0037] After acquiring two polarimetric SAR images in the form of C3 data, polarimetric whitening filtering is performed on the two polarimetric SAR images respectively, in order to reduce the influence of speckle noise in the polarimetric SAR images and obtain the edge and texture data of the polarimetric SAR images for selecting key points in subsequent images. All elements in the polarimetric covariance matrix are optimally combined; the speckle noise in the image is reduced, the edge and texture area of the image is determined, and the edge data of the image is generated. Specifically, by combining the elements in the polarimetric covariance matrix, the ratio of the standard deviation s to the mean m of the image is minimized, so that the speckle noise in the image can be reduced and the edge and texture information of the image can be obtained.
[0038] S120, performing adaptive threshold constraint, morphological erosion and non-maximum suppression operations on the two filtered images to determine key points with significant features in the two polarimetric SAR images.
[0039] The filtered image includes the edge and texture information of the polarimetric SAR image. In this step, adaptive constraint, morphological erosion and non-maximum suppression operations are performed on each filtered image in sequence. Under the joint action of the above operations, key points with significant features in each filtered image are obtained as the key points of each polarimetric SAR image.
[0040] In an optional implementation, for any filtered image, an adaptive threshold of the filtered image is first calculated. Specifically, the average intensity value of all pixels in the filtered image is calculated and divided by 2 to obtain an adaptive constraint threshold, which represents the degree of constraint on the brightness of the image.
[0041] Then, the filtered image is subjected to morphological corrosion processing using the adaptive threshold. Specifically, for data greater than the adaptive threshold, a flat circular corrosion kernel with a radius of 1 is used for morphological corrosion; for data less than or equal to the adaptive threshold, no morphological corrosion processing is performed. The eroded image includes more refined edge and texture information.
[0042] Finally, non-maximum suppression is performed on the eroded image to obtain key points with significant features in the filtered image as key points with significant features in the corresponding polarimetric SAR image. Specifically, after non-maximum suppression, the key points to be retained are determined based on the actual registration requirements. Assuming that the number of key points to be retained in the actual registration requirements is M, non-maximum suppression is used to select the M points with the strongest response intensity from the eroded image as the key points, where M is a natural number. The entire key point selection process is as follows: Figure 3 shown.
[0043] S130. Data blocks of set sizes around each key point in the two polarized SAR images are respectively input into two branches of the trained twin attention network for deep feature extraction to obtain deep feature descriptors of each key point. The trained twin attention network can make the deep feature descriptors of the matched key points tend to be consistent.
[0044] The twin attention network is as follows Figure 1 As shown. A data block of a set size around each key point in any polarimetric SAR image is input into one of the branches, and a data block of a set size around each key point in another polarimetric SAR image is input into another branch. Each branch will perform deep feature extraction on the input data block to obtain a deep feature description of the data block. A deep feature descriptor refers to a feature vector of a preset dimension, which is used to characterize the deep features of a data block. It can be seen that each key point will have a deep feature descriptor. The trained twin attention network can make the matching key points in the two SAR images obtain deep feature descriptors that are as similar as possible for key point matching.
[0045] In an optional implementation, the process of generating a deep feature descriptor of any key point in any polarimetric SAR image includes: extracting a data block of a set size around the key point as the center and inputting it into any branch of the twin attention network. Optionally, the set size is 32×32. In the branch, the data block is operated as follows:
[0046] Step 1: Extract features from the data block through the first convolution module to obtain a first feature map. The feature map includes information such as texture, edge, structure, etc. of the image. Figure 1 As shown, the first convolution module includes three 3×3 convolution layers connected sequentially with a step size of 1. The size of the image is not changed. The three convolution layers gradually extract the features of the data blocks. As the network depth increases, the extracted features are different.
[0047] Step 2: Through the first hybrid attention module, feature aggregation and attention weighting are performed on the first feature map in the channel and spatial dimensions to obtain a shallow feature map. The first hybrid attention module can extract relatively obvious information in the polarization SAR image, such as building outlines, road boundaries, etc. In order to distinguish it from the information extracted by the second hybrid attention module, this information is called shallow information. Compared with the texture, edge, and structural information in the first feature map in step one, the shallow information in this step has a deeper network level, and the depth of information is also relatively deepened.
[0048] In an optional embodiment, the channel attention module includes a global average pooling layer and two 1×1 convolutional layers, such as Figure 4As shown. After the first feature map is input into the channel attention module, it is first used as the input feature map U of the global average pooling layer, in which the spatial dimension is compressed to obtain a one-dimensional feature vector, which contains the global features of the channel direction. The global average pooling layer plays the role of aggregating feature maps, and this feature vector can be understood as a channel descriptor. Since the original data is the C3 data of the polarization SAR image, which contains the polarization information of the ground object, the channel descriptor embeds the global distribution of the channel direction feature response, so that the information from the global receptive field of the network can be used by its lower layers, and the polarization scattering feature information can be effectively combined in the channel dimension. After obtaining the one-dimensional feature vector, the vector is input into the two 1×1 convolutional layers connected in sequence to learn the attention weights of each channel, so that the model has a stronger ability to distinguish the features of each channel. Specifically, this part can learn the nonlinear relationship between each channel and the learned relationship is not mutually exclusive; in order to reduce the complexity of the model and improve the generalization ability, the first 1×1 convolution layer plays a role in dimensionality reduction in the channel dimension. The convolution result is activated by the ReLU function. The second 1×1 convolution layer is used to restore the original dimension in the channel dimension. Finally, the weight value of each channel learned (activated by the Sigmoid function) is multiplied by the input feature U to obtain a new feature after channel attention weighting. Its dimension and size are the same as the input feature U, which realizes the recalibration of the input feature U in the channel dimension. Furthermore, the data of each channel represents different features, and each feature provides different help to network learning. Therefore, the attention weight of each channel increases with the increase of the significance of each channel feature. By weighting each channel through channel attention, the channel features with strong significance can be strengthened, making the effective features more significant, while suppressing the channel features with weak significance, making the invalid features weaker. For the convenience of distinction and description, the feature map output by the channel attention module is called the third feature map.
[0049] In another optional embodiment, the spatial attention module includes a maximum pooling layer, an average pooling layer and a 7×7 convolutional layer, such as Figure 5As shown. After the output feature map F of the channel attention module is input into the spatial attention module, it is respectively input into the maximum pooling layer and the average pooling layer. In the maximum pooling layer, maximum pooling is performed along the channel dimension. In the average pooling layer, average pooling is performed along the channel dimension. The two pooling results are connected to obtain a spatial feature map of 2 channels, which is also a feature descriptor. The feature descriptor is input into the 7×7 convolution layer (the activation function is Sigmoid), and the attention weights of each spatial position are learned to form a spatial attention map of 1 channel. The spatial attention map represents the positions in the image that need to be emphasized and suppressed. The attention weights of each spatial position increase with the increase of the significance of the features of each spatial position. According to the attention weights of each spatial position, the output feature map F of the channel attention module is weighted in the spatial dimension to obtain a new feature weighted by spatial attention, that is, the shallow feature descriptor. The dimension and size of the shallow feature descriptor are the same as those of the feature map F, and the feature F is recalibrated in space. Furthermore, in an image, some spatial positions have obvious features and more effective information, while some positions may have no effective features and do not play an effective role in network learning and feature extraction. Therefore, the attention weight of each spatial position increases with the increase in the significance of the features of each spatial position. The spatial attention module can obtain the position information that needs to be emphasized or suppressed in the image, increase the weight of the effective position, strengthen the extraction of feature information, and reduce the weight of the invalid position to suppress the extraction of this part of information. In addition, due to the Double type in the C3 data, the texture description of the spatial details is better and the details are richer.
[0050] Step 3: After obtaining the shallow feature descriptor, extract features from the shallow feature map and reduce its size through the second convolution module to obtain a second feature map. Figure 1 As shown in the figure, the second convolution module includes three 3×3 convolution layers connected in sequence, where the stride of the first convolution layer is 2, and the stride of the next two convolution layers is 1. The convolution layer with a stride of 2 reduces the size of the image by half while extracting features, and the convolution layer with a stride of 1 does not change the size of the image while extracting features. Similarly, as the network layer goes deeper, the features extracted by the convolution layer go deeper.
[0051] Step 4: Through the second hybrid attention module, feature aggregation and attention weighting are performed on the second feature map in the channel and spatial dimensions to obtain a depth feature map. The second hybrid attention module can extract deeper information in the polarization SAR image, such as more abstract information such as semantic information. In order to distinguish it from the information extracted by the first hybrid attention module, this information is called depth information. The depth feature descriptor can not only characterize the texture, geometry, and scattering information of the polarization SAR image, but also its more abstract high-dimensional information. The specific structure and operation of the second hybrid attention module are the same as those of the first hybrid attention module and will not be repeated.
[0052] Step 5: Extract features from the depth feature map and reduce its size through the third convolution module to obtain a depth feature descriptor. Figure 1 As shown in the figure, the third convolution module includes two 3×3 convolution layers connected in sequence and one image-sized convolution layer, where the stride of the first convolution layer is 2, and the stride of the next two convolution layers is 1. The image size of the deep feature map is reduced after passing through the first convolution layer, and the features after the size reduction continue to extract deeper features through the second convolution layer. Finally, the third convolution layer of the image size (8×8) is used to convolve the input features to obtain a feature vector with a preset dimension, that is, a deep feature descriptor.
[0053] S140, using a brute force matching method and a random sampling consensus algorithm, matching the depth feature descriptors of the key points in the two polarimetric SAR images to obtain a perspective transformation matrix from one polarimetric SAR image to another polarimetric SAR image.
[0054] Here, "a polarimetric SAR image" is the image to be registered in S110, and "another polarimetric SAR image" is the reference image in S110. The perspective transformation matrix is used to transform the coordinates of the image to be registered to the coordinates of the reference image. In this step, according to the deep feature descriptor, a brute force matching method is used to perform a rough matching of key points, and then a random sampling consensus (RANSAC) algorithm is used for fine matching, and finally the perspective transformation matrix is calculated by the least squares method.
[0055] In an optional implementation, first, a brute force matching method is used to perform a rough matching of key points. Specifically, the brute force matching and K nearest neighbor methods are used to match the depth feature descriptors of each key point in the reference image with the depth feature descriptors generated by each key point in the image to be registered, and the L2 distance between the feature descriptor of each key point in the reference image and the feature descriptors of all key points in the image to be registered is calculated; for each key point in the reference image, K key points whose L2 distance with the key point is less than a given threshold are determined in the image to be registered to form a matching point pair, where K is a non-negative integer. In other words, the L2 distance between the feature descriptors of the K key points in the image to be registered and the feature descriptors of the key point in the reference image are all less than the given threshold.
[0056] For example, setting the threshold to 2, taking a key point in the reference image as an example, first calculate the L2 distance between the feature descriptor of the key point and the feature descriptors of all key points in the image to be matched, and then filter the L2 distances of all the obtained point pairs according to the set threshold 2 to obtain K key points that meet the requirements and form matching point pairs.
[0057] After the rough matching is completed, the matching point pairs obtained by the rough matching are removed by the RANSAC algorithm to achieve precise registration. Specifically, RANSAC is an iterative solution algorithm that estimates the mathematical model of the matching point pair data through multiple iterations, returns the set of matching point pairs that satisfies the mathematical model the most, removes the mismatched points, obtains more accurate matching point pairs, and achieves precise registration. After obtaining the accurate matching point pairs, the perspective transformation matrix is calculated by the least squares method.
[0058] S150: Using the perspective transformation matrix, transform the one polarization SAR image into a registered image with the same coordinates as the other polarization SAR image. After the transformation, the registration of the SAR images is completed.
[0059] Based on the above embodiments, the training process of the twin attention network is refined below. The purpose of training is to enable the twin attention network to effectively extract the deep features of the polarization SAR image and effectively construct the deep feature descriptor. Optionally, before the data blocks of set sizes around each key point in the two polarization SAR images are input into the two branches of the trained twin attention network for deep feature extraction, the following steps are also included:
[0060] Step 1: Construct a polarimetric SAR image set as a training data set for the twin attention network, wherein the image set includes multiple matching polarimetric SAR image pairs. Each matching polarimetric SAR image pair consists of two polarimetric SAR images of the same shooting scene, and each polarimetric SAR image is C3 data of the set size. Optionally, when the C3 data block size in the above embodiment is 32×32, the polarimetric SAR image used for training is also a 32×32 C3 data block.
[0061] Step 2: randomly select N matching polarization SAR image pairs from the image set, and input the two images in each matching polarization SAR image pair into the two branches of the twin attention network respectively to obtain the corresponding deep feature symbols.
[0062] Step 3: Complete the training of the twin attention network by minimizing the difference in deep feature descriptors of the matched polarization SAR image pairs and maximizing the difference in deep feature descriptors of the unmatched polarization SAR image pairs. Specifically, the loss is calculated based on the feature descriptors of the two matched polarization SAR images to update the weight parameters of the twin attention network, and continuously improve the ability of the twin attention network to extract deep features and construct deep feature descriptors.
[0063] In an optional implementation, the following loss function is calculated, and by minimizing the loss function, the difference in deep feature descriptors of matched polarimetric SAR image pairs is minimized, and the difference in deep feature descriptors of unmatched polarimetric SAR image pairs is maximized, thereby completing the training of the twin attention network:
[0064] L T =L FOS +R SOS (1)
[0065] Among them, L T represents the total loss, L FOS represents the first-order similarity loss, R SOS represents the second-order similarity regularization, and both have the same weight.
[0066] More specifically, L FOS is the first-order similarity loss between the deep feature descriptors of the matched polarimetric SAR image pairs. The first-order similarity loss is used to learn local descriptors, which makes the distance between the deep feature descriptors of the matched polarimetric SAR images smaller and the distance between the deep feature descriptors of the non-matched polarimetric SAR images larger. The positive sample descriptor pair is represented as That is, the i-th matching polarimetric SAR image pair, x i represents any polarimetric SAR image in the image pair, represents another polarimetric SAR image in the image pair. Then the calculation formula of the first-order similarity loss is:
[0067]
[0068]
[0069]
[0070] Wherein, t represents the edge margin of the polarimetric SAR image; d(u, v) = ||uv||2 represents the L2 distance between the feature descriptors u and v of any two polarimetric SAR images; represents the jth matching polarimetric SAR image pair, x j represents any polarimetric SAR image in the image pair, represents another polarimetric SAR image in the image pair; d i pos represents the L2 distance of the deep feature descriptors of the two images in the i-th matched polarimetric SAR image pair; d i neg It represents the minimum value of the L2 distance between the deep feature descriptors of the two images in the unmatched polarimetric SAR image pair associated with the i-th matched polarimetric SAR image pair.
[0071] At the same time, R SOS is the second-order similarity regularization between the deep feature descriptors of the matched polarimetric SAR image pairs. FOS In addition to the imposed first-order constraints, combining information from higher-order similarities can improve the performance of clustering and graph matching, so a second-order constraint is imposed on the basis of the first-order similarity loss to further supervise the process of deep descriptor learning.
[0072] The training of small batches can be regarded as two sets of descriptors with a one-to-one correspondence, namely {x i} i=1...N and {x i +} i=1...N In this case, x i and x i + The second-order similarity between is defined as:
[0073]
[0074] Then the second-order similarity regularization is defined as:
[0075]
[0076] Among them, d(x i , xj ) represents the L2 distance between the feature descriptors of any image in the i-th matched polarimetric SAR image pair and any image in the j-th matched polarimetric SAR image pair, represents the L2 distance between the feature descriptors of the other image in the i-th matched polarimetric SAR image pair and the other image in the j-th matched polarimetric SAR image pair, From {x j} j≠i and {x j +} j≠i The angle x represents i and x i + The degree of similarity between them.
[0077] R SOS It does not force the distance between matching descriptors to decrease or the distance between mismatching descriptors to increase, so it cannot be used without L FOS When used alone, it can only be used as a regularization term.
[0078] The loss in the training process is calculated through the loss function, and the network weight parameters are updated by back propagation, and the twin attention network is continuously trained so that it can effectively extract the deep features of the input data and effectively construct deep feature descriptors for subsequent alignment.
[0079] The technical effects of the embodiments of the present invention are as follows:
[0080] 1. This embodiment performs polarization whitening filtering (PWF) processing on the polarimetric SAR image to obtain edge data after image denoising, and performs threshold constraints on it. The threshold value is generated by adaptive calculation to obtain the constrained edge data, and then further performs morphological erosion and non-maximum suppression operations on it to obtain the final selected key points. This point selection method, on the one hand, reduces the interference of coherent speckle noise, making the acquired edge data more reliable; on the other hand, the point selection speed is very fast, and most of the selected key points are in the edge and texture area of the image, and the number of selected points can be controlled by the non-maximum suppression method, which is flexible.
[0081] 2. This embodiment uses the twin attention network to extract the deep features of the data block and construct the deep feature descriptor. During the training process, the two branches of the twin attention network share training parameters to improve the training efficiency and training quality. The training data is the C3 data of the polarization SAR image, which fully utilizes the scattering information of the ground object target in the polarization SAR image data. Compared with training with only the image amplitude information, it can fully learn the scattering characteristics of the ground object target, which is more suitable for the learning of the deep features of the polarization SAR image. At the same time, it can better extract the deep features of the polarization SAR image, and the constructed deep feature descriptor is more robust. At the same time, the key point is taken as the center, and the image block of 32×32 size around it is selected to construct the feature descriptor of the point. There is no need to input a fixed-size image, which can further improve the registration performance.
[0082] 3. Combining the above measures can effectively improve the registration efficiency and accuracy of polarimetric SAR images.
[0083] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 6 As shown, the device includes a processor 50, a memory 51, an input device 52 and an output device 53; the number of processors 50 in the device can be one or more. Figure 6 A processor 50 is taken as an example; the processor 50, memory 51, input device 52 and output device 53 in the device can be connected by a bus or other means. Figure 6 The example of connecting through bus is taken in the following.
[0084] The memory 51, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to a polarization SAR image registration method based on an attention mechanism in an embodiment of the present invention. The processor 50 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 51, that is, realizing the above-mentioned polarization SAR image registration method based on an attention mechanism.
[0085] The memory 51 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 51 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 51 may further include a memory remotely arranged relative to the processor 50, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0086] The input device 52 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 53 may include a display device such as a display screen.
[0087] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a polarization SAR image registration method based on an attention mechanism in any embodiment.
[0088] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.
[0089] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0090] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0091] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.
Claims
1. A polarimetric SAR image registration method based on attention mechanism, characterized in that: include: Two different polarimetric SAR images of the same scene are subjected to polarimetric whitening filtering to obtain their respective filtered images. Both polarimetric SAR images are C3 data. The filtered images include edge and texture information of the polarimetric SAR images. C3 data refers to polarimetric covariance matrix data. performing adaptive threshold constraint, morphological erosion, and non-maximum suppression operations on the two filtered images to determine key points with significant features in the two polarimetric SAR images; Data blocks of a set size around each key point in the two polarimetric SAR images are respectively input into the two branches of the trained twin attention network for deep feature extraction to obtain the deep feature descriptors of each key point. The trained twin attention network can make the deep feature descriptors of the matched key points tend to be consistent; Using a brute force matching method and a random sampling consensus algorithm, the depth feature descriptors of the key points in the two polarimetric SAR images are matched to obtain a perspective transformation matrix from one polarimetric SAR image to the other polarimetric SAR image; Using the perspective transformation matrix, transforming the one polarimetric SAR image into a registered image having coordinates consistent with the other polarimetric SAR image; The twin attention network includes two branches with the same structure, each branch includes a first convolution module, a first hybrid attention module, a second convolution module, a second hybrid attention module and a third convolution module, and each hybrid attention module includes a channel attention module and a spatial attention module connected in sequence; The data blocks of set sizes around each key point in the two polarimetric SAR images are respectively input into the two branches of the trained twin attention network for deep feature extraction to obtain the deep feature descriptors of each key point, including: Taking any key point in any polarimetric SAR image as the center, extract the data block of the surrounding set size and input it into any branch of the twin attention network, in which: Performing feature extraction on the data block through a first convolution module to obtain a first feature map; Through the first hybrid attention module, feature aggregation and attention weighting are performed on the first feature map in the channel and spatial dimensions to obtain a shallow feature map; Extract features from the shallow feature map and reduce its size through a second convolution module to obtain a second feature map; Through the second hybrid attention module, feature aggregation and attention weighting are performed on the second feature map in the channel and spatial dimensions to obtain a deep feature map; The third convolution module extracts features from the depth feature map and reduces its size to obtain a depth feature descriptor.
2. The method according to claim 1, characterized in that The step of performing polarization whitening filtering on two different polarization SAR images of the same scene to obtain filtered images includes: For any polarimetric SAR image, the filtered image is obtained by combining the elements in the polarimetric covariance matrix to minimize the ratio of the image's standard deviation s to its mean m.
3. The method according to claim 1, characterized in that The step of performing adaptive threshold constraint, morphological erosion, and non-maximum suppression operations on the two filtered images to determine key points with significant features in the two filtered images comprises: Calculate the adaptive threshold of any filtered image; performing morphological corrosion processing on the filtered image using the adaptive threshold; Non-maximum suppression is performed on the eroded image to obtain key points with significant features in the filtered image, which are used as key points with significant features in the corresponding polarimetric SAR image.
4. The method according to claim 1, wherein The channel attention module includes a global average pooling layer and two 1×1 convolutional layers; The first hybrid attention module performs feature aggregation and attention weighting on the first feature map in the channel and spatial dimensions to obtain a shallow feature map, including: Inputting the first feature map into the global average pooling layer to compress the spatial dimension to obtain a one-dimensional feature vector; Inputting the one-dimensional feature vector into the two sequentially connected 1×1 convolutional layers to learn the attention weight of each channel, wherein the attention weight of each channel increases as the significance of the channel feature increases; According to the attention weight of each channel, the first feature map is weighted in the channel dimension to obtain a third feature map.
5. The method according to claim 4, characterized in that The spatial attention module includes a maximum pooling layer, an average pooling layer and a 7×7 convolutional layer; The method further comprises: performing feature aggregation and attention weighting on the first feature map in the channel and spatial dimensions by a first hybrid attention module to obtain a shallow feature map; Inputting the third feature map into the maximum pooling layer and the average pooling layer respectively, performing maximum pooling and average pooling along the channel dimension respectively, and connecting the pooling results to generate a feature descriptor; Inputting the feature descriptor into the 7×7 convolutional layer to learn the attention weight of each spatial position, wherein the attention weight of each spatial position increases as the significance of the feature at each spatial position increases; According to the attention weights of each spatial position, the third feature map is weighted in the spatial dimension to obtain a shallow feature map.
6. The method according to claim 1, characterized in that Before respectively inputting data blocks of a set size around each key point in the two polarimetric SAR images into the two branches of the trained twin attention network for deep feature extraction, the method further includes: Acquire a polarimetric SAR image set, the image set comprising a plurality of matched polarimetric SAR image pairs, each matched polarimetric SAR image pair consisting of two polarimetric SAR images captured under the same scene, and each polarimetric SAR image being C3 data of the set size; Randomly select N matching polarimetric SAR image pairs from the image set, input the two images in each matching polarimetric SAR image pair into the two branches of the twin attention network respectively, and obtain the corresponding deep feature; The training of the twin attention network is completed by minimizing the difference in deep feature descriptors of matched polarimetric SAR image pairs and maximizing the difference in deep feature descriptors of unmatched polarimetric SAR image pairs.
7. The method according to claim 6, characterized in that The training of the twin attention network is completed by minimizing the difference in deep feature descriptors of the matched polarimetric SAR image pairs and maximizing the difference in deep feature descriptors of the unmatched polarimetric SAR image pairs, including: The first-order similarity loss L between the deep feature descriptors of the matched polarimetric SAR image pairs is calculated using the following formula: FOS : Where t represents the edge margin of the polarimetric SAR image; d(u,v) = ||uv||2 represents the L2 distance between the feature descriptors u and v of any two polarimetric SAR images; represents the feature descriptor of the i-th matched polarimetric SAR image pair, x i represents the feature descriptor of any polarimetric SAR image in the image pair, Denotes the feature descriptor of the other polarimetric SAR image in the image pair; d i pos represents the L2 distance of the deep feature descriptor of the i-th matched polarimetric SAR image pair; d i neg represents the minimum L2 distance of the depth feature descriptors of the i-th matched polarimetric SAR image pair and the unmatched polarimetric SAR image pair; The second-order similarity regularization R between the deep feature descriptors of the matched polarimetric SAR image pairs is calculated using the following formula: SOS : Among them, d(x i ,x j ) represents the L2 distance between the feature descriptors of any image in the i-th matched polarimetric SAR image pair and any image in the j-th matched polarimetric SAR image pair, represents the L2 distance between the feature descriptors of the other image in the i-th matched polarimetric SAR image pair and the other image in the j-th matched polarimetric SAR image pair, From {x j } j≠i and {x j + } j≠i The angle of x i and x i + the degree of similarity between them; According to L FOS and R SOS Calculate the following loss function L T :L T =L FOS +R SOS ; By minimizing the loss function, the difference in deep feature descriptors of matched polarization SAR image pairs is minimized, and the difference in deep feature descriptors of unmatched polarization SAR image pairs is maximized, thereby completing the training of the twin attention network.
8. An electronic device, characterized in that: include: one or more processors; When one or more programs are executed by the one or more processors, the one or more processors implement the polarization SAR image registration method based on the attention mechanism as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the polarimetric SAR image registration method based on the attention mechanism as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Polarimetric SAR (Synthetic Aperture Radar) interferometry image registration method based on optimal correlation coefficient linearity
CN102520407A
Multi-temporal POLSAR image registration method based on SAR-SIFT feature
CN110458876A
Vehicle license plate positioning method and system based on edge detection and improved Harris corner detection
CN108629343A
Medical image deformation registration method and system based on deep learning feature optical flow
CN111127532A
Polarimetric SAR image classification method based on a channel attention depth network
CN113240040A
Cited By
Polarization whitening and filtering collaborative SAR image radiation resolution improving method and system
CN122694692A
