Remote sensing image semantic segmentation method based on multi-scale feature fusion and SAM
By constructing a multi-scale feature fusion module based on the Swin-Transformer encoder and the dual-path spatial attention decoder, the problem of insufficient position mapping relationship and context connection in the semantic segmentation of remote sensing images is solved, and a more accurate remote sensing image segmentation effect is achieved.
Patent Information
- Application Number
- CN202310262035.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-17
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2043-03-17
AI Technical Summary
Existing semantic segmentation methods for remote sensing images have deficiencies in position mapping relationships and contextual connections in complex scenes, resulting in rough segmentation edge processing and reduced segmentation accuracy.
A segmentation network with a Swin-Transformer-based encoder, a dual-path spatial attention decoder for non-local operations, and a multi-scale feature fusion module is adopted. The positional relationship between pixels is calculated through the SAM-C and SAM-D modules, and feature fusion is performed through Element-wise Addition to enhance contextual connections and position mapping.
It improves the accuracy and boundary precision of semantic segmentation of remote sensing images, enhances the feature extraction capability of the model, and overcomes the problems of loose position mapping relationship and weak context connection in existing technologies.
Smart Images

Figure CN116206112B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing technology, and more specifically, to the field of image segmentation technology, a remote sensing image semantic segmentation method based on multi-scale fusion and a spatial attention module. This invention can be used to segment remote sensing images, thereby enabling automated geological survey and mapping tasks in production and construction projects. Background Art
[0002] The rapid development of remote sensing technology has brought about a large demand for image data interpretation and processing. Remote sensing image interpretation requires segmenting objects and regions of different categories and assigning the same label to the same category to represent the identification of the region or object. At present, deep neural network learning technology based on traditional CNN models is more commonly used in engineering practice for remote sensing image segmentation. Neural networks are used to extract remote sensing image features, and the network is trained to predict the category of each pixel, ultimately obtaining a segmentation map with category labels. However, existing methods have not been able to effectively solve the problem of position mapping relationships in the semantic segmentation task of remote sensing images, nor have they solved the problem of contextual connections in complex scenes. In addition, in practice, the CNN model mainly used in the current semantic segmentation network cannot effectively improve the accuracy of the model in target segmentation.
[0003] Hubei University of Technology disclosed a remote sensing image segmentation method based on multi-scale convolution in its patent application "A feature extraction method and segmentation system for semantic segmentation of remote sensing images" (patent application number: 202110678322.1, application publication number: CN 113723411 A). The implementation steps of this method are as follows: first, the remote sensing image is input into the convolution module to obtain an initial feature map; then the initial feature map is input into the multi-scale convolution network to obtain a third feature map and a target feature map; then the third feature map is input into the hybrid positioning model, and the target feature map is input into the atrous spatial pyramid model, and the position feature map is obtained by the hybrid positioning model, and the semantic feature map is obtained by the atrous spatial pyramid pooling (ASPP); finally, the position feature map and the semantic feature map are spliced and amplified by bilinear interpolation to obtain a prediction result map. The shortcoming of this method is that the position feature map obtained by the hybrid positioning model only focuses on the position information of the current feature point, but ignores the position information of the target feature point, which makes the model more focused on the accuracy of background segmentation, but ignores the mapping relationship of the position in the segmentation task. It cannot effectively distinguish between boundary information and internal information, resulting in rough segmentation edge processing.
[0004] Lee JH et al. published a weakly supervised remote sensing image segmentation method for remote sensing objects of different sizes in their paper "Weakly supervised segmentation of small buildings with point labels" (Proceedings of the IEEE / CVF International Conference on Computer Vision, 2021). The implementation steps of this method are: first use point labeling for small objects and a full labeling preprocessing method for large objects, and then propose a mask algorithm for distinguishing the loss values of small and large objects, which alleviates the multi-scale problem of remote sensing images. The shortcoming of this method is that the preprocessing method of full labeling of large objects will greatly reduce the efficiency of the model. At the same time, due to the use of weak supervision, the contextual connection in complex scenes is weakened, resulting in a weakened feature extraction ability of the image and a decrease in segmentation accuracy. Summary of the Invention
[0005] The purpose of the present invention is to address the defects of the above-mentioned prior art and propose a remote sensing image semantic segmentation method SwinDSA-merge based on multi-scale fusion and SAM, which is used to solve the problems of task segmentation position mapping relationship, contextual connection in complex scenes, and inaccurate segmentation object contours in remote sensing image semantic segmentation.
[0006] The purpose of the present invention is to construct a segmentation network consisting of a Swin-Transformer-based encoder, a non-local operation dual-path spatial attention decoder, and a multi-scale feature fusion module. The multi-scale feature fusion module is constructed to enhance the contextual connections in the scene. During training, image features are extracted step by step and fused step by step, strengthening the contextual connections in the scene and enhancing the model's feature extraction capability. The SAM module is constructed to enhance the positional mapping relationship between each pixel in the segmentation task. The SAM-C module calculates the influence of any position on the current position, and the SAM-D module calculates the influence of the current position on any position. The calculation results of the two modules are then connected to obtain the positional relationship between each point and enhance the mapping relationship between each pixel. The network is trained using the Potsdam and Vaihingen datasets of ISPRS WG III / 4 as samples to obtain the final remote sensing image semantic segmentation model.
[0007] The specific steps for achieving the purpose of the present invention are as follows:
[0008] Step 1: Generate training set:
[0009] A training set of 71 remote sensing images and their corresponding labeled images was selected; 38 of them had a resolution of 6,000 × 6,000 and a sampling distance of 5 cm, and the remaining 33 images had different resolutions provided by the dataset and a sampling distance of 9 cm.
[0010] Step 2: Construct a SwinDSA-merge segmentation network, which consists of an encoder, a multi-scale feature fusion module, a dual-path spatial attention decoder, and a processing module in series.
[0011] Step 2.1, the encoder in the SwinDSA-merge network adopts the existing technology Swin-Transformer network;
[0012] Step 2.2: Construct a multi-scale feature fusion module, whose structure is as follows: first feature input layer, first convolution layer, second feature input layer, second convolution layer, first upsampling layer, third feature input layer, third convolution layer, second upsampling layer; set the number of channels of the first to third feature input layers to 192, 384, and 768, respectively; set the convolution kernel size of the first to third convolution layers to 1×1, the step size to 1, and the number of convolution kernels to 512; set the upsampling ratios of the first and second upsampling layers to 2 and 4, respectively;
[0013] The results of the first and second sampling layers are combined with the result of the first convolutional layer using the Element-wise Addition method to achieve feature fusion, and the result is used as the input of the decoder;
[0014] Step 2.3: Construct a dual-path spatial attention decoder consisting of two SAM-C and SAM-D with the same structure in parallel. The SAM-C module structure is as follows: the first convolutional layer, the normalization layer, the activation layer, the second convolutional layer, and the mask acquisition layer. The convolution kernel size of the first and second convolutional layers is set to 1×1. The normalization layer uses the batch normalization method. The activation layer is implemented using the cross entropy loss function. The mask acquisition layer obtains the mask information through the following formula:
[0015]
[0016] Where (m,n) represents the position of any pixel c in the image input to the mask acquisition layer, (p,q) represents the position of pixel x, r is the pixel distance, and α is the attenuation factor;
[0017] The SAM-D module structure is the same as that of SAM-C except for the mask acquisition layer. The mask acquisition layer of the SAM-D module obtains mask information through the following formula:
[0018]
[0019] Where (r,s) represents the position of any pixel y in the image input to the SAM-D mask acquisition layer, (e,f) represents the position of pixel d, r is the pixel distance, and β is the attenuation factor;
[0020] Step 2.4: Construct a processing module consisting of a first feature layer, a second feature map, and a connection layer in series. The structure of the first feature layer is, in order: a connection layer, a convolution layer, a normalization layer, and an activation layer. The connection method of the connection layer of the first feature layer is set to concatenate, the convolution kernel size of the convolution layer is set to 1×1, the normalization layer uses batch normalization, and the activation layer uses a cross-entropy loss function. The second feature map is the input to the decoder of the feature fusion module. The connection method of the connection layer is set to concatenate.
[0021] Step 3: Train the SwinDSA-merge network:
[0022] Step 3.1 Set the optimizer to AdamW, the learning strategy to warmup, the learned attenuation strategy to poly, the droppath size to 0.3 in the encoder part, and the dropout size to 0.1 in the decoder part;
[0023] Step 3.2: Input the training set into the SwinDSA-merge network and iteratively update the network parameters using the gradient descent method until the loss function converges to obtain the trained SwinDSA-merge network.
[0024] Step 4: Predict remote sensing images.
[0025] Step 4.1: Label the remote sensing images to be predicted.
[0026] In step 4.2, the numbered images are sequentially input into the trained SwinDSA-merge network to obtain the cropped remote sensing image segmentation results.
[0027] In step 4.3, the segmentation results of the cropped remote sensing image are stitched together in sequence according to the sequence number to obtain the final segmentation result.
[0028] Compared with the prior art, the present invention has the following advantages:
[0029] First, the present invention uses 1×1 convolution to upsample the image and uses Element-wise Addition to perform channel fusion, which overcomes the problem of the existing technology that shallow features and deep features cannot be used simultaneously during feature fusion, strengthens the context connection, and enhances the feature extraction ability of the model, so that the present invention improves the accuracy of semantic segmentation of remote sensing images.
[0030] Second, the present invention constructs a training network SwinDSA-merge and uses the Swin-Transformer model structure as the backbone network of the encoder part, which overcomes the problem of the existing technology losing a large amount of details during the downsampling process, so that the foreground feature extraction capability of the present invention is significantly enhanced, and the loss of details during the semantic segmentation of remote sensing images is alleviated.
[0031] Third, the present invention adopts a spatial attention mechanism based on non-local operations, breaking through the limitations of the receptive field and overcoming the problem of loose relationship between pixels in position mapping in the existing technology. It allows spatial and spatiotemporal relationships to be generated between any pixels, making the boundaries of the remote sensing image semantic segmentation image obtained by the present invention more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a flow chart of the present invention;
[0033] Figure 2 It is a schematic diagram of the structure of the SwinDSA-merge network of the present invention;
[0034] Figure 3 This is a simulation diagram of the segmentation of Potsdam remote sensing images by the present invention. DETAILED DESCRIPTION
[0035] The present invention will be described in further detail below with reference to the accompanying drawings and embodiments.
[0036] Reference Figure 1 , the implementation steps of the embodiment of the present invention are further described in detail.
[0037] Step 1: Generate a training set.
[0038] In step 1.1, 71 remote sensing images and their corresponding labeled images from the Potsdam and Vaihingen datasets were selected, of which 38 images had a resolution of 6,000 × 6,000 and a sampling distance of 5 cm. The remaining 33 images had different resolutions provided by the dataset and a sampling distance of 9 cm.
[0039] In step 1.2, use Random to randomly select 50 images and their corresponding label images from the 71 images to form the training set.
[0040] Step 2: Build the SwinDSA-merge segmentation network.
[0041] Reference Figure 2 ,The SwinDSA-merge network constructed in the present invention is divided into four parts: encoder, feature fusion module, decoder and processing module.
[0042] In step 2.1, the encoder in the SwinDSA-merge network uses the existing Swin-Transformer network. This network consists of a Patch Partition module connected in series with four Stage modules. The second, third, and fourth Stage modules have the same structure. The first Stage module consists of a Linear Embedding unit connected in series with a Swin Transformer Block unit. The structures of the second, third, and fourth Stage modules are, respectively: Patch Merging, Swin Transformer Block.
[0043] The Patch Partition module divides the input remote sensing image into four equal areas. The LinearEmbeding unit flattens the four equal areas divided by the Patch Partition module.
[0044] The Patch Partition module consists of a row-column selection layer and a fully connected layer. The row-column selection layer selects two elements from the rows and columns of the feature vector output by the previous stage and concatenates them together to form the entire tensor. The convolution kernel size of the fully connected layer is set to 1×1.
[0045] The structure of the Swin Transformer Block unit is as follows: first normalization layer, first attention layer, second normalization layer, first MLP layer, third normalization layer, second attention layer, fourth normalization layer, and second MLP layer. Layer normalization is used for the first to fourth normalization layers, and the attention operation mode of the first and second attention layers is set to cyclic shift and reverse cyclic shift respectively. The first and second MLP layers are implemented with the GELU activation function and the convolution kernel size is set to 1×1.
[0046] Step 2.2: Construct a multi-scale feature fusion module. Its structure is as follows: first feature input layer, first convolutional layer, second feature input layer, second convolutional layer, first upsampling layer, third feature input layer, third convolutional layer, and second upsampling layer. Set the number of channels of the first to third feature input layers to 192, 384, and 768, respectively. Set the convolution kernel size of the first to third convolutional layers to 1×1, the stride to 1, and the number of convolution kernels to 512. Set the upsampling ratios of the first and second upsampling layers to 2 and 4, respectively.
[0047] The results of the first and second sampling layers are combined with the result of the first convolutional layer using the Element-wise Addition method to achieve feature fusion, and the result is used as the input of the decoder.
[0048] In step 2.3, a dual-path spatial attention decoder consisting of two identical SAM-C and SAM-D layers connected in parallel is constructed. The SAM-C module structure consists of the first convolutional layer, normalization layer, activation layer, second convolutional layer, and mask acquisition layer. The convolution kernel size of the first and second convolutional layers is set to 1×1; the normalization layer uses batch normalization; and the activation layer uses a cross-entropy loss function. The mask acquisition layer obtains mask information using the following formula:
[0049]
[0050] Where (m,n) represents the position of any pixel c in the image input to the mask acquisition layer, (p,q) represents the position of pixel x, r is the pixel distance, and α is the attenuation factor.
[0051] The SAM-D module structure is the same as that of SAM-C except for the mask acquisition layer. The mask acquisition layer of the SAM-D module obtains mask information through the following formula:
[0052]
[0053] Where (r,s) represents the position of any pixel y in the image input to the SAM-D mask acquisition layer, (e,f) represents the position of pixel d, r is the pixel distance, and β is the attenuation factor.
[0054] Step 2.4: Construct a processing module. The processing module includes a first feature layer, a second feature map, and a connection layer. The first feature layer consists of a connection layer, a convolution layer, a normalization layer, and an activation layer. The connection method of the connection layer of the first feature layer is set to concatenate, the convolution kernel size of the convolution layer is set to 1×1, the normalization layer uses batch normalization, and the activation layer uses a cross-entropy loss function.
[0055] The second feature map is the input of the decoder after the feature fusion module.
[0056] The connection method of the connection layer of the processing module is set to concatenate.
[0057] In step 2.5, the Swin-Transformer, multi-scale fusion module, bidirectional spatial attention decoder, and processing module are connected in series to form the SwinDSA-merge network.
[0058] Step 3: Train the SwinDSA-merge network.
[0059] In step 3.1, the optimizer is set to AdamW, the learning strategy is set to warmup, the learned decay strategy is set to poly, the droppath size is set to 0.3 in the encoder part, and the dropout size is set to 0.1 in the decoder part.
[0060] Step 3.2: Input the training set into the SwinDSA-merge network and train until the loss function converges.
[0061] The above loss function is the cross entropy loss function CE (Cross Entropy Loss). The present invention uses the cross entropy loss function CE to determine the degree of similarity between the output value p and the expected output value q. The calculation process of CE is as follows: the score of each category is obtained in the processing module, and each category score is passed through the Sigmoid function to obtain the corresponding probability output p(x). The Sigmoid function is defined as follows:
[0062]
[0063] Where x is the score of each category, the obtained probability output p(x) and the true value q(x) are used to calculate the cross entropy loss function in the form of a one-hot code. The cross entropy loss function CE is defined as follows:
[0064] CE(p,q)=-(p(x)log(q(x))+(1-p(x)log(1-q(x)))
[0065] CE(p,q) is the cross entropy. When the difference between p and q is smaller, the output of the model is closer to the true value, and the minimum value is achieved when they are equal.
[0066] Step 4: Predict remote sensing images.
[0067] Step 4.1: Label the remote sensing images to be predicted.
[0068] In step 4.2, the numbered images are sequentially input into the trained SwinDSA-merge network to obtain the cropped remote sensing image segmentation results.
[0069] In step 4.3, the segmentation results of the cropped remote sensing image are stitched together in sequence according to the sequence number to obtain the final segmentation result.
[0070] The effects of the present invention can be further illustrated by the following simulation experiments.
[0071] 1. Simulation experiment conditions:
[0072] The hardware platform of the simulation experiment of the present invention is: the processor is Intel i7-12700, the main frequency is 2.10 GHz, the memory is 32G, and the graphics card is GeForce RTX 2080Ti.
[0073] The software platform for the simulation experiment of the present invention is: Ubuntu operating system and Python 3.6.
[0074] The data used in the simulation experiment of this invention are 71 images from the remote sensing image dataset Potsdam and Vaihingen. Some images are 6000×6000 in size. The dataset consists of six types of objects: background, road surface, buildings, low vegetation, trees, and cars. It includes structures such as buildings, streets, grasslands, and settlements.
[0075] 2. Simulation experiment content and result analysis:
[0076] The simulation experiment of the present invention is an ablation experiment using the method of the present invention and a Swin-Transfromer with a single-path spatial attention module added, and the simulation experiment is performed according to the following steps.
[0077] The ablation experimental method adopts a network containing only a single-way spatial attention module, a network containing only a single-way spatial attention module SwinSA, and a network containing a dual-way spatial attention module and multi-scale feature fusion training SwinDSA-merge.
[0078] In step A, 71 images and their corresponding labeled images from the Potsdam and Vaihingen datasets are randomly selected as samples to form the overall dataset of this experiment.
[0079] In step B, the samples in the entire dataset are randomly shuffled, and 40 samples are selected to form a training set, 10 samples to form a validation set, and 21 samples to form a test set.
[0080] In step D, the training set data is input into the SwinDSA-merge network for training, with a total of 80,000 epochs.
[0081] In step E, after training, the performance of the model that achieves the best validation result is evaluated on the test set.
[0082] The following combination Figure 3 The simulation diagram of the present invention is further described.
[0083] Figure 3 (a) Four remote sensing images in the test set. Figure 3 (b) is the test set with Figure 3 (a) Corresponding label map. Figure 3 (c) is the result of segmenting the remote sensing image using only a single-channel spatial attention module.
[0084] Figure 3 (d) is the result of segmenting the remote sensing image using the dual-path spatial attention module and the multi-scale fusion module.
[0085] Depend on Figure 3 As can be seen from (c) and 3(d), the segmentation results of the present invention are clearer in segmentation of the foreground contour and have more precise contours than those of the ablation experimental method.
[0086] In order to verify that the segmentation effect of the present invention is better than that of the ablation experimental method, the following formula is used to calculate the accuracy OA index to evaluate the segmentation results, and the calculation results are plotted in Table 1.
[0087]
[0088] Among them, tp represents the number of pixels for which both the prediction and the actual value are positive, that is, the number of correctly predicted pixels; fn represents the number of pixels for which both the prediction and the actual value are negative, that is, the number of undetected pixels; N represents the total number of pixels.
[0089] Table 1. Quantitative analysis of the segmentation results of the present invention method and the ablation experiment method in the simulation experiment
[0090]
[0091] The larger the OA value in Table 1, the more accurate the segmentation result. Combined with Table 1, it can be seen that the OA accuracy of the present invention on the two datasets is 90.76% and 87.75% respectively, both higher than the ablation experiment method, which proves the effectiveness of the multi-scale fusion module and bidirectional spatial attention mechanism proposed in the present invention, and can effectively improve the accuracy of remote sensing image segmentation.
Claims
1. A remote sensing image semantic segmentation method based on multi-scale fusion and SAM, characterized by: A multi-scale feature fusion module is used to fuse the output results of different layers of Swin-Transformer. The results of the multi-scale feature fusion module are decoded using a two-way spatial attention mechanism. The final segmentation result is obtained through a processing module. The steps of this method include the following: Step 1: Generate training set: A training set of 71 remote sensing images and their corresponding labeled images was selected; 38 of them had a resolution of 6,000 × 6,000 and a sampling distance of 5 cm, and the remaining 33 images had different resolutions provided by the dataset and a sampling distance of 9 cm. Step 2: Construct a SwinDSA-merge segmentation network, which consists of an encoder, a multi-scale feature fusion module, a dual-path spatial attention decoder, and a processing module in series. Step 2.1, the encoder in the SwinDSA-merge network adopts the existing technology Swin-Transformer network; Step 2.2: Construct a multi-scale feature fusion module, whose structure is as follows: first feature input layer, first convolution layer, second feature input layer, second convolution layer, first upsampling layer, third feature input layer, third convolution layer, second upsampling layer; set the number of channels of the first to third feature input layers to 192, 384, and 768, respectively; set the convolution kernel size of the first to third convolution layers to 1×1, the step size to 1, and the number of convolution kernels to 512; set the upsampling ratios of the first and second upsampling layers to 2 and 4, respectively; The results of the first and second sampling layers are combined with the result of the first convolutional layer using the Element-wise Addition method to achieve feature fusion, and the result is used as the input of the decoder; Step 2.3: Construct a dual-path spatial attention decoder consisting of two SAM-C and SAM-D with the same structure in parallel. The SAM-C module structure is as follows: the first convolutional layer, the normalization layer, the activation layer, the second convolutional layer, and the mask acquisition layer. The convolution kernel size of the first and second convolutional layers is set to 1×1. The normalization layer uses the batch normalization method. The activation layer is implemented using the cross entropy loss function. The mask acquisition layer obtains the mask information through the following formula: Where (m,n) represents the position of any pixel c in the image input to the mask acquisition layer, (p,q) represents the position of pixel x, r is the pixel distance, and α is the attenuation factor; The SAM-D module structure is the same as that of SAM-C except for the mask acquisition layer. The mask acquisition layer of the SAM-D module obtains mask information through the following formula: Where (r, s) represents the position of any pixel y in the image input to the SAM-D mask acquisition layer, (e, f) represents the position of pixel d, r is the pixel distance, and β is the attenuation factor; Step 2.4: Construct a processing module consisting of a first feature layer, a second feature map, and a connection layer in series. The structure of the first feature layer is, in order: a connection layer, a convolution layer, a normalization layer, and an activation layer. The connection method of the connection layer of the first feature layer is set to concatenate, the convolution kernel size of the convolution layer is set to 1×1, the normalization layer uses batch normalization, and the activation layer uses a cross-entropy loss function. The second feature map is the input to the decoder of the feature fusion module. The connection method of the connection layer is set to concatenate. Step 3: Train the SwinDSA-merge network: Step 3.1 Set the optimizer to AdamW, the learning strategy to warmup, the learned attenuation strategy to poly, the droppath size to 0.3 in the encoder part, and the dropout size to 0.1 in the decoder part; Step 3.2: Input the training set into the SwinDSA-merge network and iteratively update the network parameters using the gradient descent method until the loss function converges to obtain the trained SwinDSA-merge network. Step 4, predicting remote sensing images; Step 4.1: Label the remote sensing images to be predicted; Step 4.2: Input the numbered images into the trained SwinDSA-merge network in sequence to obtain the cropped remote sensing image segmentation results; In step 4.3, the segmentation results of the cropped remote sensing image are stitched together in sequence according to the sequence number to obtain the final segmentation result.
2. The remote sensing image semantic segmentation method based on multi-scale fusion and SAM according to claim 1, characterized in that: The Swin-Transformer network described in step 2.1 consists of a Patch Partition module and four Stage modules connected in series. The first Stage module consists of a Linear Embedding unit and a Swin Transformer Block unit connected in series. The second to fourth Stage modules have the same structure, which is: Patch Merging, Swin Transformer Block. The Patch Partition module divides the input remote sensing image into four equal areas; the Linear Embedding unit flattens the four equal areas divided by the Patch Partition module; The Patch Partition module consists of a row and column selection layer and a fully connected layer. The row and column selection layer selects two elements from the rows and columns of the feature vector output by the previous stage and concatenates them together to form the entire tensor. The convolution kernel size of the fully connected layer is set to 1×1. The structure of the Swin Transformer Block unit is as follows: first normalization layer, first attention layer, second normalization layer, first MLP layer, third normalization layer, second attention layer, fourth normalization layer, second MLP layer; Layer normalization is used for the first to fourth normalization layers, and the attention operation modes of the first and second attention layers are set to cyclic shift and reverse cyclic shift respectively; the first and second MLP layers are implemented using the GELU activation function, and the convolution kernel size is set to 1×1.
3. The remote sensing image semantic segmentation method based on multi-scale fusion and SAM according to claim 1, characterized in that: The loss function described in step 3.2 is the cross entropy loss function CE. The calculation process of CE is as follows: the score of each category is obtained in the processing module, and each category score is passed through the Sigmoid function to obtain the corresponding probability output p(x). The definition of the Sigmoid function is as follows: Where x is the score of each category, the cross entropy loss function is calculated by the one-hot encoding form of the obtained probability output p(x) and the true value q(x). The cross entropy loss function CE is defined as follows: CE(p,q)=-(p(x)log(q(x))+(1-p(x)log(1-q(x))) Where CE(p,q) is the cross entropy. When the difference between p and q is smaller, the output of the model is closer to the true value, and the minimum value is achieved when they are equal.
Citation Information
Patent Citations
Feature extraction method and segmentation system for remote sensing image semantic segmentation
CN113723411A
Remote sensing image semantic segmentation method based on attention multi-scale feature fusion
CN111127493A
Hyperspectral image classification method based on double-path convolution and double attention and storage medium
CN115272776A