Polarimetric sar image classification method, system, medium and program product
By constructing a residual neural network model and performing two-stage training, and combining anchored sample and positive sample pairs datasets, the Hungarian matching algorithm is used to generate polarimetric SAR image classification results. This solves the problems of insufficient accuracy and label dependence in existing methods and achieves efficient unsupervised classification.
Patent Information
- Application Number
- CN202510453982.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2045-04-11
AI Technical Summary
Existing polarimetric SAR image classification methods rely on simple scattering models, and the classification accuracy is difficult to meet practical needs. Deep unsupervised learning methods are semantically discontinuous in PolSAR images and require a large amount of labeled data. Traditional unsupervised methods are fast in computation but lack accuracy.
A residual neural network model is constructed. Through a two-stage training process, the dataset is trained using anchored sample training set and positive samples. The classification results are generated by combining the Hungarian matching algorithm, thus avoiding dependence on labeled data.
It enables accurate classification of polarimetric SAR images without the need for labeled data, improving classification accuracy, solving the semantic discontinuity problem, and enhancing the efficiency of unsupervised learning.
Smart Images

Figure CN120388283B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of polarimetric synthetic aperture radar (SAR) image interpretation technology, and in particular to a polarimetric SAR image classification method, system, medium, and program product. Background Technology
[0002] In the analysis and interpretation of polarimetric SAR images, ground feature classification is a key technology that has been extensively studied. Currently, many traditional methods for polarimetric SAR image classification have been developed, such as the Wishart classifier, target decomposition theory, support vector machines (SVM), and random field-based models. However, these traditional methods rely on manually extracted low-level features, and the suboptimal classification results produced by these low-discrimination features are no longer sufficient to meet the current demands for high-precision ground feature classification. For example, while the Wishart classifier is computationally efficient, its classification accuracy heavily depends on the accuracy of the scattering model; although SVM performs well on high-dimensional data, its high computational complexity makes it unsuitable for large-scale PolSAR image classification tasks.
[0003] In recent years, deep learning-based polarimetric SAR image classification techniques have become mainstream, achieving high-precision classification results with sufficient manually labeled data. However, training these supervised models requires a large number of labeled samples, which is time-consuming and labor-intensive for large scenes and high-resolution PolSAR images. Although subsequent semi-supervised methods have addressed the over-reliance on annotation information to some extent, some target category labels are still needed to assist in classification. In the field of image analysis, unsupervised learning methods have been widely studied because they do not require any labeled data. For PolSAR data, early unsupervised methods mainly relied on simple clustering based on scattering mechanisms. The most classic example is Wishart clustering based on target decomposition (such as Freeman decomposition and H / A decomposition). Although these methods are computationally fast and efficient, the classification results are often less than ideal due to their reliance on simple scattering models. With the rapid development of deep learning technology, researchers have begun to introduce end-to-end deep learning networks into unsupervised PolSAR classification, among which autoencoder-decoder networks are one of the most commonly used methods. These methods learn discriminative latent representations for classification by comparing the similarity between decoded features and input features using distance metrics such as Wishart distance.
[0004] Currently, the classification of polarimetric SAR images with complex scattering characteristics faces the following problems: (1) Traditional scattering mechanism-based methods rely on simple scattering models, and the classification accuracy is difficult to meet the actual needs; (2) Due to the large difference between PolSAR data and general image data, unsupervised methods in the field of natural image processing are difficult to apply directly, resulting in relatively few deep unsupervised learning and clustering methods for PolSAR images; (3) The current mainstream unsupervised PolSAR image classification methods based on autoencoder-decoder networks have serious semantic discontinuity problems in the classification process, and usually need to introduce additional classification constraints to ensure performance. Summary of the Invention
[0005] To address the technical problems existing in the background art, this invention proposes a polarimetric SAR image classification method, system, medium, and program product.
[0006] In a first aspect, the present invention proposes a polarimetric SAR image classification method, comprising:
[0007] Obtain the polarization dataset; the polarization dataset includes polarimetric SAR images and corresponding ground feature maps; construct the anchored sample training set and the positive sample pair dataset based on the polarization dataset;
[0008] Construct a residual neural network model;
[0009] The residual neural network model is trained in the first stage using the positive sample pair dataset to obtain the intermediate residual neural network model that has passed the first stage training; the intermediate residual neural network model is trained in the second stage using the polarization dataset and the anchored sample training set to obtain the residual neural network model that has passed the second stage training.
[0010] The residual neural network model trained in the second stage is used to cluster the polarimetric SAR images to be classified, and the clustering results are obtained. The Hungarian matching algorithm is used to map the polarimetric SAR image clustering results to the real labels, and the mapping results are obtained. Based on the mapping results, the classification result map is generated.
[0011] Preferably, constructing an anchored sample training set and a positive sample pair dataset based on the polarization data specifically includes: constructing an anchored sample training set based on the polarization dataset; and constructing a positive sample pair dataset based on the anchored sample training set.
[0012] Preferably, constructing an anchored sample training set based on the polarimetric dataset specifically includes: obtaining the complex-valued feature matrix of the polarimetric SAR image based on the polarimetric SAR image; wherein the complex-valued feature matrix includes the complex-valued feature vector of each pixel; generating labeled data based on the ground cover real-value map; constructing an initial ground truth matrix, and performing pixel-level label classification and annotation on the initial ground truth matrix based on the labeled data to generate a ground truth matrix; obtaining the complex-valued feature vector at the corresponding coordinate values in the complex-valued feature matrix based on the coordinate values of the labeled pixels in the ground truth matrix as the first... A complex-valued feature vector is generated; taking the first complex-valued feature vector as the center point, several complex-valued feature vectors are selected from the surrounding area as second complex-valued feature vectors; the first and second complex-valued feature vectors are combined to form a complex-valued feature matrix block; the upper triangular elements of the complex-valued feature vectors in the complex-valued feature matrix block are separated into real and imaginary parts to form real-valued feature vectors; based on the real-valued feature vectors, a high-dimensional real-valued feature matrix is generated; the pixel-level label classification and annotation information in the ground truth matrix and the high-dimensional real-valued feature matrix block are correspondingly combined to form an anchored sample training set.
[0013] Preferably, constructing a positive sample pair dataset based on the anchor sample training set specifically includes: performing random data augmentation on the anchor sample training set to generate positive samples with semantic consistency with the anchor samples in the anchor sample training set, and combining the anchor samples with their corresponding positive samples to form positive sample pairs; combining all positive sample pairs to form a positive sample pair dataset.
[0014] Preferably, the residual neural network model includes an input layer, a residual layer, a global average pooling layer, and a clustering head. The input layer comprises a first convolutional layer and a first batch of normalization layers. The first convolutional layer has 9 input feature channels, the same as the sample real-valued feature matrix, and outputs 64 feature maps. The convolutional filters in the first convolutional layer are 3×3 in size, with 1 padding and a stride of 1. The residual layer comprises four residual structure levels, each level including several residual blocks, and each residual block containing two convolutional layers and one shortcut connection layer. The global average pooling layer is used to compress the spatial dimension of the feature map to 1×1 using adaptive average pooling, resulting in an output feature dimension of 512. The clustering head uses a linear layer to map the 512-dimensional features to an n-dimensional space to obtain the probability distribution of each sample belonging to n cluster categories.
[0015] Preferably, the four residual structure layers are layer1, layer2, layer3 and layer4 respectively; wherein, layer1 includes a first residual block and a second residual block, and the number of input and output channels of the two residual blocks is 64. The first residual block includes a second convolutional layer, a third convolutional layer and a second batch normalization layer. The second residual block includes a fourth convolutional layer, a fifth convolutional layer and a third batch normalization layer. The size of the convolutional filter in the second, third, fourth and fifth convolutional layers is 3×3, the padding is 1, the stride is 1 and there is no downsampling operation.
[0016] Layer 2 contains a third residual block and a fourth residual block. The third residual block expands the number of channels from 64 to 128. This third residual block includes a sixth convolutional layer, a seventh convolutional layer, and a fourth batch normalization layer. The convolutional filters in the sixth and seventh convolutional layers are 3×3 in size, with 1 padding, a 1-step stride, and no downsampling. Simultaneously, the output of layer 1 is matched with the output of layer 2 through a first shortcut connection layer, and the sum of the channels is used as the input to layer 3. The convolutional layer consists of an eighth convolutional layer and a fifth batch normalization layer. The eighth convolutional layer has 64 input feature channels and 128 feature maps for the output feature data. The convolutional filters in the eighth convolutional layer are 1×1 in size, with no padding and a stride of 1. The fourth residual block has 128 channels and includes a ninth convolutional layer, a tenth convolutional layer, and a sixth batch normalization layer. The convolutional filters in the ninth and tenth convolutional layers are 3×3 in size, with 1 padding and a stride of 1, and no downsampling operation.
[0017] Layer 3 includes a fifth residual block and a sixth residual block. The fifth residual block expands the number of channels from 128 to 256. It includes an eleventh convolutional layer, a twelfth convolutional layer, and a seventh batch normalization layer. The convolutional filters in the eleventh convolutional layer are 3×3 in size, with padding of 1 and a stride of 2 for downsampling. The convolutional filters in the twelfth convolutional layer are also 3×3 in size, with padding of 1 and a stride of 1. Simultaneously, the second shortcut connection layer matches the channel count of the output from layer 2 with the output from layer 3 and sums them to obtain the output. The input of Ayer4; the second shortcut connection layer contains a thirteenth convolutional layer and an eighth batch normalization layer. The thirteenth convolutional layer has 128 input feature channels, 256 feature maps for the output feature data, and a 1×1 convolutional filter size with no padding and a stride of 1; the sixth residual block has 256 channels and includes a fourteenth convolutional layer, a fifteenth convolutional layer, and a ninth batch normalization layer. The convolutional filters of the fourteenth and fifteenth convolutional layers are both 3×3 in size with 1 padding and a stride of 1, and no downsampling operation;
[0018] Layer 4 consists of a seventh residual block and an eighth residual block. The seventh residual block expands the number of channels from 128 to 256. It contains a sixteenth convolutional layer, a seventeenth convolutional layer, and a tenth batch normalization layer. The convolutional layer filters in the sixteenth and seventeenth convolutional layers are both 3×3 in size, with 1 padding and a stride of 1. Simultaneously, the output of layer 3 is matched with the output of layer 4 through a third shortcut connection layer, and the channels are summed to obtain the final output. The third shortcut connection layer contains an eighteenth convolutional layer and an eleventh batch normalization layer. The eighteenth convolutional layer has 128 input feature channels and 256 feature maps for the output feature data. The convolutional filter is 1×1 in size, with no padding and a stride of 1. The eighth residual block maintains the number of channels at 256. It contains a nineteenth convolutional layer, a twentieth convolutional layer, and an eleventh normalization layer. The convolutional filters in the nineteenth and twentieth convolutional layers are both 3×3 in size, with 1 padding and a stride of 1, and no downsampling operation.
[0019] Preferably, the residual neural network model is trained in the first stage using a positive sample pair dataset to obtain an intermediate residual neural network model trained in the first stage. Specifically, this includes: inputting the positive sample pair dataset into the residual neural network model to obtain anchor sample features and their positive sample features; calculating the feature similarity between the anchor sample and the positive sample based on the anchor sample features and their positive sample features, and calculating the contrast loss between the anchor sample and the positive sample based on the feature similarity between the anchor sample and the positive sample; repeatedly optimizing the parameters of the residual neural network model using the backpropagation algorithm based on the contrast loss between the anchor sample and the positive sample until the residual neural network model converges or reaches a preset number of training rounds; and using the residual neural network model that has converged or reached the preset number of training rounds as the intermediate residual neural network model trained in the first stage.
[0020] Preferably, the intermediate residual neural network model is trained in a second stage using polarization data and an anchored sample training set to obtain a residual neural network model trained in the second stage, specifically including:
[0021] Based on the polarization dataset, the Pauli image set is obtained. The superpixel block set contains multiple superpixel blocks, each including multiple pixel coordinates and corresponding superpixel block index information. Based on the superpixel block index information and the coordinates of the center pixel of each anchor sample in the anchor sample dataset, the superpixel block to which each anchor sample belongs is determined. Centered on all non-edge region pixels of the superpixel block to which each anchor sample belongs, a sample block set of the same size as the anchor sample is extracted as the candidate sample set for the nearest neighbor sample cluster of that anchor sample. The samples in the candidate set corresponding to each anchor sample are input into an intermediate residual neural network model to obtain the candidate feature library for the nearest neighbor sample cluster of each anchor sample. Each anchor sample is input into the intermediate residual neural network model to obtain anchor features. The Euclidean distance between the anchor features of each anchor sample and all feature tensors in the candidate feature library is calculated. Based on the Euclidean distance, the K nearest neighbor samples are selected for each anchor sample. The K nearest neighbor samples selected for each anchor sample are combined to form the nearest neighbor sample cluster of each anchor sample.
[0022] Based on the nearest neighbor sample clusters of each anchor sample, the cluster feature contrast loss and soft assignment contrast loss are calculated; the total loss function is constructed based on the cluster feature contrast loss and soft assignment contrast loss; the parameters of the intermediate residual neural network model are optimized using the backpropagation algorithm based on the cluster feature contrast loss and soft assignment contrast loss until the intermediate residual neural network model converges or reaches the preset number of optimizations; the intermediate residual neural network model that has converged or reached the preset number of optimizations is used as the residual neural network model trained in the second stage.
[0023] Preferably, based on the nearest neighbor sample clusters of each anchor sample, the cluster feature contrast loss and soft assignment contrast loss are calculated. Specifically, this includes: calculating the cluster feature contrast loss of the nearest neighbor sample clusters using contrast loss based on the similar semantic relationships between the nearest neighbor sample clusters of each anchor sample; obtaining the soft assignment probability of the intermediate residual neural network model to the nearest neighbor sample clusters through the Softmax classifier, and calculating the soft assignment contrast loss using the cross-entropy loss function.
[0024] Preferably, In the formula, Indicates the total loss. Indicates soft allocation loss, λ represents the cluster feature contrast loss, and λ represents the weight coefficient.
[0025]
[0026] In the formula, Let x represent the i-th anchored sample. i and its nearest neighbor sample cluster A positive sample pair consisting of any nearest neighbor sample in x, where Group represents the nearest neighbor sample cluster, x k This indicates that the sample x does not belong to the i-th anchor sample. i Any sample in the nearest neighbor cluster, i.e., x i negative samples, Indicates positive sample pairs After feature representation by the residual neural network model, (z) i ,z k ) represents negative sample pairs (x i ,x k The feature representation of the residual neural network model shows that τ represents the temperature coefficient.
[0027] In the formula, N represents the total number of anchored samples. x p represents the number of nearest neighbor samples in each nearest neighbor sample cluster. i Indicates anchored sample x i Feature representation z i The predicted vector output by the softmax layer, p j Indicates anchored sample x i nearest neighbor sample cluster Any nearest neighbor sample x in j Feature representation z j The predicted vector output after the softmax layer, where · represents the dot product operator. Indicates sample x i The probability assigned to cluster c, where c represents a certain cluster category, C represents the set of categories in the dataset, and β represents the entropy term. The weighting coefficients.
[0028] In a second aspect, the present invention also provides a polarimetric SAR image classification system, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the polarimetric SAR image classification method according to any one of the first aspects.
[0029] Thirdly, the present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the polarimetric SAR image classification method described in any one of the first aspects.
[0030] Fourthly, the present invention also proposes a computer program product, comprising a computer program that, when executed by a processor, implements the steps of the polarimetric SAR image classification method described in any one of the first aspects.
[0031] In this invention, the proposed polarimetric SAR image classification method, system, medium, and program products construct an anchored sample training set and a positive sample pair dataset based on a polarimetric dataset. A residual neural network model is then trained in two stages using these datasets to obtain a successfully trained residual neural network model. The polarimetric SAR images to be classified are then clustered using the residual neural network model trained in the second stage, yielding the clustering results. The Hungarian matching algorithm is then used to map the clustering results to the ground truth labels, resulting in a mapping result. Based on the mapping result, a classification result map is generated. This invention avoids the heavy reliance on labeled data in existing polarimetric SAR classification techniques and the accuracy problems of traditional unsupervised algorithms, enabling effective and accurate classification and identification of polarimetric SAR images without requiring arbitrary labeling costs. Attached Figure Description
[0032] Figure 1 This is a flowchart illustrating the polarimetric SAR image classification method in one embodiment of the present invention.
[0033] Figure 2 This is a polarimetric SAR image from one embodiment of the present invention.
[0034] Figure 3 for Figure 2 The corresponding ground feature map.
[0035] Figure 4 for Figure 2 A schematic diagram of superpixel segmentation.
[0036] Figure 5 This is a classification result diagram of the Wishart clustering method based on target decomposition in the existing technology.
[0037] Figure 6 This is a classification result image of a polarimetric SAR classification method based on an autoencoder-decoder network, which is currently in use.
[0038] Figure 7 This image shows the classification results obtained using the polarimetric SAR image classification method proposed in this invention. Detailed Implementation
[0039] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0040] Firstly, referring to Figure 1 The present invention proposes a polarimetric SAR image classification method, comprising:
[0041] Obtain the polarization dataset; the polarization dataset includes polarimetric SAR images and corresponding ground feature maps; construct the anchored sample training set and the positive sample pair dataset based on the polarization dataset;
[0042] Construct a ResNet model; perform the first stage of training on the ResNet model using a positive sample pair dataset to obtain an intermediate ResNet model that has passed the first stage of training; perform the second stage of training on the intermediate ResNet model using a polarization dataset and an anchored sample training set to obtain a ResNet model that has passed the second stage of training.
[0043] The residual neural network model trained in the second stage is used to cluster the polarimetric SAR images to be classified, and the clustering results are obtained. The Hungarian matching algorithm is used to map the polarimetric SAR image clustering results to the real labels, and the mapping results are obtained. Based on the mapping results, the classification result map is generated.
[0044] This invention constructs an anchored sample training set and a positive sample pair dataset based on a polarimetric dataset. A residual neural network model is then trained in two stages using these datasets, resulting in a successfully trained model. The trained residual neural network model is then used to cluster the polarimetric SAR images to be classified, yielding clustering results. The Hungarian matching algorithm is then used to map the clustering results to ground truth labels, resulting in a mapping result. Based on this mapping result, a classification result map is generated. This invention avoids the heavy reliance on labeled data in existing polarimetric SAR classification techniques and the accuracy issues of traditional unsupervised algorithms, enabling accurate classification and identification of polarimetric SAR images without requiring arbitrary labeling costs.
[0045] In this embodiment, constructing an anchored sample training set and a positive sample pair dataset based on polarization data specifically includes: constructing an anchored sample training set based on the polarization dataset; and constructing a positive sample pair dataset based on the anchored sample training set.
[0046] In a further embodiment, constructing an anchored sample training set based on the polarimetric dataset specifically includes: obtaining a complex-valued feature matrix of the polarimetric SAR image based on the polarimetric SAR image; wherein the complex-valued feature matrix includes a complex-valued feature vector for each pixel; generating labeled data based on the ground cover real-value map; constructing an initial ground truth matrix, and performing pixel-level label classification and annotation on the initial ground truth matrix based on the labeled data to generate a ground truth matrix; and obtaining the complex-valued feature vector at the corresponding coordinate values in the complex-valued feature matrix based on the coordinate values of the labeled pixels in the ground truth matrix. The first complex-valued feature vector is used as the center point, and several complex-valued feature vectors are selected from the surrounding area as the second complex-valued feature vectors. The first and second complex-valued feature vectors are combined to form a complex-valued feature matrix block. The upper triangular elements of the complex-valued feature vectors in the complex-valued feature matrix block are separated into real and imaginary parts to form real-valued feature vectors. Based on the real-valued feature vectors, a high-dimensional real-valued feature matrix is generated. The pixel-level label classification and annotation information in the ground truth matrix and the high-dimensional real-valued feature matrix block are combined accordingly to form an anchored sample training set.
[0047] Specifically, obtaining the complex-valued feature matrix of the polarimetric SAR image based on the polarimetric SAR image includes: calculating the polarimetric complex-valued coherence matrix of each pixel in the preprocessed polarimetric SAR image; calculating the mean and variance of each element in the polarimetric complex-valued coherence matrix of each pixel; calculating the normalized value of each element in the polarimetric complex-valued coherence matrix of each pixel based on the mean and variance calculation results; integrating the normalized values of each element to generate the normalized polarimetric complex-valued coherence matrix of each pixel; extracting the normalized values of several elements in the upper triangular region of the normalized polarimetric complex-valued coherence matrix of each pixel as complex-valued feature vectors; and integrating the complex-valued feature vectors to generate the complex-valued feature matrix of the polarimetric SAR image.
[0048] in, In the formula, T (ij) Let represent the polarization complex coherence matrix corresponding to the pixel in the i-th row and j-th column of the polarimetric SAR image, i = 1, 2, ..., a, j = 1, 2, ..., b; where a and b represent the length and width of the polarimetric SAR image, respectively. Let represent the element in the u-th row and v-th column of the polarization coherence matrix, where u,v∈{1,2,3} and all elements of the matrix except the diagonal elements are complex values.
[0049] in, In the formula, · represents the product operation. This represents the average value of each element in the polarization complex coherence matrix of each pixel in a polarization SAR image.
[0050] in, In the formula, This indicates the conjugate operation. This represents the variance of each element in the polarization complex coherence matrix of each pixel in a polarization SAR image, calculated over the entire polarization complex coherence matrix.
[0051] in, In the formula, T represents the polarization complex coherence matrix T corresponding to each pixel in a polarimetric SAR image. (ij) The normalized value corresponding to each element in the table.
[0052] in, In the formula, T (ij) This represents the normalized polarization complex coherence matrix corresponding to the pixel in the i-th row and j-th column of the polarization SAR image.
[0053] Since all elements except the diagonal elements in the normalized polarimetric coherence matrix corresponding to each pixel in a polarimetric SAR image are complex values and possess the conjugate transpose identity property, to facilitate network processing and reduce the complexity of network feature computation, this example selects six elements from the upper triangular portion of the complex feature matrix block during the generation of the high-dimensional real-valued feature matrix, separating their real and imaginary parts to form a 9-dimensional real-valued feature vector for that pixel; where... In the formula, I (ij) Let F represent the 9-dimensional real-valued feature vector of each pixel in the polarimetric SAR image, i = 1, 2, ..., a, j = 1, 2, ..., b; then, based on the 9-dimensional real-valued feature vector of each pixel in the polarimetric SAR image, construct the high-dimensional real-valued feature matrix of the polarimetric SAR image; where F = (I (ij) ) a×b High-dimensional real-valued feature matrix of polarimetric SAR image.
[0054] To ensure the randomness and diversity of sample pairs during training, in a further embodiment, a positive sample pair dataset is constructed based on the anchor sample training set. Specifically, this includes: performing random data augmentation on the anchor sample training set to generate positive samples that are semantically consistent with the anchor samples in the anchor sample training set, and combining the anchor samples with their corresponding positive samples to form positive sample pairs; and combining all the positive sample pairs to form a positive sample pair dataset.
[0055] Specifically, random data augmentation of the anchored sample training set includes: using random data augmentation strategies to perform random data augmentation on the anchored samples in the anchored sample training set; wherein, random data augmentation strategies include random rotation, flipping, and random noise.
[0056] Specifically, the anchored sample dataset is defined as D anchor ={x1,...,x|D|}, where x i This represents the high-dimensional real-valued feature matrix of each pixel block sample, with dimensions 21*21*9. The random data augmentation strategy is selected from random rotation, flipping, and random noise, and can be defined as: T = random{Rotation(θ), Flipping(α), Noise(μ,σ)}, where θ is a randomly generated angle parameter ranging from -180° to 180°; α is a random Boolean value controlling whether horizontal or vertical flipping is used; and μ and σ are the mean and variance parameters for adding random Gaussian noise. For each anchored sample, a positive sample T[x] can be generated through any random data augmentation operation in T. i The dataset is then combined to form positive sample pairs.
[0057] Of course, in different embodiments, the strength of data augmentation can be adjusted according to the actual task requirements. For example, the range of rotation angle (e.g., -90° to 90°) or the variance of noise (e.g., σ = 0.02) can be limited to further improve the quality of the anchored sample dataset.
[0058] To adapt the existing ResNet network structure to polarimetric SAR pixel block input, in this embodiment, the residual neural network model includes an input layer, a residual layer, a global average pooling layer, and a clustering head. The input layer comprises a first convolutional layer and a first batch of normalization layers. The first convolutional layer has 9 input feature channels, the same as the sample real-valued feature matrix, and outputs 64 feature maps. The convolutional filters in the first convolutional layer are 3×3 in size, with padding of 1 and a stride of 1. The residual layer comprises four residual structure levels, each including several residual blocks (BasicBlocks). Each residual block contains two convolutional layers and one shortcut connection. The global average pooling layer uses adaptive average pooling (AdaptiveAvgPool2d) to compress the spatial dimension of the feature map to 1×1, outputting a feature dimension of 512. The clustering head (Cluster...)... The Head uses a linear layer to map 512-dimensional features to an n-dimensional space (the number of clusters is n, which is 5 in this example), representing the probability distribution of each sample belonging to n clusters.
[0059] In a further embodiment, the four residual structure layers are layer1, layer2, layer3 and layer4 respectively; wherein, layer1 includes a first residual block and a second residual block, and the number of input and output channels of the two residual blocks is 64. The first residual block includes a second convolutional layer, a third convolutional layer and a second batch normalization layer. The second residual block includes a fourth convolutional layer, a fifth convolutional layer and a third batch normalization layer. The size of the convolutional filter in the second, third, fourth and fifth convolutional layers is 3×3, the padding is 1, the stride is 1 and there is no downsampling operation.
[0060] Layer 2 contains a third residual block and a fourth residual block. The third residual block expands the number of channels from 64 to 128. This third residual block includes a sixth convolutional layer, a seventh convolutional layer, and a fourth batch normalization layer. The convolutional filters in the sixth and seventh convolutional layers are 3×3 in size, with 1 padding, a 1-step stride, and no downsampling. Simultaneously, the output of layer 1 is matched with the output of layer 2 through a first shortcut connection layer, and the sum of the channels is used as the input to layer 3. The convolutional layer consists of an eighth convolutional layer and a fifth batch normalization layer. The eighth convolutional layer has 64 input feature channels and 128 feature maps for the output feature data. The convolutional filters in the eighth convolutional layer are 1×1 in size, with no padding and a stride of 1. The fourth residual block has 128 channels and includes a ninth convolutional layer, a tenth convolutional layer, and a sixth batch normalization layer. The convolutional filters in the ninth and tenth convolutional layers are 3×3 in size, with 1 padding and a stride of 1, and no downsampling operation.
[0061] Layer 3 includes a fifth residual block and a sixth residual block. The fifth residual block expands the number of channels from 128 to 256. It includes an eleventh convolutional layer, a twelfth convolutional layer, and a seventh batch normalization layer. The convolutional filters in the eleventh convolutional layer are 3×3 in size, with padding of 1 and a stride of 2 for downsampling. The convolutional filters in the twelfth convolutional layer are also 3×3 in size, with padding of 1 and a stride of 1. Simultaneously, the output of layer 2 is matched with the output of layer 3 through a second shortcut connection layer, and the channels are summed to obtain the output. The input of layer 4; the second shortcut connection layer contains a thirteenth convolutional layer and an eighth batch normalization layer. The thirteenth convolutional layer has 128 input feature channels, 256 feature maps for the output feature data, and a 1×1 convolutional filter size with no padding and a stride of 1; the sixth residual block maintains 256 channels and includes a fourteenth convolutional layer, a fifteenth convolutional layer, and a ninth batch normalization layer. The convolutional filters of the fourteenth and fifteenth convolutional layers are both 3×3 in size with 1 padding and a stride of 1, and no downsampling operation;
[0062] Layer 4 consists of a seventh residual block and an eighth residual block. The seventh residual block expands the number of channels from 128 to 256. It contains a sixteenth convolutional layer, a seventeenth convolutional layer, and a tenth batch normalization layer. The convolutional layer filters in the sixteenth and seventeenth convolutional layers are both 3×3 in size, with 1 padding and a stride of 1. Simultaneously, the output of layer 3 is matched with the output of layer 4 through a third shortcut connection layer, and the channels are summed to obtain the final output. The third shortcut connection layer contains an eighteenth convolutional layer and an eleventh batch normalization layer. The eighteenth convolutional layer has 128 input feature channels and 256 feature maps for the output feature data. The convolutional filter is 1×1 in size, with no padding and a stride of 1. The eighth residual block maintains the number of channels at 256. It contains a nineteenth convolutional layer, a twentieth convolutional layer, and an eleventh normalization layer. The convolutional filters in the nineteenth and twentieth convolutional layers are both 3×3 in size, with 1 padding and a stride of 1, and no downsampling operation.
[0063] In this embodiment, the residual neural network model is trained in the first stage using a positive sample pair dataset to obtain an intermediate residual neural network model that has passed the first stage of training. Specifically, this includes:
[0064] The positive sample pair dataset is input into the residual neural network model to obtain the anchor sample features and the positive sample features. Based on the anchor sample features and the positive sample features, the feature similarity between the anchor sample and the positive sample is calculated, and the contrast loss between the anchor sample and the positive sample is calculated based on the feature similarity between the anchor sample and the positive sample. Based on the contrast loss between the anchor sample and the positive sample, the parameters of the residual neural network model are repeatedly optimized through the backpropagation algorithm until the residual neural network model converges or reaches the preset training epochs. The residual neural network model that has converged or reached the preset training epochs is used as the intermediate residual neural network model trained in the first stage.
[0065] in, In the formula, L slr The sim(u,v) function represents the feature similarity between the anchor sample and the positive sample, τ represents the temperature parameter, N is the total number of samples, and z represents the feature similarity between the anchor sample and the positive sample. i Indicates anchored sample x i Feature representation, Indicates anchored sample x i Positive samples after random data augmentation Feature representation, Including anchored sample x i and its positive samples The characteristic representation of any other sample, where τ represents the temperature coefficient.
[0066] This embodiment repeatedly optimizes the parameters of the residual neural network model using the backpropagation algorithm, enabling the residual neural network model to learn the feature representations of semantically similar samples. The learning objective can be expressed as min θ d(Φ θ (x i ),Φ θ (T[x i ])), where Φ θ This is the embedding function that the model learns in a self-supervised manner. During repeated optimization, the AdamW optimizer is used to optimize the ResNet network model with a learning rate of 0.01 and a weight decay coefficient of 0.0001, until the model converges or reaches the preset number of training epochs.
[0067] In this embodiment, the intermediate residual neural network model is trained in the second stage using polarization data and anchored sample training set to obtain a residual neural network model trained in the second stage, specifically including:
[0068] Based on the polarization dataset, a Pauli image set is obtained. Each Pauli image in the set is segmented using a superpixel segmentation algorithm to obtain a superpixel block set. Each superpixel block set contains multiple superpixel blocks, and each superpixel block includes multiple pixel coordinates and corresponding superpixel block index information. Based on the superpixel block index information and the coordinates of the center pixel of each anchor sample in the anchor sample dataset, the superpixel block to which each anchor sample belongs is determined. Using all non-edge region pixels of the superpixel block to which each anchor sample belongs as the center, a sample block set of the same size as the anchor sample is extracted. This involves: ...
[0069] Based on the nearest neighbor sample clusters of each anchor sample, the cluster feature contrast loss and soft assignment contrast loss are calculated; the total loss function is constructed based on the cluster feature contrast loss and soft assignment contrast loss; the parameters of the intermediate residual neural network model are optimized using the backpropagation algorithm based on the cluster feature contrast loss and soft assignment contrast loss until the intermediate residual neural network model converges or reaches the preset number of optimizations; the intermediate residual neural network model that has converged or reached the preset number of optimizations is used as the residual neural network model trained in the second stage.
[0070] This embodiment divides the PolSAR image into multiple local regions with similar scattering characteristics using superpixel segmentation technology. Combined with a contrastive learning framework, it constructs a nearest neighbor sample cluster under superpixel constraints, thereby learning discriminative feature representations and achieving high-precision unsupervised classification.
[0071] In a further embodiment, a Pauli image set is obtained based on the polarization dataset, specifically including: extracting the intensity information of the HH, HV and VV channels from the polarimetric SAR image to generate a Pauli image; and normalizing the generated Pauli image to scale the pixel values to the range of [0, 255].
[0072] The specific formulas are: R = |HH - W|, G = 2|HV|, B = |HH + VV|.
[0073] In a further embodiment, a superpixel segmentation algorithm is used to segment each Pauli image in the Pauli image set to obtain a superpixel block set. Specifically, this includes: setting the number of superpixels K, and calculating the initial grid size of each superpixel based on the size of the Pauli image; uniformly initializing K cluster centers on the Pauli image, with the position of each cluster center being the center point of the grid; for each pixel, calculating its distance to the cluster centers within a surrounding 2S×2S region; assigning each pixel to the nearest cluster center based on its distance to the cluster centers within the surrounding 2S×2S region, and updating the position of the cluster center to the average position of its constituent pixels; repeating the above process until the change in cluster centers is less than a threshold or the maximum number of iterations is reached, and then taking each grid where the change in cluster centers is less than the threshold or the maximum number of iterations is reached as a superpixel block, and combining all the superpixel blocks to form a superpixel block set.
[0074] in, In the formula, S represents the grid size, and N is the total number of pixels in the image. In this embodiment, K = 300. In the formula, D represents the distance between each pixel and the cluster center within the surrounding 2S×2S region, and d s and d c These are the color distance (based on Pauli RGB values) and spatial distance, respectively, with m being the weighting parameter.
[0075] The superpixel segmentation algorithm in this embodiment is the Simple Linear Iterative Clustering (SLIC) method, which divides the image into multiple superpixel regions, where pixels in each region have similar scattering characteristics.
[0076] To prevent interference from blurred samples at the edges of superpixel blocks, in this embodiment, based on Euclidean distance, the K nearest neighbor samples from their corresponding superpixel blocks are selected for each anchored sample. Specifically, this includes:
[0077] The anchor samples within a preset distance d of each anchor sample are grouped using Euclidean distance to form a similarity set S for each anchor sample. i Based on the L2 norm between feature representations, from the similarity set S of each anchored sample i Select anchor sample x i The top K nearest neighbors are used to construct the nearest neighbor sample cluster for each anchor sample.
[0078] Specifically, let z i Indicates anchored sample x i The features output by the residual neural network model then x i and x k The similarity between them is calculated as follows: S i ={x k ∈g i ∣‖(x k ,g c )‖2≤d};where,‖·‖2 represents the L2 norm, g i Represents a superpixel block, g c This represents the superpixel center of a superpixel block. The nearest neighbor sample cluster is represented as...
[0079]
[0080] In a further embodiment, based on the nearest neighbor sample cluster of each anchored sample, the cluster feature contrast loss and soft assignment contrast loss are calculated, specifically including:
[0081] Set up a group Indicates anchored sample x i The nearest neighbor sample cluster, where It is x i Nearest neighbor; any pair of samples in the same nearest neighbor cluster All are considered positive sample pairs, and x i Anchored samples that do not belong to the same nearest neighbor cluster are considered x i The negative samples are obtained; based on the similar semantic relationship between the nearest neighbor sample clusters of each anchor sample, the cluster feature contrast loss of the nearest neighbor sample cluster is calculated using contrast loss; the soft assignment probability of the intermediate residual neural network model to the sample cluster is obtained through the Softmax classifier, and the soft assignment contrast loss is calculated using the cross-entropy loss function.
[0082] in, In the formula, Indicates the total loss. Indicates soft allocation loss, λ represents the cluster feature contrast loss, and λ represents the weight coefficient.
[0083]
[0084] In the formula, Let x represent the i-th anchored sample. i and its nearest neighbor sample cluster A positive sample pair consisting of any nearest neighbor sample in x, where Group represents the nearest neighbor sample cluster, x k This indicates that the sample x does not belong to the i-th anchor sample. i Any sample in the nearest neighbor cluster, i.e., x i negative samples, Indicates positive sample pairs After feature representation by the residual neural network model, (z) i ,z k ) represents negative sample pairs (x i ,x k The feature representation of the residual neural network model shows that τ represents the temperature coefficient, which can affect the gradient of the loss function. The larger τ is, the stronger the influence of negative samples.
[0085]
[0086] In the formula, N represents the total number of anchored samples. x p represents the number of nearest neighbor samples in each nearest neighbor sample cluster. i Indicates anchored sample x i Feature representation z i The predicted vector output by the softmax layer, p j Indicates anchored sample x i nearest neighbor sample cluster Any nearest neighbor sample x in j Feature representation z j The predicted vector output after the softmax layer, where · represents the dot product operator. Indicates sample x i The probability assigned to cluster c, where c represents a certain cluster category, C represents the set of cluster categories, and β represents the entropy term. The weighting coefficients, the entropy term will predict a uniform distribution in each cluster.
[0087] It's important to know that during the process of generating the classification result image, different colors are assigned to each pixel according to its category.
[0088] In a second aspect, the present invention also proposes a polarimetric SAR image classification system, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the polarimetric SAR image classification method described in any one of the first aspects.
[0089] Thirdly, the present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the polarimetric SAR image classification method described in any one of the first aspects.
[0090] Fourthly, the present invention also proposes a computer program product, comprising a computer program that, when executed by a processor, implements the steps of the polarimetric SAR image classification method described in any one of the first aspects.
[0091] The effects of this invention can be further illustrated by the following simulation.
[0092] In this embodiment, the polarimetric SAR image selected for the simulation experiment is a polarimetric SAR image with actual ground feature markings, such as... Figure 2 As shown, this polarimetric SAR image is a composite of polarimetric SAR data of the San Francisco Bay Area acquired by the Canadian spaceborne C-band RADARSAT-2 system. The image contains 1800×1380 pixels. It primarily includes five land cover types: forest, water, high-density urban areas, low-density urban areas, and developing urban areas.
[0093] in, Figure 2 Real feature map such as Figure 3 As shown, the size of this ground feature map is the same as that of the polarimetric SAR image. In the ground feature map, the value at the pixel with a known feature category is the feature category number; such pixels are called marked pixels. The value at the pixel with an unknown feature category is 0.
[0094] Simulation Experiment 1 uses existing technology to perform Wishart clustering based on target decomposition (Freeman decomposition). Figure 2 The target polarimetric SAR image is classified, and the classification results are as follows: Figure 5 As shown in Table 1, the accuracy of land feature classification and the overall classification accuracy are as follows.
[0095] Simulation Experiment 2 uses the existing polarimetric SAR classification method based on autoencoder-decoder networks to classify SAR. Figure 2 The target polarimetric SAR image is classified, and the classification results are as follows: Figure 6 As shown in Table 1, the accuracy of land feature classification and the overall classification accuracy are as follows.
[0096] Simulation Experiment 3: The method of this invention was used to... Figure 2 The target polarimetric SAR image is classified, and the superpixel segmentation results are as follows: Figure 4 As shown in the figure, the classification results are as follows: Figure 7 As shown in Table 1, the accuracy of land feature classification and the overall classification accuracy are as follows.
[0097] Table 1
[0098]
[0099] As shown in Table 1, compared with the existing Wishart polarimetric SAR clustering method based on target decomposition (Freeman decomposition), this invention not only significantly improves the overall accuracy (OA), but also substantially improves the classification accuracy for forest and urban land cover types. This verifies that the deep unsupervised learning and clustering method proposed in this invention is significantly superior to methods based on scattering mechanisms. Compared with the existing polarimetric SAR classification method based on autoencoder-decoder networks, it improves the overall accuracy (OA) by 1.77%, and substantially improves the classification accuracy for forest and low-density urban land cover types. This verifies that the method proposed in this invention can not only effectively avoid the semantic discontinuity problem in the classification process of existing deep unsupervised methods, but also achieve higher overall classification accuracy. This provides an advanced and effective solution for existing unsupervised PolSAR image classification.
[0100] from Figure 5 , Figure 6 and Figure 7 It can be seen that, Figure 7 Closer to Figure 5 The true ground feature map of the polarimetric SAR image in the target domain, and Figure 7 The classification results show better regional consistency, mainly because the polarimetric SAR image classification method used in this invention can learn more extensive and discriminative feature representations, thereby effectively improving the accuracy of polarimetric SAR image classification and recognition.
[0101] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A polarimetric SAR image classification method characterized in that, The method comprises the following steps: acquiring a polarimetric dataset, wherein the polarimetric dataset comprises a polarimetric SAR image and a corresponding ground object real label image; constructing an anchor sample training set and a positive sample pair dataset according to the polarimetric dataset; constructing a residual neural network model; training the residual neural network model in a first stage by using the positive sample pair dataset, obtaining an intermediate residual neural network model trained in the first stage; training the intermediate residual neural network model in a second stage by using the polarimetric dataset and the anchor sample training set, obtaining a residual neural network model trained in the second stage; clustering a to-be-classified polarimetric SAR image by using the residual neural network model trained in the second stage, obtaining a polarimetric SAR image clustering result; mapping the polarimetric SAR image clustering result to a real label by using a Hungarian matching algorithm, obtaining a mapping result; and generating a classification result image according to the mapping result; wherein the anchor sample training set and the positive sample pair dataset are constructed according to the polarimetric dataset, and specifically comprising the following steps: obtaining a complex value feature matrix of the polarimetric SAR image according to the polarimetric SAR image, wherein the complex value feature matrix comprises a complex value feature vector of each pixel; generating labeled data according to the ground object real label image; constructing an initial ground truth matrix, and performing pixel-level label classification and labeling on the initial ground truth matrix according to the labeled data to generate a ground truth matrix; obtaining a complex value feature vector at a corresponding coordinate value in the complex value feature matrix as a first complex value feature vector according to a coordinate value of a labeled pixel in the ground truth matrix; selecting a plurality of complex value feature vectors as second complex value feature vectors around the first complex value feature vector as a center point; combining the first complex value feature vector and the second complex value feature vectors into a complex value feature matrix block; separating the upper triangular elements in the complex value feature vectors in the complex value feature matrix block into real parts and imaginary parts to form real value feature vectors; generating a high-dimensional real value feature matrix based on the real value feature vectors; and combining the pixel-level label classification and labeling information in the ground truth matrix and the high-dimensional real value feature matrix block to form the anchor sample training set; performing random data augmentation on the anchor sample training set to generate positive samples consistent with the semantics of the anchor samples in the anchor sample training set, and combining the anchor samples and their corresponding positive samples to form positive sample pairs; and combining all the positive sample pairs to form the positive sample pair dataset.
2. The polarimetric SAR image classification method of claim 1, wherein, The residual neural network model comprises an input layer, a residual layer, a global average pooling layer and a clustering head; wherein the input layer comprises a first convolutional layer and a first batch normalization layer, the first convolutional layer has an input feature channel number of 9, which is the same as the sample real value feature matrix, and outputs a feature map number of 64, the convolutional filter in the first convolutional layer has a size of 3×3, a padding of 1 and a moving step of 1. The residual layer comprises 4 residual structure levels, each level comprises a plurality of residual blocks, and each residual block comprises two convolution layers and a shortcut connection layer; the global average pooling layer is used to compress the spatial dimension of the feature map to 1*1 by using adaptive average pooling and output a feature dimension of 512; the clustering head is used to map the 512-dimensional feature to an n-dimensional space by using a linear layer to obtain the probability distribution of each sample belonging to n clustering categories.
3. The polarimetric SAR image classification method of claim 2, wherein, The 4 residual structure levels are layer1, layer2, layer3 and layer4 in sequence; layer1 comprises a first residual block and a second residual block, the input and output channel numbers of the two residual blocks are both 64, the first residual block comprises a second convolution layer, a third convolution layer and a second batch normalization layer, the second residual block comprises a fourth convolution layer, a fifth convolution layer and a third batch normalization layer, the convolution filter sizes in the second, third, fourth and fifth convolution layers are all 3*3, the padding is all 1, the moving step is all 1, and there is no downsampling operation; layer2 comprises a third residual block and a fourth residual block, the third residual block is used to expand the channel number from 64 to 128, the third residual block comprises a sixth convolution layer, a seventh convolution layer and a fourth batch normalization layer, the convolution filter sizes in the sixth and seventh convolution layers are 3*3, the padding is 1, the moving step is 1, and there is no downsampling operation; meanwhile, the output of layer1 and the output of layer2 are matched in channel number and summed by a first shortcut connection layer to serve as the input of layer3; the first shortcut connection layer comprises an eighth convolution layer and a fifth batch normalization layer, the input feature channel number of the eighth convolution layer is 64, the output feature data has a feature map number of 128, the convolution filter size in the eighth convolution layer is 1*1, there is no padding, and the moving step is 1; the fourth residual block keeps the channel number as 128, the fourth residual block comprises a ninth convolution layer, a tenth convolution layer and a sixth batch normalization layer, the convolution filter sizes in the ninth and tenth convolution layers are 3*3, the padding is 1, the moving step is 1, and there is no downsampling operation; The layer 3 includes a fifth residual block and a sixth residual block; the fifth residual block expands the number of channels from 128 to 256, and the fifth residual block includes an eleventh convolutional layer, a twelfth convolutional layer and a seventh batch normalization layer; the convolutional filter in the eleventh convolutional layer has a size of 3*3, a padding of 1 and a moving step of 2 to perform a down-sampling operation; the convolutional filter in the twelfth convolutional layer has a size of 3*3 and a padding of 1 and a moving step of 1; meanwhile, the output of the layer 2 is matched with the output of the layer 3 in the number of channels through a second shortcut connection layer and summed as the input of the layer 4; the second shortcut connection layer includes a thirteenth convolutional layer and an eighth batch normalization layer; the thirteenth convolutional layer has an input feature channel number of 128, an output feature data feature map number of 256 and a convolutional filter size of 1*1 without padding and with a moving step of 1; the sixth residual block keeps the number of channels as 256, and the sixth residual block includes a fourteenth convolutional layer, a fifteenth convolutional layer and a ninth batch normalization layer; the convolutional filter in the fourteenth convolutional layer and the fifteenth convolutional layer has a size of 3*3, a padding of 1 and a moving step of 1 without a down-sampling operation. The layer 4 includes a seventh residual block and an eighth residual block; the seventh residual block expands the number of channels from 128 to 256, and the seventh residual block includes a sixteenth convolutional layer, a seventeenth convolutional layer and a tenth batch normalization layer; the convolutional filter in the sixteenth convolutional layer and the seventeenth convolutional layer has a size of 3*3, a padding of 1 and a moving step of 1; meanwhile, the output of the layer 3 is matched with the output of the layer 4 in the number of channels through a third shortcut connection layer and summed as the final output; the third shortcut connection layer includes an eighteenth convolutional layer and an eleventh batch normalization layer; the eighteenth convolutional layer has an input feature channel number of 128 and an output feature data feature map number of 256, and the convolutional filter has a size of 1*1 without padding and with a moving step of 1; the eighth residual block keeps the number of channels as 256, and the eighth residual block includes a nineteenth convolutional layer, a twentieth convolutional layer and an eleventh batch normalization layer; the convolutional filter in the nineteenth convolutional layer and the twentieth convolutional layer has a size of 3*3, a padding of 1 and a moving step of 1 without a down-sampling operation.
4. The polarimetric SAR image classification method of claim 1, wherein, The positive sample pair dataset is input into the residual neural network model to obtain the anchor sample feature and the positive sample feature; the feature similarity between the anchor sample and the positive sample is calculated according to the anchor sample feature and the positive sample feature, and the contrast loss between the anchor sample and the positive sample is calculated according to the feature similarity between the anchor sample and the positive sample; The parameters of the residual neural network model are repeatedly optimized through the back propagation algorithm according to the contrast loss between the anchor sample and the positive sample until the residual neural network model converges or reaches a preset training round; and the residual neural network model that converges or reaches the preset training round is taken as the intermediate residual neural network model trained in the first stage. 5. The polarimetric SAR image classification method of claim 1, wherein, The intermediate residual neural network model is trained in a second stage by using the polarization data and the anchor sample training set, to obtain a residual neural network model trained in the second stage, specifically including: According to the polarization data set, a Pauli image set is obtained; a superpixel segmentation algorithm is used to segment each Pauli image in the Pauli image set to obtain a superpixel block set; wherein the superpixel block set contains a plurality of superpixel blocks, and each superpixel block includes a plurality of pixel point coordinates and corresponding superpixel block index information; according to the superpixel block index information and the coordinates of the center pixel point of each anchor sample in the anchor sample data set, the superpixel block to which each anchor sample belongs is determined; taking all non-edge region pixels of the superpixel block to which each anchor sample belongs as the center, a sample block set with the same size as the anchor sample is taken out as the sample candidate set of the nearest neighbor sample cluster of the anchor sample; the samples in the candidate set corresponding to each anchor sample are input into the intermediate residual neural network model to obtain the candidate feature library of the nearest neighbor sample cluster of each anchor sample; the anchor feature of each anchor sample is obtained by inputting the anchor sample into the intermediate residual neural network model; the Euclidean distance between the anchor feature of each anchor sample and all feature tensors in the candidate feature library is calculated; according to the Euclidean distance, the K nearest neighbor samples closest to each anchor sample are selected; the K nearest neighbor samples selected for each anchor sample are combined to form the nearest neighbor sample cluster of each anchor sample; According to the nearest neighbor sample cluster of each anchor sample, a cluster feature contrast loss and a soft assignment contrast loss are calculated; a total loss function is constructed according to the cluster feature contrast loss and the soft assignment contrast loss; the parameters of the intermediate residual neural network model are optimized by a back propagation algorithm according to the cluster feature contrast loss and the soft assignment contrast loss, until the intermediate residual neural network model converges or reaches a preset optimization number; the intermediate residual neural network model that converges or reaches the preset optimization number is taken as the residual neural network model trained in the second stage.
6. The polarimetric SAR image classification method according to claim 5, characterized in that, The total loss of the second stage training is ; In the formula, denotes the total loss, denotes the soft assignment loss, denotes the cluster feature contrast loss, denotes the weight coefficient; ; wherein represents the i-th anchor sample and its nearest neighbor sample cluster a positive sample pair consisting of any nearest neighbor sample in represents the nearest neighbor sample cluster, represents any sample not belonging to the nearest neighbor sample cluster of the i-th anchor sample i.e. a negative sample of represents the positive sample pair the feature representation of the positive sample pair represents the negative sample pair the feature representation of the negative sample pair represents the temperature coefficient; ; wherein denotes the total number of anchor samples, denotes the number of nearest neighbor samples in each cluster of nearest neighbor samples, denotes an anchor sample a feature representation of a prediction vector output by a softmax layer, denotes an arbitrary nearest neighbor sample of a cluster of nearest neighbor samples of an anchor sample a feature representation of a prediction vector output by a softmax layer, denotes a dot product operator, denotes a probability that a sample is assigned to a cluster class, denotes a certain cluster class, denotes a set of cluster classes, denotes a weight coefficient of an entropy term .
7. A polarimetric SAR image classification system comprising a memory, a processor and a computer program stored on the memory, characterized in that, The processor executes the computer program to implement the steps of the polarimetric SAR image classification method of any one of claims 1-6.
8. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the polarimetric SAR image classification method of any one of claims 1-6.
9. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the polarimetric SAR image classification method of any one of claims 1-6.
Citation Information
Patent Citations
Deep learning model backdoor construction method based on lossy image compression
CN115147647A
Polarimetric SAR (Synthetic Aperture Radar) image carbon sink target classification method based on complex value separation and alignment network
CN117456227A