A precise segmentation method for remote sensing images

By using the Poly attenuated learning rate strategy and the cross-context frequency domain representation learning model CCRF-UNet in remote sensing image segmentation technology, the problems of boundary blur and noise influence in remote sensing image segmentation technology are solved, and efficient and lightweight image segmentation effects are achieved. .

CN118504427BActive Publication Date: 2024-09-20NANJING NANJI INTELLIGENT AGRI MASCH TECH RES INST CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410956611.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-09-20
Estimated Expiration
2044-07-17

AI Technical Summary

Technical Problem

Existing remote sensing image segmentation technology has deficiencies in accuracy and speed. Especially when processing high-resolution remote sensing images, it is difficult to effectively classify and segment surface features, resulting in blurred boundaries and greater noise effects.

Method used

The cross-context frequency domain representation learning model CCRF-UNet based on the Poly attenuated learning rate strategy is adopted. Through depth separable convolution, cross-attention module and cross-cross frequency domain weight learning module, combined with data preprocessing and training parameter optimization, an efficient construction Remote sensing image segmentation model.

Benefits of technology

Significantly improves the training and inference speed of the model, reduces memory consumption, while maintaining high accuracy, enhances detail retention and semantic understanding, reduces boundary blur and noise effects, and improves the accuracy and clarity of segmentation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118504427B
    Figure CN118504427B
Patent Text Reader

Abstract

The present invention provides a remote sensing image accurate segmentation method, including: obtaining high-resolution remote sensing image data and preprocessing, cutting the high-resolution remote sensing image into small image blocks, and dividing them into a training set, a validation set, and a test set; constructing a remote sensing image segmentation model cross-context frequency domain representation learning model CCRF-UNet based on the Poly decay learning rate strategy; training and verifying the model, optimizing the training network parameters, and obtaining a trained remote sensing image segmentation model; inputting the test set into the trained remote sensing image segmentation model, and outputting the segmentation result. The present invention effectively utilizes the cross-attention and context fusion modules to enhance the information extraction capability of the model, and effectively reduces the loss of spatial information and semantic information; by introducing frequency domain information using the cross-frequency domain weight learning module, the ability to segment image texture and contour can be improved; and the improvement of remote sensing image segmentation effect is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of remote sensing image segmentation, and in particular relates to a remote sensing image accurate segmentation method. Background Art

[0002] With the continuous development of aviation technology and sensor technology, researchers can collect a large amount of high-quality remote sensing image data, thus providing more detailed and comprehensive information for various research and applications. Remote sensing image data contains information in multiple bands: visible light, infrared and microwave bands, etc. These bands capture different features of the surface and provide a wide range of geographic and environmental data. In remote sensing images, objects of different categories are an important geographic information resource, which is of great significance in geological exploration, meteorological forecasting, land planning, natural disaster monitoring, urban construction and other fields. Through the effective analysis and application of remote sensing image data, it provides effective and rapid scientific support for solving complex problems in the real world and supporting the realization of sustainable development goals.

[0003] With the development of computer technology and artificial intelligence, image segmentation tasks have gradually become an important branch in the field of computer vision. Semantic segmentation of remote sensing images is a popular branch in image segmentation tasks. Semantic segmentation of remote sensing images classifies each pixel in the image into a corresponding category to achieve pixel-level classification. With the advancement of science and technology and the innovation of researchers, a series of classic deep learning methods have gradually been studied and applied to the field of remote sensing image segmentation. Compared with traditional remote sensing image segmentation methods, there are significant improvements in accuracy and speed. It is of great significance to use deep learning methods to extract and segment remote sensing images. Summary of the invention

[0004] Purpose of the invention: The technical problem to be solved by the present invention is to provide a remote sensing image accurate segmentation method in view of the shortcomings of the prior art, comprising the following steps:

[0005] Step 1: obtain high-resolution remote sensing image data and perform preprocessing. Adopt a pixel overlap strategy to cut the high-resolution remote sensing image into small image blocks, and divide them into training set, validation set and test set by random sampling.

[0006] Step 2: Construct a remote sensing image segmentation model cross-context frequency domain representation learning model CCRF-UNet (Cross Context Representation Learning In Frequency DomainFor Remote Sensing Image Segmentation) based on the Poly attenuation learning rate strategy;

[0007] Step 3: Configure relevant training parameters;

[0008] Step 4: Input the training set and validation set into the CCRF-UNet model for training and validation, use the joint loss function to calculate the loss of the remote sensing image segmentation model, optimize the training network parameters, and obtain the trained remote sensing image segmentation model;

[0009] Step 5: Input the test set into the trained remote sensing image segmentation model and output the corresponding segmentation results.

[0010] In step 1, the preprocessing includes: using the complete remote sensing image processing platform ENVI (The Environment for Visualizing Images) remote sensing image processing software to crop the high-resolution remote sensing images one by one using a pixel overlapping strategy, and then using the open source image annotation tool Labelme image annotation software to make semantic segmentation labels and annotate the targets in the image; then using the pixel overlapping strategy to crop the annotated images one by one, all cropped to a uniform size, and randomly extracting the cropped small image data into training sets, validation sets, and test sets. Data preprocessing is performed on the training set, validation set, and test set, including data enhancement and data normalization. Data enhancement uses random inversion and random cropping strategies. The mean and standard deviation calculations of data normalization are expressed by the formula:

[0011] ,

[0012] ,

[0013] in represents the pixel value of the i-th image at channel c, height h, and width w. N, H, and W represent the number of images in the dataset, the height, and width of the image, respectively. represents the mean of the cth channel, Indicates the standard deviation of the c-th channel.

[0014] In step 2, the cross-context frequency domain representation learning model CCRF-UNet is obtained based on the improvement of the original UNet model, including the following steps:

[0015] Step 2-1, establish a cross-context frequency domain representation learning module CCRF. In the encoding and decoding stage of the original UNet model, the ordinary convolution is replaced by the depthwise separable convolution at each stage. In the 2nd, 3rd, 4th, and 5th stages, each depthwise separable convolution module is followed by a different number of cross-context frequency domain representation learning modules CCRF (Cross Context Representation Learning In Frequency Domain), which are [4, 2, 2, 4] respectively.

[0016] Step 2-2, in the jump connection of the original UNet model, use the Cross-Attention module to perform the following calculation to obtain the attention map A:

[0017] ,

[0018] ,

[0019] ,

[0020] ,

[0021] Where Q, K, and V represent the query matrix, key matrix, and value matrix, respectively. represents a 1×1 convolution operation, C, H, and W represent the number of channels, height, and width of the feature map, respectively. represents the number of channels of the query and key matrices, represents the transposed matrix of the key matrix, Indicates the application of soft maximum activation function; X represents the original feature map (the original feature map is the feature map input to the cross attention module, and specifically in the model: the feature map when the model is not downsampled at each stage of encoding), , , , ; T represents matrix transpose; represents the set of real numbers;

[0022] The use of the Cross-Attention module can reduce the attention paid to irrelevant or noisy areas in the jump connection, highlight the areas of obvious interest, and improve the overall model's ability to recover fine spatial information and semantic information;

[0023] The value matrix V and the attention map A are aggregated to obtain the attention feature U, which is mapped back to the original dimension through linear transformation, and then the attention feature is fused with the original feature map X. The formula is:

[0024] ,

[0025] ,

[0026] in is the output feature after the cross attention module;

[0027] Step 2-3, construct the cross-context frequency domain representation learning model CCRF-UNet of the remote sensing image segmentation model based on the Poly attenuation learning rate strategy, and use the Poly attenuation learning rate strategy to replace the fixed learning rate; after using the Poly attenuation learning rate strategy, the change of the learning rate during training is determined according to the polynomial attenuation function, and the formula is:

[0028] ,

[0029] in lr is the new learning rate, base_lr is the baseline learning rate, epoch is the number of iterations, num_epoch is the maximum number of iterations, power is the polynomial decay exponent.

[0030] Step 2-1 includes: replacing the ordinary convolution in the original UNet model with a deep separable convolution, and passing through the cross-context frequency domain representation learning module CCRF, the four stages of downsampling in the encoding part are respectively passed through [4, 2, 2, 4] times, and the four stages of upsampling in the decoding part are respectively passed through [4, 2, 2, 4] times: the cross-context frequency domain representation CCRF module has three branches, the first branch is the context interaction module CIM (Context Interaction Module) with dilated convolution, firstly, the feature and structural information of small-scale objects are obtained by expanding the convolution receptive field, and then the context interaction module CIM is further used to enhance information exchange, encode more accurate spatial information, and eliminate the boundary blur problem caused by ground object occlusion; the second branch is the cross-cross frequency domain weight learning module CCWF (Criss-Cross Weight Learning InFrequency Domain ), by simultaneously acquiring global and local information and introducing frequency domain features to help the CCRF-UNet model understand the context; the third branch is the original feature concatenation branch, which introduces the original input features to enrich the feature information and improve the expression ability and generalization performance of the CCRF-UNet model.

[0031] In step 2-1, the context interaction module CIM includes: using a soft pooling Soft-Pool operation on the input feature map to obtain statistics of the feature map in the vertical and horizontal directions, and then multiplying the statistics in the vertical and horizontal directions to obtain an output feature map related to the context; the Soft-Pool operation activates the pixels in the pooling kernel in an exponentially weighted manner. For each pixel in a specific kernel neighborhood R, the calculation method of the Soft-Pool operation is shown in the following formula:

[0032] ,

[0033] in, represents the features after soft pooling operation, Represents the value of the i-th element in the original feature map, Represents the j-th element value in the original feature map, and e is a natural constant.

[0034] The cross frequency domain weight learning module CCWF includes: It is divided into four parts along the channel dimension, namely , , and , for three of them , , The frequency domain information is learned along the three directions of channel to height, channel to width, and height to width respectively, and the learned frequency domain features are converted into spatial domain features. The feature information in the height to width direction is fused with the feature information in the channel to height and channel to width directions according to the weights to obtain the global feature information. The specific calculation process is expressed as follows:

[0035] ,

[0036] ,

[0037] ,

[0038] ,

[0039] ,

[0040] ,

[0041] ,

[0042] ,

[0043] ,

[0044] Among them, the input features in the encoding stage It is the feature input into the cross frequency domain weight learning module CCWF after the deep separable convolution; the feature is input in the decoding stage It is the feature that is input into the cross frequency domain weight learning module CCWF after upsampling;

[0045] represents the splitting operation along the channel dimension, represents the learnable weights in the channel-to-height direction, represents the learnable weights in the channel-to-width direction, represents the learnable weights in the height-to-width direction, Represents the two-dimensional discrete Fourier transform of the feature in the channel to height direction, Represents the two-dimensional discrete Fourier transform of the feature in the channel to width direction, represents the two-dimensional discrete Fourier transform of the feature in the height-to-width direction, represents the element-wise multiplication operation, , and They represent the frequency domain features after learning the frequency domain information in the directions of channel to height, channel to width, and height to width. , and They represent the features from channel to height, channel to width, and height to width in the directions of frequency domain information learned and converted to the spatial domain. Represents the two-dimensional discrete Fourier inverse transform of the feature in the channel to height direction, Represents the two-dimensional discrete Fourier inverse transform of the feature in the channel to width direction, represents the two-dimensional discrete Fourier inverse transform of the feature in the height-to-width direction, and They represent the output features and fusion ratio hyperparameters after the channel-to-height direction features and the height-to-width direction features are fused. and They represent the output features and fusion ratio hyperparameters after the channel-to-width feature and the height-to-width feature are fused;

[0046] At the same time, the block Perform a depth-separable convolution operation to retain local feature information; finally, concatenate the four feature maps along the channel dimension to restore the same size as the input to obtain the output feature map, which is expressed as:

[0047] ,

[0048] ,

[0049] in, represents a depth-wise separable convolution operation, represents the features after depth-wise separable convolution, represents the concatenation operation along the channel dimension, and Y represents the output feature after concatenation.

[0050] Step 3 includes: the experiment uses the Pytorch network framework, sets the batch_size of the single input training data according to the device performance, sets the initial learning rate to 0.01, uses the stochastic gradient descent SGD (Stochastic Gradient Descent) optimizer with a momentum term of 0.9 and a weight decay of 1e-4, and the maximum number of iterations is 100.

[0051] Step 4 includes: transforming the Dice loss function and Cross-Entropy loss function The combination is used as a joint loss function L to guide model training.

[0052] In step 4, the joint loss function L is calculated using the following formula:

[0053] .

[0054] Step 5 includes: taking the test set as input, inputting it into the trained remote sensing image segmentation model, obtaining the corresponding segmentation result, calculating the F1 coefficient and average intersection-over-union ratio of the model segmentation, and comparing the F1 coefficient, average intersection-over-union ratio and remote sensing image segmentation effect diagram with other models.

[0055] Compared with the prior art, the present invention has the following beneficial effects:

[0056] (1) This invention significantly reduces the computational complexity and number of parameters by replacing the ordinary convolution in the original UNet model with depthwise separable convolution, thereby improving the training and reasoning speed of the model and reducing memory consumption. At the same time, while reducing the number of parameters, it maintains a high accuracy rate, and has the ability to enhance the efficiency and lightweight of the model.

[0057] (2) The present invention uses the CrossAttention module in the jump connection of the original UNet model to enhance the model's feature fusion capability, improve the model's detail retention and semantic understanding capabilities. At the same time, it reduces the focus on irrelevant or noisy areas, highlights the areas of obvious interest, improves the recovery of fine spatial information and semantic information, and has the ability to enhance model boundary processing, refine segmentation results, and reduce errors.

[0058] (3) The present invention uses a cross-frequency domain weight learning module (CCWF) based on frequency domain information. Through the cross-frequency domain weight learning module, frequency domain information is introduced to improve the model's ability to acquire details and global structural information; by converting the image to the frequency domain, high-frequency and low-frequency components are separated, which has the ability to enhance the model boundary segmentation and reduce fuzzy segmentation.

[0059] (4) The present invention uses a context interaction module (CIM) to apply a Soft-Pool operation to the input features to obtain feature vectors in the horizontal and vertical directions in an exponentially weighted manner, and then multiply the two to obtain an output feature map related to the context, thereby enhancing the interactive ability of the model's context information and improving the model's ability to deal with boundary blur caused by occlusion of ground objects. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 A flowchart of a remote sensing image accurate segmentation method of the present invention;

[0061] Figure 2 A schematic diagram of the complete network structure of a cross-context frequency domain representation learning network CCRF-UNet of a remote sensing image accurate segmentation method according to an embodiment of the present invention;

[0062] Figure 3 A schematic diagram of the network structure of a cross-context frequency domain representation learning module CCRF of a remote sensing image accurate segmentation method according to an embodiment of the present invention;

[0063] Figure 4 A schematic diagram of a cross-attention module CA network structure of a remote sensing image accurate segmentation method according to an embodiment of the present invention;

[0064] Figure 5 A schematic diagram of the network structure of a cross frequency domain weight learning module CCWF of a remote sensing image accurate segmentation method according to an embodiment of the present invention;

[0065] Figure 6 A schematic diagram of a context interaction module CIM network structure of a remote sensing image accurate segmentation method according to an embodiment of the present invention;

[0066] Figure 7 This is a comparison diagram of the segmentation effects of a remote sensing image using a remote sensing image precise segmentation method according to an embodiment of the present invention and other methods. DETAILED DESCRIPTION

[0067] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.

[0068] The invention discloses a remote sensing image accurate segmentation method, comprising the following steps:

[0069] Step 1: obtain high-resolution remote sensing image data and perform preprocessing. Adopt a pixel overlap strategy to cut the high-resolution remote sensing image into small image blocks, and divide them into training set, validation set and test set by random sampling.

[0070] Step 2: Construct a remote sensing image segmentation model based on the Poly attenuation learning rate strategy, the cross-context frequency domain representation learning model CCRF-UNet (Cross Context Representation Learning In Frequency DomainFor Remote Sensing Image Segmentation); Figure 2 As shown, the model CCRF-UNet includes a deep separable convolution (DWConv) encoding module, a cross-context frequency domain representation learning module CCRF (Cross ContextRepresentation Learning In Frequency Domain), a cross-attention CA (Cross Attention) module, and a deep separable convolution (DWConv) decoding module.

[0071] Step 3: Configure relevant training parameters;

[0072] Step 4: Input the training set and validation set into the CCRF-UNet model for training and validation, use the joint loss function to calculate the loss of the remote sensing image segmentation model, optimize the training network parameters, and obtain the trained remote sensing image segmentation model;

[0073] Step 5: Input the test set into the trained remote sensing image segmentation model and output the corresponding segmentation results.

[0074] In a specific embodiment of the present invention, see Figure 1 and Figure 2 , the remote sensing image accurate segmentation method comprises the following steps:

[0075] Step 1: Use a drone to obtain three high-resolution remote sensing images, with resolutions of 43141×42489, 22866×27463, and 14452×12638. Use ENVI remote sensing image processing software to crop the high-resolution remote sensing images one by one using a 12-pixel overlapping strategy, then use Labelme image annotation software to make semantic segmentation labels, carefully annotate the objects in the image, and divide the data set into five categories: three types of land, other land, and background, so that the network can distinguish different categories. Then, use a 12-pixel overlapping strategy to crop the annotated images one by one, all cropped to 512×512 size, with a total of 7264 images, and randomly divide the cropped small image data into a training set (5811 images), a validation set (726 images), and a test set (727 images) in a ratio of 8:1:1. The training set, validation set, and test set were preprocessed, and random inversion and random cropping strategies were used for data enhancement. Then, each data set was normalized, and the mean and variance were calculated, which were [0.485, 0.456, 0.406] and [0.229, 0.224, 0.225], respectively.

[0076] Step 2: Construct a remote sensing image segmentation model CCRF-UNet based on the Poly decay learning rate strategy, such as Figure 2 As shown in the figure, the CCRF-UNet model includes: DWConv encoding module, CCRF module, cross attention CA (Cross Attention) module, DWConv decoding module. The process of building the CCRF-UNet model specifically includes the following steps:

[0077] Step 2-1: If Figure 2 As shown in , in each stage of the UNet backbone model, the ordinary convolution in the original UNet model is replaced by the depthwise separable convolution, and the CCRF module is passed through [4, 2, 2, 4] times in the four stages of encoding and decoding. The encoding part extracts image features through four downsampling depthwise separable convolution layers, and uses the maximum pooling method to implement the downsampling operation. Feature maps of different sizes are obtained in each stage, and then each stage passes through the CCRF module for [4, 2, 2, 4] times, as shown in Figure 3 shown.

[0078] First, if Figure 6As shown in the figure, the feature map passes through the context interaction module CIM branch with dilated convolution, which widely collects the features and structural information of small-scale objects by expanding the receptive field of convolution. The Soft-Pool operation is used on the input feature map to obtain the feature vectors of the feature map in the vertical and horizontal directions. The feature vectors in the two directions are multiplied to further enhance information exchange and encode more accurate spatial information. Finally, the output feature map related to the context is obtained, eliminating the boundary blur problem caused by ground object occlusion. The calculation method of Soft-Pool is shown in the following formula:

[0079] ,

[0080] in, represents the features after soft pooling operation, Represents the value of the i-th element in the original feature map, Represents the j-th element value in the original feature map, and e is a natural constant.

[0081] Secondly, if Figure 5 As shown in the figure, the feature map passes through the cross frequency domain weight learning module CCWF branch, which obtains global and local information at the same time, and introduces frequency domain features to help the model fully understand the context. The input feature map is divided into four blocks along the channel dimension, and three of them are respectively subjected to frequency domain information learning along the three directions of channel-height, channel-width, and height-width, and the frequency domain information in the height-width direction is fused with the frequency domain information in the channel-height and channel-width directions according to the weights to obtain global feature information; at the same time, the fourth block is subjected to a depth-separable convolution operation to retain local feature information; finally, the four feature maps are spliced ​​along the channel dimension to restore the same size as the input to obtain the output feature map.

[0082] Then, the feature map is concatenated with the original feature branch to enrich the feature information and improve the model’s expressiveness and generalization performance by adding the original input features.

[0083] Finally, the feature maps obtained on the three branches are added together to obtain the final output feature map.

[0084] Step 2-2: In the jump connection of the UNet model, use the Cross-Attention module to reduce the attention to irrelevant or noisy areas, highlight the areas of obvious interest, and improve the recovery of fine spatial information and semantic information.

[0085] like Figure 4As shown in the figure, first, the input feature map is convolved three times with 1×1 to obtain the Q, K, and V matrices, and the attention score matrix is ​​obtained by calculating the dot product between Q and K. The softmax function is applied to it in the channel dimension to obtain the attention weight matrix, which is then aggregated with V to obtain the output features. Then, the output features are added to the original input features to obtain the final output features.

[0086] Step 2-3: Establish a CCRF-UNet model based on the Poly attenuation learning rate strategy, and use the Poly attenuation learning rate strategy to replace the fixed learning rate; after using the Poly attenuation learning rate strategy, the change of the learning rate during training is determined according to the polynomial attenuation function. This attenuation function gradually reduces the learning rate as the number of iterations increases. The purpose is to prevent the training from being unstable and unable to converge, which is conducive to improving the convergence speed and generalization ability of the model. The formula is:

[0087] ,

[0088] in lr is the new learning rate, base_lr is the baseline learning rate, epoch is the number of iterations, num_epoch is the maximum number of iterations, power is the polynomial decay exponent.

[0089] Step 3: Configure the relevant experimental environment. The experiment uses the Pytorch deep learning platform to build the model. All experiments use the 12th Gen Intel Core i9-12900KF CPU with a memory size of 128GB. The image processing unit is completed using the NVIDIA GEFORCE RTX 3090 server with a video memory size of 24GB. According to the performance of the selected device, the batch_size is set to 4, the initial learning rate is 0.01, and the SGD optimizer with a momentum term of 0.9 and a weight decay of 1e-4 is used for model training. The maximum number of training iterations is set to 100.

[0090] Step 4: Input the divided training set and validation set into the model for training and validation, and use the Dice loss function and the Cross-Entropy loss function as a joint loss function to guide model training and optimize model parameters. The purpose is to reduce the loss caused by category imbalance, balance prediction accuracy and spatial position accuracy, accelerate model convergence, and improve the generalization ability of the model. The calculation formula of the joint loss function is:

[0091] .

[0092] Step 5: After the model is trained, the test set is input into the trained remote sensing image segmentation model to obtain the corresponding segmentation results. The F1 coefficient and average intersection-over-union ratio of the CCRF-UNet model segmentation are calculated. The F1 coefficient, average intersection-over-union ratio and remote sensing image segmentation effect diagram are compared with other models, such as Figure 7 See the comparison results.

[0093] Among them, Figure 7 In the figure, the first column is the original remote sensing image, the second column is the original label image, the third column is the segmentation result of the UPerNet network, the fourth column is the segmentation result of the DeepLabV3+ network, the fifth column is the segmentation result of the Unet network, the sixth column is the segmentation result of the SwinUnet network, the seventh column is the segmentation result of the ST_Unet network, and the eighth column is the segmentation result of the CCRF-UNet network used in the present invention. It can be seen from the segmentation results that the segmentation results of the remote sensing images using the method of the present invention are more accurate and smooth. Compared with the results of several other mainstream segmentation networks, there are fewer noise points in the figure, the boundary contours are clearer, the overall segmentation effect is better, and a better segmentation effect is achieved on the remote sensing images.

[0094] The present invention provides a remote sensing image accurate segmentation method. There are many methods and ways to implement the technical solution. The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the protection scope of the present invention. All components not specified in this embodiment can be implemented by existing technologies.

Claims

1. A remote sensing image accurate segmentation method, characterized in that: The following steps are involved: Step 1: obtain high-resolution remote sensing image data and perform preprocessing. Adopt a pixel overlap strategy to cut the high-resolution remote sensing image into small image blocks, and divide them into training set, validation set and test set by random sampling. Step 2: Construct a cross-context frequency domain representation learning model CCRF-UNet for remote sensing image segmentation model based on the Poly decay learning rate strategy; Step 3: Configure relevant training parameters; Step 4: Input the training set and validation set into the CCRF-UNet model for training and validation, use the joint loss function to calculate the loss of the remote sensing image segmentation model, optimize the training network parameters, and obtain the trained remote sensing image segmentation model; Step 5: Input the test set into the trained remote sensing image segmentation model and output the corresponding segmentation results; In step 2, the cross-context frequency domain representation learning model CCRF-UNet is obtained based on the improvement of the original UNet model, including the following steps: Step 2-1, establish a cross-context frequency domain representation learning module CCRF. In the encoding and decoding stage of the original UNet model, the ordinary convolution is replaced by the depthwise separable convolution at each stage. In the 2nd, 3rd, 4th, and 5th stages, each depthwise separable convolution module is followed by a different number of cross-context frequency domain representation learning modules CCRF, which are [4, 2, 2, 4] respectively. Step 2-2, in the jump connection of the original UNet model, use the Cross-Attention module to perform the following calculation to obtain the attention map A: Where Q, K, V represent the query matrix, key matrix, and value matrix, respectively. Conv2d(·) represents a 1×1 convolution operation. C, H, W represent the number of channels, height, and width of the feature map, respectively. C′ represents the number of channels of the query and key matrices. K T represents the transposed matrix of the key matrix, softmax(·) represents the application of the soft maximum activation function; X represents the original feature map, T represents matrix transpose; represents the set of real numbers; The value matrix V and the attention map A are aggregated to obtain the attention feature U, which is mapped back to the original dimension through linear transformation, and then the attention feature is fused with the original feature map X. The formula is: U=V·A X′=Conv2d(U)+X Where X′ is the output feature after the cross attention module; Step 2-3, construct the cross-context frequency domain representation learning model CCRF-UNet of the remote sensing image segmentation model based on the Poly attenuation learning rate strategy, and use the Poly attenuation learning rate strategy to replace the fixed learning rate; after using the Poly attenuation learning rate strategy, the change of the learning rate during training is determined according to the polynomial attenuation function, and the formula is: Where lr is the new learning rate, base_lr is the baseline learning rate, epoch is the number of iterations, num_epoch is the maximum number of iterations, and power is the polynomial decay exponent; Step 2-1 includes: replacing the ordinary convolution in the original UNet model with a depthwise separable convolution, and passing through a cross-context frequency domain representation learning module CCRF, the four stages of downsampling in the encoding part are respectively passed through [4, 2, 2, 4] times, and the four stages of upsampling in the decoding part are respectively passed through [4, 2, 2, 4] times: the cross-context frequency domain representation CCRF module has three branches, the first branch is a context interaction module CIM with dilated convolution, which first obtains the features and structural information of small-scale objects by expanding the convolution receptive field, and then further enhances the information exchange through the context interaction module CIM; the second branch is a cross-frequency domain weight learning module CCWF, which simultaneously obtains global and local information and introduces frequency domain features to help the model CCRF-UNet understand the context; the third branch is the original feature splicing branch, which enriches the feature information by introducing the original input features.

2. The method according to claim 1, characterized in that In step 1, the preprocessing includes: cropping the high-resolution remote sensing images one by one using a pixel overlapping strategy, then making semantic segmentation labels and marking the targets in the images; then cropping the labeled images one by one using a pixel overlapping strategy, cropping them to a uniform size, and dividing the cropped small image data into a training set, a validation set, and a test set by random sampling.

3. The method according to claim 2, characterized in that In step 2-1, the context interaction module CIM includes: using a soft pooling Soft-Pool operation on the input feature map to obtain statistics of the feature map in the vertical and horizontal directions, and then multiplying the statistics in the vertical and horizontal directions to obtain an output feature map related to the context; the Soft-Pool operation activates the pixels in the pooling kernel in an exponentially weighted manner. For each pixel in a specific kernel neighborhood R, the calculation method of the Soft-Pool operation is shown in the following formula: in, represents the features after soft pooling operation, a i Represents the value of the i-th element in the original feature map, a j Represents the j-th element value in the original feature map, and e is a natural constant.

4. The method according to claim 3, characterized in that The cross frequency domain weight learning module CCWF includes: z The channel dimension is divided into four blocks, namely x1, x2, x3 and x4. The frequency domain information of three blocks x1, x2 and x3 is learned along the three directions of channel to height, channel to width and height to width respectively. The learned frequency domain features are converted into spatial domain features, and the feature information in the height to width direction is fused with the feature information in the channel to height and channel to width directions according to the weights to obtain the global feature information. The specific calculation process is expressed as follows: x1,x2,x3,x4=Spilt(X z ) x 1(C,H) =W (C,H) ⊙F (C,H) [x1] x 2(C,W) =W (C,W) ⊙F (C,W) [x1] x 3(H,W) =W (H,W) ⊙F (H,W) [x1] x F1 =αx 1(C,H) +(1-a)x 3(H,W) x F2 =βx 2(C,W) +(1-β)x 3(H,W) Among them, the input features in the encoding stage z is the feature input into the cross frequency domain weight learning module CCWF after the deep separable convolution; in the decoding stage, the feature X is input z It is the feature that is input into the cross frequency domain weight learning module CCWF after upsampling; Spilt(·) represents the splitting operation along the channel dimension, W (C,H) represents the learnable weight from channel to height, W (C,W) represents the learnable weight from channel to width, W (H,W) represents the learnable weight from height to width, F (C,H) Represents the two-dimensional discrete Fourier transform of the feature in the channel to height direction, F (C,W) Represents the two-dimensional discrete Fourier transform of the feature in the channel to width direction, F (H,W) represents the two-dimensional discrete Fourier transform of the feature in the height-to-width direction, ⊙ represents the element-wise multiplication operation, x 1(C,H) , x 2(C,W) , x 3(H,W) They represent the frequency domain features after learning the frequency domain information in the directions of channel to height, channel to width, and height to width, respectively. x′1, x′2, x′3 represent the features converted to the spatial domain after learning the frequency domain information in the directions of channel to height, channel to width, and height to width, respectively. Represents the two-dimensional discrete Fourier inverse transform of the feature in the channel to height direction, Represents the two-dimensional discrete Fourier inverse transform of the feature in the channel to width direction, represents the two-dimensional discrete Fourier inverse transform of the feature in the height-to-width direction, x F1 and α represent the output features and fusion ratio hyperparameters after the channel-to-height feature and the height-to-width feature are fused, respectively. F2 and β represent the output features and fusion ratio hyperparameters after the channel-to-width feature and the height-to-width feature are fused respectively; At the same time, a depth-separable convolution operation is performed on block x4 to retain local feature information; finally, the four feature maps are concatenated along the channel dimension to restore the same size as the input to obtain the output feature map, which is expressed as: x′4=DW(x4) Y=Concat(x F1 ,x F2 ,x′3,x′4) Among them, DW(·) represents the depth-wise separable convolution operation, x′4 represents the features after depth-wise separable convolution, Concat(·) represents the concatenation operation along the channel dimension, and Y represents the output features after concatenation.

5. The method according to claim 4, characterized in that Step 3 includes: the experiment uses the Pytorch network framework, sets the batch_size of the single input training data according to the device performance, sets the initial learning rate to 0.01, uses the stochastic gradient descent SGD optimizer with a momentum term of 0.9 and a weight decay of 1e-4, and the maximum number of iterations is 100.

6. The method according to claim 5, characterized in that Step 4 includes: transforming the Dice loss function L Dice and Cross-Entropy loss function L CE The combination is used as a joint loss function L to guide model training.

7. The method according to claim 6, characterized in that In step 4, the joint loss function L is calculated using the following formula: L=L CE +L Dice .

8. The method according to claim 7, characterized in that Step 5 includes: taking the test set as input, inputting it into the trained remote sensing image segmentation model, obtaining the corresponding segmentation result, calculating the F1 coefficient and average intersection-over-union ratio of the model segmentation, and comparing the F1 coefficient, average intersection-over-union ratio and remote sensing image segmentation effect diagram with other models.

Citation Information

Patent Citations

  • Font recognition method and system based on deep learning and storage medium

    CN113591831A

  • Real-time semantic segmentation method based on lightweight cross-attention network

    CN114972752A

  • High-precision image segmentation method and device based on deep learning

    CN115908818A

  • Remote sensing image cloud and cloud shadow fine segmentation detection method based on deep learning

    CN116052016A

  • Method and device for reducing context models for entropy coding of transform coefficient validity flags

    KR1020210093321A