Remote sensing image crop classification method based on self-supervised learning

Learning features from unlabeled data through a self-supervised learning network solves the problem of traditional methods relying on annotated data and professional knowledge, achieves efficient remote sensing image crop classification, adapts to different remote sensing image scenarios, and reduces costs and manual annotation burdens.

CN118537652AActive Publication Date: 2024-08-23NORTH CHINA INST OF AEROSPACE ENG

Patent Information

Application Number
CN202410740434.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-08
Publication Date
2024-08-23
Estimated Expiration
2044-06-08

AI Technical Summary

Technical Problem

Traditional remote sensing image crop classification methods require a large amount of annotated data, and feature extraction relies on professional knowledge, making it difficult to adapt to the complexity and changes of remote sensing images. In particular, it is costly and difficult to obtain and annotate remote sensing image data.

Method used

Using a method based on self-supervised learning, features are learned from unlabeled data through a self-supervised learning network, and technologies such as NDVI, OTSU segmentation algorithm and principal component analysis are used to construct a coarse classification sample data set, and through the cascaded agent task network and The clustering network is trained to implement crop classification.

Benefits of technology

Without the need for a large amount of labeled data, the model can learn features on its own, improve generalization capabilities, adapt to different remote sensing image scenarios, save time and costs, and reduce manual annotation workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537652A
    Figure CN118537652A
Patent Text Reader

Abstract

The invention discloses a remote sensing image crop classification method based on self-supervised learning, and the method comprises the steps: extracting crop sample data according with a rule through a full-automatic sample selection method, processing the crop sample data into a rough training sample set, carrying out the representation learning through employing an agent task in combination with an attention mechanism, and carrying out the classification of crops. Similar pictures of the remote sensing pictures are determined based on feature similarity, and then fine classification is carried out by taking proxy features as prior conditions of semantic clustering and taking a maximum dot product after softmax as a loss function. According to the invention, unsupervised training is carried out on a similar learning method of the features of the image, and crop classification is completed through a clustering method, so that complexity and high cost of manual data labeling are avoided; meanwhile, compared with a traditional manual feature extraction method, the method can better adapt to complexity and changes of remote sensing images, meanwhile, unlabeled data can be better utilized for training, and the crop classification accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a remote sensing image crop classification method, in particular to a remote sensing image crop classification method based on self-supervised learning, and belongs to the technical field of agricultural remote sensing. Background Art

[0002] At present, remote sensing image crop classification refers to the task of assigning a semantic label in a predefined crop category to the input remote sensing image, which is an important research direction in the field of remote sensing image processing. Traditional image classification methods are mainly based on manually extracted features, such as local binary patterns (LBP) and gray-level co-occurrence matrices (GLCM). For different remote sensing images, the features they extract may vary greatly, resulting in reduced classification accuracy. This is because traditional methods require sufficient expertise and domain experience for feature extraction and selection, especially for special classification targets such as crops. It is difficult to fully adapt to the complexity and changes of remote sensing images.

[0003] In recent years, the development of deep learning technology has greatly promoted the research of crop classification in remote sensing images. These methods can automatically learn features from raw data and improve classification accuracy through multi-level neural networks. However, traditional deep learning methods require a large amount of labeled data, which is difficult to achieve in the field of remote sensing images because it is very difficult and expensive to obtain and label a large amount of remote sensing image data, and it is even more difficult to obtain enough and representative samples. Therefore, a new method that can better utilize unlabeled data for training is needed to improve the accuracy of crop classification. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a remote sensing image crop classification method based on self-supervised learning.

[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0006] A remote sensing image crop classification method based on self-supervised learning includes the following steps:

[0007] Step 1: Preprocessing of remote sensing image data: After preprocessing the remote sensing image data, a fused image is obtained, and the normalized vegetation index NDVI of each pixel is calculated from the fused image to obtain a normalized vegetation index distribution map; the calculation method of the normalized vegetation index NDVI is:

[0008]

[0009] In the formula, B4 represents the red band, and B5 represents the near-red band;

[0010] Step 2: Construction of coarse classification sample data set: It consists of the following specific steps:

[0011] Step 2-1: Use the OTSU segmentation algorithm to segment the normalized vegetation index distribution map into wheat areas and non-wheat areas;

[0012] Step 2-2: The B6 short red band and the B7 short red band of the fused image are subjected to dimensionality reduction processing by the principal component analysis method PCA to obtain a short red band SWIR image retaining only the first principal component;

[0013] Step 2-3: Use the OTSU segmentation algorithm to segment the short red band SWIR image into corn areas and non-corn areas;

[0014] Step 2-4: Find the intersection of the non-wheat area in the NDVI distribution map and the non-corn area in the short red band SWIR image, and mark it as the corn area;

[0015] Step 2-5: Label the corn area, soybean area, and wheat area as the corresponding areas in the fused image. Areas with more than one category label in the same area will not be labeled, and areas with an area smaller than the preset area threshold will not be labeled.

[0016] Step 2-6: Cut the fused image according to the preset cutting size to obtain the segmented image, mark the labels as wheat area, soybean area and corn area, and select the coarse sample training data according to the preset ratio of the segmented image of the corn area;

[0017] Step 3: Divide the training set and the test set: adjust the segmented image in the coarse classification sample data set to a preset resolution, normalize its pixel value to between 0 and 1, and select the training set and the test set according to the preset ratio and preset number;

[0018] Step 4: Preparation of similar data sets: Perform RandAugment enhancement processing twice on the segmented images in the training set to obtain an expanded training set;

[0019] Step 5: Construct a self-supervised learning network: The self-supervised learning network is composed of a cascaded proxy task network and a clustering network; the proxy task network is composed of a cascaded backbone network, an average pooling layer Avgpool, a fully connected layer Linear1, an activation function ReLU1, a fully connected layer Linear2, and a normalization layer Normalization;

[0020] The backbone network includes a DBR1 component cascaded in sequence, two 2DS-2CBAM components with the same structure, and the first to third combination components with the same structure; the first combination component is composed of a cascaded 3DS-3CBAM component and a 2DS-2CBAM component; the 2DS-2CBAM component is composed of a DBR2 component, a convolutional attention module CBAM1, a DB1 component, a convolutional attention module CBAM2 and an SR1 component cascaded in sequence, and the input end of the 2DS-2CBAM component is respectively connected to the input end of the DBR2 component and the SR1 component; the 3DS-3CBAM component includes a DBR3 component, a DB2 component, a DB3 component, a convolutional attention module CBAM3- CBAM5, SR2 components, the input of the 3DS-3CBAM component is connected to the input end of the SR2 component through the DB2 component and the convolutional attention module CBAM3 in sequence, and the other path is connected to the input end of the SR2 component through the DBR3 component, the convolutional attention module CBAM4, the DB3 component, and the convolutional attention module CBAM5 in sequence; the DBR1 component, the DBR2 component and the DBR3 component have the same structure, and the DBR1 component consists of a sequentially cascaded convolutional layer conv2d, a batch normalization BN layer and an activation function ReLU2; the SR1 component and the SR2 component have the same structure, and the SR1 component consists of a cross-layer connection layer shortcut and an activation function ReLU3;

[0021] Step 6: Train the self-supervised learning network: Use the training set to train the self-supervised learning network;

[0022] Step 7: Use the self-supervised learning network model for crop classification:

[0023] The remote sensing data to be classified is input into the self-supervised learning network to obtain the crop classification results.

[0024] Furthermore, the data preprocessing in step 1 includes radiation calibration, atmospheric correction, orthorectification and radiation correction.

[0025] Furthermore, in the step 1, the multispectral data of the remote sensing satellite image is subjected to radiation calibration, atmospheric correction, and orthorectification, and then the panchromatic image is subjected to radiation correction and orthorectification. Finally, the corrected multispectral data and the panchromatic image are resampled according to a preset resolution and fused to obtain a fused image.

[0026] Furthermore, in step 1, the multispectral data is resampled according to the resolution of the panchromatic image and then fused with the panchromatic image to obtain a fused image.

[0027] Furthermore, the DBR1 component parameters are: convolution kernel size is 3x 3, padding is 1, stride is 2, and dilation is 1.

[0028] Furthermore, the DB1 component parameters are: convolution kernel size is 3x 3, padding is 0, stride is 2, and dilation is 1.

[0029] The beneficial effects of adopting the above technical solution are:

[0030] (1) The present invention does not require a large amount of labeled data, and the model can learn by itself from unlabeled data, thus greatly reducing the workload of manual labeling.

[0031] (2) The present invention learns similarities from unlabeled data and can learn more features from it, thereby improving the generalization ability of the model.

[0032] (3) The present invention has strong adaptability and can use different remote sensing image scenes and crop classification tasks to expand the training model in different self-supervised tasks.

[0033] (4) The present invention does not require data labeling and manual intervention, which greatly saves time and cost, especially for the production of large-scale remote sensing image data. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 is a flow chart of the present invention;

[0035] Figure 2 is a flow chart of the fully automatic sample selection of the present invention;

[0036] Figure 3 is a self-supervised task learning flow chart of the present invention;

[0037] Figure 4 is a diagram of a proxy task network structure of Example 1 of the present invention;

[0038] Figure 5 is a structural diagram of a 2DS-2CBAM assembly according to Embodiment 1 of the present invention;

[0039] Figure 6 is a structural diagram of a 3DS-3CBAM component according to Embodiment 1 of the present invention;

[0040] Figure 7 is a structural diagram of a DBR component according to Embodiment 1 of the present invention;

[0041] Figure 8 This is a structural diagram of the SR component of Example 1 of the present invention. DETAILED DESCRIPTION

[0042] Embodiment 1:

[0043] A remote sensing image crop classification method based on self-supervised learning includes the following steps:

[0044] Step 1: Preprocessing of remote sensing image data: After preprocessing the remote sensing image data, a fused image is obtained, and the normalized vegetation index NDVI of each pixel is calculated from the fused image to obtain a normalized vegetation index distribution map; the calculation method of the normalized vegetation index NDVI is:

[0045]

[0046] In the formula, B4 represents the red band, and B5 represents the near-red band;

[0047] Data preprocessing includes radiometric calibration, atmospheric correction, orthorectification and radiometric correction. The remote sensing image data used in this embodiment is high-resolution remote sensing image data, which is Landset 8 satellite image. This embodiment uses ENVI software to perform radiometric calibration, atmospheric correction, orthorectification on the multispectral data of Landset 8 remote sensing satellite image, and then performs radiometric correction and orthorectification on the panchromatic image.

[0048] Radiometric calibration converts the digital quantization value DN of multispectral data and panchromatic images into physical quantities such as radiation brightness value and reflectivity. This embodiment uses the radiometric calibration tool RadiometricCalibration in ENVI to read parameters from the metadata file to complete the calibration.

[0049] Atmospheric correction uses the complete ENVI fast atmospheric correction tool FLASSH to eliminate the radiation error in multispectral data and invert the true surface reflectivity of the ground object.

[0050] Orthorectification uses ENVI's RPC correction to eliminate the image point displacement caused by projection errors caused by terrain undulations and errors such as the internal and external states of the sensor in multispectral data and panchromatic images, thereby obtaining an orthophoto that can accurately and objectively represent the shape and spatial position of the object.

[0051] The corrected multispectral data is resampled to generate a multispectral remote sensing image with the same resolution as the panchromatic image, and the GS fusion method of ENVI fuses the multispectral remote sensing image and the panchromatic image into a fused image. In this embodiment, the resolution is 15 meters.

[0052] Step 2: Construction of coarse classification sample data set: It consists of the following specific steps:

[0053] Step 2-1: Use the OTSU segmentation algorithm to segment the normalized vegetation index distribution map into wheat areas and non-wheat areas;

[0054] NDVI is the abbreviation of Normalized Difference Vegetation Index, which is an index used for remote sensing image analysis. Wheat and soybean can be distinguished by NDVI value, which reflects the growth status and coverage of vegetation by comparing the reflectivity of red light and near-infrared light. Generally, the NDVI value of wheat is higher because of its higher chlorophyll content and denser leaves, while the NDVI value of soybean is lower because of its lower chlorophyll content and sparser leaves, which can effectively distinguish wheat and soybean.

[0055] Step 2-2: The B6 short red band and the B7 short red band of the fused image are subjected to dimensionality reduction processing by the principal component analysis method PCA to obtain a short red band SWIR image with only the first principal component retained; the purpose of PCA processing of the B6 short red band and the B7 short red band is to map high-dimensional data to low-dimensional space. The first principal component retains the maximum data variance information and minimizes data redundancy and noise. The first principal component obtained, soybean, is higher than corn and can be distinguished.

[0056] Step 2-3: Use the OTSU segmentation algorithm to segment the short red band SWIR image into corn areas and non-corn areas;

[0057] Step 2-4: Mark the intersection of the non-wheat area in the wheat distribution map and the non-corn area in the short red band SWIR image as the corn area;

[0058] Step 2-5: Label the corn area, soybean area, and wheat area as the corresponding areas in the fused image. Areas with more than one category label in the same area will not be labeled, and areas with an area smaller than the preset area threshold will not be labeled.

[0059] In this embodiment, the histogram statistics method is used and the threshold range for extracting each type of crop is automatically determined according to the confidence interval to obtain the first threshold and the second threshold. The OTSU algorithm calculates the inter-class variance of the image based on the first threshold and the second threshold, thereby dividing the image into two parts: the foreground and the background. Through three segmentations, a wheat region segmentation map, a soybean region segmentation map, and a corn region segmentation map can be obtained.

[0060] The NDVI threshold of wheat is 51 to 102, the NDVI threshold of soybean is 103 to 153, the short red band reflectance of soybean is 102 to 128, and the short red band reflectance threshold of corn is 51 to 102. In this embodiment, the area threshold is a 10*10 pixel block.

[0061] Step 2-6: Cut the fused image according to the preset cutting size to obtain a segmented image, label it as wheat area, soybean area and corn area, and select coarse sample training data according to the preset ratio. In this embodiment, the preset cutting size is 64*64, and the coarse sample training data of wheat area, soybean area and corn area are selected according to the ratio of 1:1:1.

[0062] Different label annotations are distinguished by file naming. In the file name 0_*, 1_*, 2_*, 0, 1, and 2 represent wheat, soybean, and corn respectively, and a coarse classification sample data set can be obtained.

[0063] The present invention utilizes threshold-based image segmentation to complete the segmentation task, ignores image outliers, and automatically selects appropriate area thresholds of various types to prevent interference with the training part.

[0064] The present invention combines the removal of training samples of excess crops of one type in the image and the uniform setting of samples of each type, thereby obtaining pure data samples.

[0065] Step 3: Divide the training set and test set: Save the file format of the coarse classification sample data set as a jpg image, resize the image to 32*32, normalize the pixel value to between 0 and 1, and store it in an 8:2 manner, with 80% as the training set and 20% as the test set. It is important to ensure that the number of each category is not less than 2000. The training set is used to train the self-supervised learning network, and the prediction set is used to test the performance of the self-supervised learning network.

[0066] This embodiment processes the above data into a collection text file for the training set, a collection text file for the test set containing category information, and a statistical information file for storing the total number of samples, sample type names, and the number of pixels contained, in order to classify the subsequent collection test set.

[0067] Step 4: Preparation of similar data sets: Perform two RandAugment enhancement algorithms on the files in the coarse classification sample data set to obtain an expanded data set to randomly enrich the diversity of samples and better learn similar features for subsequent proxy tasks. After the transformation, two types of enhanced result data are obtained as data inputs for the proxy task learning network. The RandAugment enhancement algorithm applies n enhancement operations to each image, where n is an integer greater than or equal to 1, and the operation parameters of each operation are randomly selected. Common enhancement operations include random horizontal flipping, rotation, and changing the brightness and contrast of the image.

[0068] Step 5: Construct a self-supervised learning network: The self-supervised learning network is formed by merging the proxy task network and the clustering network; the proxy task network is composed of a cascaded backbone network, an average pooling layer Avgpool, a fully connected layer Linear1, an activation function ReLU1, a fully connected layer Linear2, and a normalization layer Normalization;

[0069] The backbone network includes a DBR1 component cascaded in sequence, two 2DS-2CBAM components with the same structure, and the first to third combination components with the same structure; the first combination component is composed of a cascaded 3DS-3CBAM component and a 2DS-2CBAM component; the 2DS-2CBAM component is composed of a DBR2 component, a convolutional attention module CBAM1, a DB1 component, a convolutional attention module CBAM2, and an SR1 component cascaded in sequence, and the input end of the 2DS-2CBAM component is connected to the input end of the DBR2 component and the SR1 component respectively; the 3DS-3CBAM component includes a DBR3 component, a DB2 component, a DB3 component, a convolutional attention module CBAM3 -CBAM5, SR2 components, the input of the 3DS-3CBAM component is connected to the input of the SR2 component through the DB2 component and the convolutional attention module CBAM3 in sequence, and the other path is connected to the input of the SR2 component through the DBR3 component, the convolutional attention module CBAM4, the DB3 component, and the convolutional attention module CBAM5 in sequence; the DBR1 component, the DBR2 component and the DBR3 component have the same structure, and the DBR1 component consists of a cascaded convolutional layer conv2d, a batch normalization BN layer and an activation function ReLU2; the SR1 component and the SR2 component have the same structure, and the SR1 component consists of a cross-layer connection shortcut and an activation function ReLU3.

[0070] In this embodiment, five convolutional attention modules CBAM are inserted into the deep convolutional neural network Restnet-18 network as the backbone network for feature extraction, which is normalized to the L2 paradigm, that is, the Euclidean distance. The entire network learns by narrowing the difference between two eigenvalues ​​to cope with the complexity of the remote sensing image itself and the problem of small and inconspicuous features. The number of nearest neighbors is then determined through an instance discrimination task based on noise contrast estimation.

[0071] Convolutional Attention Module (CBAM) is an attention mechanism for computer vision tasks, which aims to improve the performance of convolutional neural networks (CNNs) in image processing tasks. It uses channel attention to adaptively capture important information in different channels, map each channel to a smaller vector, and then map the vector back to the vector of the original number of channels. These vectors represent the importance of each channel on a given feature map. The vectors are weighted to obtain crop features.

[0072] The Euclidean distance measurement method calculates each image, including minimizing the feature distance between enhanced images, that is, the nearest neighbor image corresponding to each image, and the neighbor images are clustered together, while separating images of different categories.

[0073] After two enhancements, images 1 and 2 are respectively input into the backbone network according to the original 3*32*32 size. A 64*32*32 feature channel feature map is extracted from the original image through a DBR component and two 2DS-2CBAM components. Each channel corresponds to some abstract features in the image. The feature channel feature map is then operated three times through three identically connected combined components, becoming sizes of 128*16*16, 256*8*8 and 512*4*4 respectively. The convolution process parameters of the DBR component and DB component in the 2DS-2CBAM component are that the convolution kernel size is 3x 3, padding is 1, stride is 1, and dilation is 1. The parameters of the DB component process are that the convolution kernel size is 1*1, padding is 0, stride is 2, and dilation is 1. The parameters of the DBR component are that the convolution kernel size is 3*3, padding is 1, stride is 2, and dilation is 1. The parameters of the DB component convolution process are that the convolution kernel size is 3x 3, padding is 1, stride is 1, and dilation is 1.

[0074] In the DBR component, the Conv2d layer is used to perform convolution operations on the input features, the BN layer is used to normalize the output features, and the ReLU activation function layer is used to increase the nonlinear expression ability of the network. The function of the DBR module is to convert the input image into a high-dimensional feature representation, providing richer and more effective features for the subsequent classification or detection tasks of the network.

[0075] The DBR component is the same as the DB component. The DB component uses the ReLU activation function, while the DBR component uses the Residual connection. The Residual connection means that the input is directly added to the output, and then the ReLU activation is performed. This can make the network deeper, while ensuring the stability of gradient propagation and alleviating the problem of gradient disappearance, thereby improving the performance and training speed of the model.

[0076] The cross-layer connection layer shortcut in the SR component can directly connect the input to the output to avoid the problem of gradient vanishing or gradient exploding due to the depth of the network layer. Through this cross-layer connection method, information can be transmitted more smoothly in the neural network, improving the performance and effect of the network. ReLU refers to the rectified linear unit, which is a commonly used activation function. It can change negative numbers to 0 and keep positive numbers unchanged, thereby making the nonlinear fitting ability of the neural network stronger. At the same time, it can prevent the problem of gradient vanishing and improve the training speed and performance of the network. Through the combination of cross-layer connection and ReLU activation function, the SR component can increase the depth and width of the neural network and improve the network's expression ability and performance.

[0077] Use the training set to train the self-supervised learning network, and use the prediction set to test the performance of the self-supervised learning network.

[0078] In the feature extraction process of the above network, a channel attention mechanism (CBAM) is added after the convolution layer of each DBR component and DB component to adaptively focus on the feature information extraction of farmland and reduce the interference of other information. Because the remote sensing farmland information itself has obvious spatial characteristics, it can effectively combine the spatial attention relationship of CBAM to learn the spatial position relationship.

[0079] The CBAM attention mechanism is an important mechanism that can enhance the expressiveness and performance of neural networks. It mainly consists of two parts: channel attention and spatial attention. Channel attention is used to learn the relationship between channels, and spatial attention is used to learn the relationship between spatial positions. Specifically, channel attention learns the importance weight of each channel by performing global pooling and full connection operations on each channel; spatial attention learns the relationship between different positions by performing global pooling and full connection operations on the feature map of each channel.

[0080] The 512*4*4 feature map is downsampled and feature extracted to 512 through average pooling. Average pooling can reduce the size of the feature map and smooth the input features to make the features more stable and smooth. The result is output with a feature dimension of 512 through a fully connected layer. After a layer of ReLU and a fully connected layer, the 512 dimension is reduced to 128 to extract more valuable features and reduce the computational complexity and parameter amount of the model, thereby improving the generalization ability and training efficiency of the model.

[0081] The feature graph obtained by the network is used to calculate the similarity of the two feature graphs through the Euclidean distance. For the n-dimensional feature vectors A and B, their Euclidean distance D(A,B) is expressed as:

[0082]

[0083] That is, through the above formula, we can get the distance between two feature vectors in space. The smaller the Euclidean distance is, the higher the similarity between the two feature maps is. Conversely, the lower the similarity between the two feature maps is. And normalization is performed to ensure that the distance value is within a certain range. The method is to divide the distance value by the dimension of the feature vector, that is:

[0084]

[0085] The distance value D′(A, B) obtained in this way ranges from 0 to 1, which is convenient for subsequent calculations and comparisons.

[0086] The normalized results obtained above are constrained by the loss function based on noise contrast estimation (NCE) as the proxy task to obtain the model of this module. NCE is a method for training contrast loss. Contrastive loss refers to a method that makes samples of the same category closer in the feature space, while samples of different categories are more dispersed. That is, given a sample and a noise sample, their feature vectors are used as the input of the model to predict whether they belong to the same category.

[0087] According to the preliminary similarity classification results obtained above, the K-means method is combined to perform clustering, and three clusters are divided here. The core idea of ​​the algorithm is to assign data points to the cluster center closest to them. The cluster center is obtained by calculating the average value of all data points in the cluster, and then each cluster is updated with the new cluster center until the change in the cluster center is less than a certain threshold or reaches a predetermined number of iterations.

[0088] After using k-means to cluster and obtain three cluster centers, we can divide each sample x i Assign to the nearest cluster center j to obtain a category label y for each sample i , where y i ∈{1, 2, 3}. At this point, we can incorporate the cross entropy loss function to constrain the learning of the classification model by calculating the cross entropy between the negative logarithm softmax value of the distance from the cluster center and the one-hot encoded category label for each sample.

[0089] The negative logarithmic softmax function is a commonly used probability distribution function, which converts a vector into a probability distribution vector in which each component is non-negative and the sum is 1.

[0090] Specifically, for each sample x i , and its distance from each cluster center can be expressed as d ij =||xi-cj||2, where c jrepresents the jth cluster center. Then we can define the negative logarithmic softmax function:

[0091]

[0092] in Represents the probability estimate that sample xi belongs to category j. We use the one-hot encoded category label y i To define the weighted cross entropy loss function:

[0093]

[0094] Where N represents the number of samples, w i is the weight of category j. Since the samples are uniform, the weight y ij Represents sample x i Whether it belongs to category j, cross entropy is a loss function used to measure the difference between the model prediction results and the actual results. The smaller the cross entropy value, the closer the model prediction results are to the actual results.

[0095] The virtual labels are made through the prediction results above, and the real labels and virtual labels are mixed together in a certain proportion. They are input as new labels into the cross entropy loss function to calculate the loss, increase the amount of data, optimize the classification results, and improve the generalization ability of the model.

[0096] The accuracy of different crops is calculated through the confusion matrix, and the different clustering results are assigned wheat, soybean or corn category names in combination with the label content of the test set itself, and stored separately to complete the final classification task of naming.

[0097] The confusion matrix is ​​a table used to evaluate the performance of a classification model, in which columns represent predictions and rows represent true labels. Each element in the matrix represents the number of samples whose predictions are for the category corresponding to the column when the true label is the category corresponding to the row.

[0098] Step 6: Train the self-supervised learning network: Use the training set to train the self-supervised learning network;

[0099] In the setting of hyperparameters, the proxy task selected a batch size of 512 to perform the representation learning process for 500 epochs, where the learning rate was 0.4 and gradually decreased during the training process, the temperature parameter was 0.1, and the temperature hyperparameter was used to control the scale of the normalized activation in the contrast loss function, the weight decay was 10-4, and L2 regularization was combined to complete the network task.

[0100] To speed up training, we transfer the weights obtained from the clustering task to the initial clustering step, which we perform for 100 epochs using a batch size of 128. The loss function weight is set to λ = 5. Higher weights avoid grouping samples too early during training.

[0101] After the virtual labeling step, we use the self-labeling process with a threshold of 0.99 to train another 200 epochs. The imbalance between confidence samples across clusters is compensated by weighted cross entropy loss. Because the learning rate is set to 10-4 and the weight decay is 10-4, the entire self-supervised learning process updates the network weights through the Adam algorithm, because the Adam algorithm itself has the advantages of faster convergence speed and better generalization performance to complete the final optimization classification task of the model.

[0102] Step 7: Use the self-supervised learning network model for crop classification:

[0103] The remote sensing data to be classified is input into the self-supervised learning network to obtain the crop classification results.

[0104] The present invention extracts crop sample data that meets the rules through a fully automated sample selection method, combines data processing to produce a training sample set, uses proxy tasks for representation learning, and mines the nearest neighbors of each image based on feature similarity, that is, similar images of each remote sensing image. The attention mechanism is combined to better focus on the feature differences of the crops themselves, and then the proxy features are used as the prior conditions for semantic clustering. The maximized dot product after softmax is used as the loss function to classify each image and its mined neighbors into a group of categories. Finally, virtual labels are made to remove noise problems, optimize reclassification, and combine the test set and information file in the data set to complete the final category name assignment.

[0105] The present invention can explore similarities from the image itself through self-supervised learning, reducing a series of cost issues. By combining the semantic clustering analysis method of the proxy task with the attention mechanism module, it can effectively focus on the characteristics of the crop itself and can be better applied to the classification of crops. Secondly, the complexity and variability of the remote sensing image itself can also be well handled.

Claims

1. A remote sensing image crop classification method based on self-supervised learning, Features: The following steps are involved: Step 1: Preprocessing of remote sensing image data: After preprocessing the remote sensing image data, a fused image is obtained, and the normalized vegetation index NDVI of each pixel is calculated from the fused image to obtain a normalized vegetation index distribution map; The calculation method of normalized vegetation index NDVI is: In the formula, B4 represents the red band, and B5 represents the near-red band; Step 2: Construction of coarse classification sample data set: It consists of the following specific steps: Step 2-1: Use the OTSU segmentation algorithm to segment the normalized vegetation index distribution map into wheat areas and non-wheat areas; Step 2-2: The B6 short red band and the B7 short red band of the fused image are subjected to dimensionality reduction processing by the principal component analysis method PCA to obtain a short red band SWIR image retaining only the first principal component; Step 2-3: Use the OTSU segmentation algorithm to segment the short red band SWIR image into corn areas and non-corn areas; Step 2-4: Find the intersection of the non-wheat area in the NDVI distribution map and the non-corn area in the short red band SWIR image, and mark it as the corn area; Step 2-5: Label the corn area, soybean area, and wheat area as the corresponding areas in the fused image. Areas with more than one category label in the same area will not be labeled, and areas with an area smaller than the preset area threshold will not be labeled. Step 2-6: Cut the fused image according to the preset cutting size to obtain the segmented image, mark the labels as wheat area, soybean area and corn area, and select the coarse sample training data according to the preset ratio of the segmented image of the corn area; Step 3: Divide the training set and the test set: adjust the segmented image in the coarse classification sample data set to a preset resolution, normalize its pixel value to between 0 and 1, and select the training set and the test set according to the preset ratio and preset number; Step 4: Preparation of similar data sets: Perform RandAugment enhancement processing twice on the segmented images in the training set to obtain an expanded training set; Step 5: Construct a self-supervised learning network: The self-supervised learning network is formed by merging the proxy task network and the clustering network; the proxy task network is composed of a cascaded backbone network, an average pooling layer Avgpool, a fully connected layer Linear1, an activation function ReLU1, a fully connected layer Linear2, and a normalization layer Normalization; The backbone network includes a DBR1 component cascaded in sequence, two 2DS-2CBAM components with the same structure, and the first to third combination components with the same structure; the first combination component is composed of a cascaded 3DS-3CBAM component and a 2DS-2CBAM component; the 2DS-2CBAM component is composed of a DBR2 component, a convolutional attention module CBAM1, a DB1 component, a convolutional attention module CBAM2, and an SR1 component cascaded in sequence, and the input end of the 2DS-2CBAM component is connected to the input end of the DBR2 component and the SR1 component respectively; the 3DS-3CBAM component includes a DBR3 component, a DB2 component, a DB3 component, a convolutional attention module CBAM3 -CBAM5, SR2 components, the input of the 3DS-3CBAM component is connected to the input of the SR2 component through the DB2 component and the convolutional attention module CBAM3 in sequence, and the other path is connected to the input of the SR2 component through the DBR3 component, the convolutional attention module CBAM4, the DB3 component, and the convolutional attention module CBAM5 in sequence; the DBR1 component, the DBR2 component and the DBR3 component have the same structure, and the DBR1 component consists of a cascaded convolutional layer conv2d, a batch normalization BN layer and an activation function ReLU2; the SR1 component and the SR2 component have the same structure, and the SR1 component consists of a cross-layer connection shortcut and an activation function ReLU3. Step 6: Train the self-supervised learning network: Use the training set to train the self-supervised learning network; Step 7: Crop classification using self-supervised learning network model: The remote sensing data to be classified is input into the self-supervised learning network to obtain the crop classification results.

2. According to claim 1, a remote sensing image crop classification method based on self-supervised learning, Features: The data preprocessing in step 1 includes radiation calibration, atmospheric correction, orthorectification and radiation correction.

3. The remote sensing image crop classification method based on self-supervised learning according to claim 1, Features: In the step 1, the multispectral data of the data preprocessing remote sensing satellite image is subjected to radiation calibration, atmospheric correction, and orthorectification, and then the panchromatic image is subjected to radiation correction and orthorectification. Finally, the corrected multispectral data and the panchromatic image are resampled according to a preset resolution and fused to obtain a fused image.

4. The method for crop classification based on remote sensing images based on self-supervised learning according to claim 1, Features: In the step 1, the multispectral data is resampled according to the resolution of the panchromatic image and then fused with the panchromatic image to obtain a fused image.

5. The remote sensing image crop classification method based on self-supervised learning according to claim 1, Features: In step 5, the parameters of the DBR1 component are: the convolution kernel size is 3x 3, the padding is 1, the stride is 2, and the dilation is 1.

6. The remote sensing image crop classification method based on self-supervised learning according to claim 1, Features: The DB1 component parameters in step 5 are: the convolution kernel size is 3x 3, padding is 0, stride is 2, and dilation is 1.

Citation Information

Patent Citations

  • High-resolution remote sensing image crop classification method based on deep learning

    CN110287869A

  • Remote sensing image semantic segmentation method based on supervised long-range correlation

    CN115953577A

  • Multispectral unmanned aerial vehicle remote sensing image crop segmentation method

    CN116503590A

  • Crop spatio-temporal information remote sensing classification method based on transfer learning

    CN116883853A

  • Medical image segmentation method based on u-net

    US20220309674A1

Cited By

  • Remote sensing data high-quality sample screening method and system and storage medium

    CN120747663A

  • Winter wheat LAI and SPAD estimation method based on lightweight semi-supervised model

    CN121347422A

  • Object classification system based on image recognition

    TWI918353B