End-to-end weakly supervised water body segmentation method for remote sensing images based on water-wsss model
By employing an end-to-end weakly supervised approach to the Water-WSSS model, and utilizing an improved DPND network and a pseudo-label refinement module, the problem of insufficient datasets in water body segmentation of remote sensing images is addressed, achieving efficient water body segmentation results, especially high-precision segmentation in complex scenes.
Patent Information
- Application Number
- CN202310793972.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2043-06-30
AI Technical Summary
The lack of high-quality, high-resolution water body datasets in the field of remote sensing imagery leads to high annotation costs and long training cycles for fully supervised semantic segmentation methods.
An end-to-end weakly supervised water body segmentation method based on the Water-WSSS model is adopted. By using an improved DPND backbone network, a pseudo-label thinning module, and a feature enhancement module, combined with classification and segmentation branches, the pseudo-label thinning module improves the accuracy of the class activation map, and the feature enhancement module improves the segmentation performance.
While ensuring accuracy, it significantly reduces the cost of water body labeling, shortens the training data generation cycle, and improves the segmentation effect, especially in complex water body scenarios where the segmentation performance reaches 97.6% mIoU.
Smart Images

Figure CN116797940B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of semantic segmentation and remote sensing image processing, and particularly relates to an end-to-end weakly supervised remote sensing image water body segmentation method based on a Water-WSSS model. BACKGROUND
[0002] Water body is water existing in the nature in a certain form, such as water vapor in the air, oceans, rivers or lakes, and underground water, etc. The water body in a remote sensing image refers to surface water, which is delimited by clear terrain boundaries and water, and the condition for being called water body in the geographical area is that the water body is concentrated in some specific places, such as oceans, lakes, rivers or reservoirs, and within the terrain boundaries and water boundaries, it is usually soil, vegetation or a composite of soil and vegetation. Water body segmentation refers to a technology for accurately segmenting and expressing water body features in a multi-type background object, which analyzes the obtained remote sensing image, and performs strict and accurate water-land discrimination to the pixel, and the result is very important for water quality detection, military reconnaissance, environmental protection, land planning, geographic mapping, etc. The current water body segmentation network is mainly trained in a full supervision manner, but due to the lack of high-quality and high-resolution water body data sets in the field of remote sensing images, the weakly supervised deep learning technology can be applied to water body segmentation, which greatly saves the cost of water body label marking and shortens the period of training data generation under the premise of ensuring accuracy. SUMMARY
[0003] The application aims at the problems of lack of high-quality and high-resolution water body data sets in the field of remote sensing images, high labeling cost and long training period of conventional full supervision semantic segmentation method, and provides an end-to-end weakly supervised remote sensing image water body segmentation method based on a Water-WSSS model.
[0004] Technical scheme: The application provides an end-to-end weakly supervised remote sensing image water body segmentation method based on a Water-WSSS model, which comprises the following steps:
[0005] Step 1: collect Gaofen-2 satellite remote sensing images, obtain target images containing water bodies, construct a new remote sensing image water body data set and perform pretreatment;
[0006] Step 2: construct a semantic segmentation Water-WSSS model, and train the above water body data set through the Water-WSSS model to obtain a model Y; the Water-WSSS model comprises a backbone network, a classification branch, a segmentation branch, a pseudo-label refinement module and a feature enhancement module;
[0007] The feature maps extracted by the backbone network are respectively input into the classification branch and the segmentation branch, the classification branch and the segmentation branch share the same backbone network, and the two branches update the entire network at the same time during training; during testing, only the segmentation branch is used to generate the segmentation result; the classification branch outputs the initial class activation map of the water body, the features extracted by the backbone network and the initial class activation map obtained by the classification branch are input into the pseudo label refinement module to obtain the final result RCAM as the pseudo ground truth label of the segmentation branch, and input into the segmentation branch; after obtaining the initial segmentation result by using the segmentation branch, the feature enhancement module is used to improve the segmentation performance of the model;
[0008] Step 3: using the trained model Y to segment the water body through the segmentation branch to obtain an initial result, and then inputting the feature enhancement module to obtain the final segmentation result.
[0009] Further, in step 1, the water body data set is preprocessed by first normalizing the images of the pixel-uniform and diversified water body scene, then randomly shuffling the pictures in the data set, taking part of the original pictures as a training set, marking the remaining pictures, taking half of the remaining pictures as a validation set, and the other half as a test set, and only using the marked pictures during validation and testing.
[0010] Further, the specific implementation process of the semantic segmentation Water-WSSS model in step 2 is as follows:
[0011] (2.1) using the improved DPND as the backbone network, the DPND combines the dense connection block in the DenseNet network with the residual block in the ResNet network, adding three residual blocks at the end of the DPND, and performing dilated convolution on the residual blocks;
[0012] (2.2) the feature maps extracted by the backbone network are respectively input into the classification branch and the segmentation branch, the classification branch and the segmentation branch share the same backbone network, and the two branches update the entire network at the same time during training; during testing, only the segmentation branch is used to generate the segmentation result;
[0013] (2.3) in the classification branch, global average pooling is applied to the last convolutional layer, and the result is used for classification by the fully connected layer; the initial class activation map of the water body is obtained by using the fully connected layer weight on the last convolutional layer of the classification branch;
[0014] (2.4) the features extracted by the backbone network and the initial class activation map obtained by the classification branch are input into the pseudo label refinement module to obtain the final class activation map RCAM as the pseudo ground truth label of the segmentation branch, and input into the segmentation branch;
[0015] (2.5) The segmentation branch is used for predicting the pixel-level label, and the segmentation branch adds two layers of hollow convolution layers after the backbone network to obtain an initial segmentation result R1;
[0016] (2.6) The feature enhancement module is used for the initial segmentation result R1 to solve the problem of low pixel accuracy of small target water body segmentation and improve the segmentation performance of the model.
[0017] Further, the pseudo-label refinement module comprises a pixel correlation module PCM and a pixel region correlation module PRCM; the PCM module is used to predict the neighbor pixels of the current pixel by using the context appearance information; the PRCM module is used to enhance the context information by using the relationship between the feature map and the CAM, and further improve the accuracy of the CAM; the specific structure is as follows:
[0018] The input of the pixel correlation module PCM is the feature map F extracted by the DPND as the backbone network and the initial class activation map CAM generated by the classification branch. First, the feature map F is subjected to twice 1x1 convolution and bilinear interpolation to obtain F1. F1 and CAM are multiplied to obtain F2. F2 is subjected to a convolution operation and then input into CBAM. Finally, the adjusted feature map, i.e., PCAM, is obtained.
[0019] The input of the pixel region correlation module PRCM is the feature map F extracted by the DPND as the backbone network and the initial class activation map CAM generated by the classification branch. First, F and CAM are multiplied to obtain F3. F3 is used to obtain F4 by using the context feature refinement feature map. F4 is subjected to bilinear interpolation to obtain F5. F is subjected to a 1x1 convolution operation to obtain the result F6. The multiplication result of F5 and F6 is input into CBAM. Finally, the adjusted feature map, i.e., PRCAM, is obtained.
[0020] PCAM and PRCAM are multiplied and then subjected to a CBAM module to obtain the final result RCAM of the pseudo-label refinement module.
[0021] Further, the specific structure of the feature enhancement module is as follows:
[0022] The input of the feature enhancement module is the initial segmentation result R1. GAP operation is used, and then a 1x1 convolution operation is used. After upsampling, the result R2 is obtained by restoring the original resolution. R1 is subjected to a 1x1 convolution operation to obtain the result R3. R1 is subjected to a series of convolution operations to obtain the result R4. R3 and R4 are multiplied to obtain the result R5. R2 and R5 are added to obtain the final result R6, i.e., the final segmentation result of the Water-WSSS model.
[0023] Further, the step 3 implementation process is as follows:
[0024] The segmentation branch predicts the segmentation result of the input picture by using the trained model Y, and inputs the result into the feature enhancement module for operation;
[0025] The total network loss is composed of two loss terms, i.e., a classification loss denoted as L cls and a segmentation loss denoted as L seg ;
[0026] For the classification loss, the aggregated features are fed into a classification layer to calculate a category probability vector p cls , and then a multi-label soft margin loss is used as the classification loss, which is specifically calculated as follows:
[0027]
[0028] where C is the total number of categories, and in the self-built data set, only water and background are included, so C is 2; y c is the ground truth image-level label of the corresponding category, is the probability vector of the corresponding category.
[0029] For the segmentation loss, it is composed of a foreground segmentation loss and a background segmentation loss, both of which use binary cross-entropy loss and dynamic weighting; the number ratio of foreground pixels to background pixels is 0.24:0.76 after sampling the water data set, and the foreground segmentation loss denoted as L fg and the background segmentation loss denoted as L bg are calculated to determine the position and size of the water body and generate the final segmentation map; the segmentation loss is specifically calculated as follows:
[0030] L seg =αL fg +βL bg
[0031] where α and β are weight coefficients for balancing the importance of water and background, α=0.76 and β=0.24.
[0032] The foreground segmentation loss L fg measures the prediction accuracy of the model for the water body, and is specifically calculated as follows:
[0033]
[0034] where N fg is the number of water pixels, is the model prediction pixel, and i is the foreground probability.
[0035] The background segmentation loss L bg measures the prediction accuracy of the model for the background, and is specifically calculated as follows:
[0036]
[0037] wherein N bg is the number of pixels of the background, is the model predicted pixel, i is the background probability;
[0038] The network total loss is defined by integrating the foreground segmentation loss and the background segmentation loss:
[0039] L = L cls + L seg
[0040] wherein L cls is the classification loss, and L seg is the segmentation loss.
[0041] Advantages:
[0042] The present application improves the backbone network of the Water-WSSS model to strengthen the feature extraction effect; through the pseudo-label refinement module, the accuracy of the class activation map is further improved; for the segmentation branch, two layers of dilated convolution are used after the backbone network to obtain the segmentation result, and then the result is input into the feature enhancement module to improve the segmentation effect, and finally the mIoU of the Water-WSSS framework is 97.6%; the present application also has a high mIoU in dealing with complex water body scenes. BRIEF DESCRIPTION OF DRAWINGS
[0043] Figure 1 is the flow chart of the end-to-end weakly supervised remote sensing image water body segmentation method based on the Water-WSSS model;
[0044] Figure 2 is the schematic diagram based on the Water-WSSS model proposed by the present application;
[0045] Figure 3 is the pseudo-label refinement module schematic diagram proposed by the present application;
[0046] Figure 4 is the feature enhancement module schematic diagram proposed by the present application;
[0047] Figure 5 is the comparison diagram of the water body segmentation results by using DeepLabv3, SegNet, U-Net and Water-WSSS model. DETAILED DESCRIPTION
[0048] The present application will be further described in detail below with reference to the accompanying drawings.
[0049] The application provides an end-to-end weakly supervised remote sensing image water body segmentation method based on a Water-WSSS model, a water body segmentation dataset is made by collecting Chinese Gaofen-2 satellite remote sensing images, and pretreatment is performed, an improved DPND is used as a backbone network for feature extraction, an initial class activation map is obtained through a classification branch after the backbone network, the initial class activation map is refined through a pseudo label refinement module to obtain a final pseudo label, which is used as a pseudo ground truth label of a segmentation branch, a segmentation branch after the backbone network is segmented using the pseudo ground truth label to obtain a segmentation result, and then the segmentation result is input into a feature enhancement module to obtain a final segmentation result. Figure 1 As shown in the figure, the method specifically comprises the following steps:
[0050] Step 1: Collecting Gaofen-2 satellite remote sensing images, obtaining target images containing water bodies, constructing a new remote sensing image water body dataset for the patent and performing pretreatment.
[0051] In this embodiment, the water body dataset pretreatment is to normalize the images of different pixels and diversified water body scenes first, and the resolution of the normalized images is 800x800. Then, 6000 images in the dataset are randomly shuffled, and 5000 original images are taken as a training set. The remaining 1000 images are marked with water bodies, and among the 100 images marked with water bodies, 500 images are taken as a validation set, and 500 images are taken as a test set. Only the images with labels are used in validation and testing, which greatly reduces the manpower and resources.
[0052] Step 2: Constructing a semantic segmentation Water-WSSS model and training the above water body dataset through the Water-WSSS model to obtain a model Y. The Water-WSSS model comprises a backbone network, a classification branch, a segmentation branch, a pseudo label refinement module and a feature enhancement module. The structure of the Water-WSSS model is as shown in the figure. Figure 2 The specific steps are as follows:
[0053] (2.1) The improved DPND is used as the backbone network in the Water-WSSS model. The DPND combines the dense connection block in the DenseNet network with the residual block in the ResNet network, and three residual blocks are added at the end of the DPND in the patent, and the residual blocks are subjected to atrous convolution, the dilated rate of the third layer from the end is 2, and the dilated rate of the last two layers is 4, forming a new network structure. The dense connection block is used to increase the depth and expression ability of the network, and the residual block is used to maintain the stability and generalization ability of the network.
[0054] (2.2) The feature maps extracted by the backbone network are input into the classification branch and the segmentation branch respectively. The classification branch and the segmentation branch share the same backbone network, and the two branches update the entire network at the same time during training. During testing, only the segmentation branch is used to generate the segmentation result.
[0055] (2.3) In the classification branch: global average pooling is applied to the last convolutional layer. The result is used for the full connection layer for classification. The full connection layer weight is used on the last convolutional layer of the classification branch to obtain the initial class activation map of the water body.
[0056] (2.4) The features extracted by the backbone network and the initial class activation map obtained by the classification branch are input into the pseudo label refinement module to improve the accuracy of the pseudo label and obtain the final class activation map RCAM as the pseudo ground truth label of the segmentation branch, which is input into the segmentation branch.
[0057] (2.5) The pseudo label refinement module includes a pixel correlation module (PCM) and a pixel-region correlation module (PRCM). Through the PCM module, the context appearance information is used to refine the prediction of the neighboring pixels of the current pixel, further improving the accuracy of the CAM; through the PRCM module, the relationship between the feature map and the CAM is used to enhance the context information, further improving the accuracy of the CAM. The structure of the pseudo label refinement module is shown in Figure 3
[0058] (2.6) The input of the PCM module is the feature map F extracted by the backbone network and the initial class activation map CAM generated by the classification branch. First, the feature map F is subjected to twice 1x1 convolution and bilinear interpolation to obtain F1, F1 and CAM are multiplied to obtain F2, F2 is subjected to a convolution operation and then input into CBAM, and finally the adjusted feature map, i.e. PCAM, is obtained.
[0059] (2.7) The input of the PRCM module is the feature map F extracted by the backbone network and the initial class activation map CAM generated by the classification branch. First, F and CAM are multiplied to obtain F3, F3 is used to obtain F4 using the context feature refinement feature map, F4 is subjected to bilinear interpolation to obtain F5, F is subjected to a 1x1 convolution operation to obtain the result F6, the multiplication result of F5 and F6 is input into CBAM, and finally the adjusted feature map, i.e. PRCAM, is obtained.
[0060] (2.8) PCAM and PRCAM are multiplied and then subjected to a CBAM module to obtain the final result RCAM of the pseudo label refinement module.
[0061] (2.9) The segmentation branch is used for predicting the pixel-level label. The segmentation branch adds two layers of dilated convolution layers after the backbone network to obtain the initial segmentation result.
[0062] (2.10) A feature enhancement module is used for the initial segmentation result to solve the problem of low pixel accuracy of small target water body segmentation and improve the segmentation performance of the model. The structure of the feature enhancement module is shown in Figure 4
[0063] (2.11) The input of the feature enhancement module is the initial segmentation result R1. R1 uses the GAP operation, and then uses a 1x1 convolution operation. After upsampling, the result R2 is obtained by restoring the original resolution. R1 uses a 1x1 convolution operation to obtain the result R3. A series of convolution operations are used on R1 to obtain the result R4. R3 and R4 are multiplied to obtain the result R5. R2 and R5 are added to obtain the final result R6, which is the final segmentation result of the Water-WSSS model.
[0064] Step 3: The trained model Y is used to segment the water body through the segmentation branch, and then the feature enhancement module is input to obtain the final segmentation result.
[0065] The segmentation branch segments and predicts the input picture through the trained model Y, and then inputs the result into the feature enhancement module for operation, mainly to improve the pixel accuracy of small target water body segmentation and improve the segmentation performance of the model.
[0066] The total loss of the network is composed of two loss terms, i.e. the classification loss L cls and the segmentation loss L seg .
[0067] For the classification loss, the aggregated features are fed into the classification layer to calculate the class probability vector p cls , and then the multi-label soft margin loss is used as the classification loss. The classification loss is calculated as follows:
[0068]
[0069] where C is the total number of classes, and the self-built data set only contains water body and background, so C is 2. y c is the ground truth image-level label corresponding to the class, is the probability vector corresponding to the class.
[0070] For the segmentation loss, it is composed of foreground segmentation loss and background segmentation loss, both of which use binary cross-entropy loss and dynamic weighting. The number ratio of foreground pixels and background pixels is 0.24:0.76 after sampling the water body data set. The foreground segmentation loss L fg and the background segmentation loss L bg to determine the location and size of the water body and generate the final segmentation map. The segmentation loss is specifically calculated as follows:
[0071] L seg = aL fg + bL bg
[0072] where a and b are weight coefficients for balancing the importance of water and background. From the above, a = 0.76 and b = 0.24.
[0073] The foreground segmentation loss L fg measures the prediction accuracy of the model for water, and is specifically calculated as follows:
[0074]
[0075] where N fg is the number of water pixels, is the model prediction pixel, and i is the foreground probability.
[0076] The background segmentation loss L bg measures the prediction accuracy of the model for background, and is specifically calculated as follows:
[0077]
[0078] where N bg is the number of background pixels, is the model prediction pixel, and i is the background probability.
[0079] By combining the foreground segmentation loss and the background segmentation loss, the total network loss can be defined as:
[0080] L = L cls + L seg
[0081] where L cls is the classification loss and L seg is the segmentation loss.
[0082] The self-built remote sensing image water body dataset is trained through the Water-WSSS network to obtain a model that can segment water bodies in complex scenes. The model performance is verified through the validation set in the dataset, as shown in Figure 5 The present application uses DeepLabv3, SegNet, U-Net and the Water-WSSS model of the present application to segment water bodies. The mIoU of the self-built remote sensing image water body dataset of the present application is 97.6%, and the model segmentation speed reaches 19 frames per second, improving the segmentation efficiency and effect of the semantic segmentation model.
[0083] The evaluation index used in the present application is mIoU, that is, the ratio of the intersection and union of objects in the predicted segmentation picture and the real segmentation picture; and the FPS (Frames Per Second) model is the number of frames processed per second.
[0084]
[0085] mIoU = (IoU1+ IoU2+…+IoU n / n),
[0086]
[0087] wherein, IoU is the intersection over union, mIoU is the average intersection over union, FPS is the frame number, and t is the time for segmenting a single picture. There are water bodies and backgrounds in the data set, n represents the number of samples, TP (True Positive) represents the number of pixels correctly predicted as positive class by the model (that is, the number of pixels of the sample being water being identified as water pixels); FP (False Negative) represents the number of pixels incorrectly predicted as positive class by the model (that is, the sample is background, and the number of pixels identified as water by the model); and FN (False Negative) represents the number of pixels incorrectly predicted as negative class by the model (that is, the sample is water, and the number of pixels identified as background by the model).
[0088] The embodiments of the present application are described in detail above in combination with the drawings, but the present application is not limited to the above-described embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the purpose of the present application.
Claims
1. A weakly supervised remote sensing image water body segmentation method based on Water-WSSS model end to end, characterized in that, The method comprises the following steps: Step 1: collecting a remote sensing image of Gao Fen II satellite, obtaining a target image containing a water body, constructing a new remote sensing image water body dataset and performing preprocessing; Step 2: constructing a semantic segmentation Water-WSSS model, and training the water body dataset through the Water-WSSS model to obtain a model Y; the Water-WSSS model comprises a backbone network, a classification branch, a segmentation branch, a pseudo-label refinement module and a feature enhancement module; The feature map extracted by the backbone network is input into the classification branch and the segmentation branch, the classification branch and the segmentation branch share the same backbone network, and the two branches update the entire network at the same time during training; during testing, only the segmentation branch is used to generate a segmentation result; the initial class activation map of the water body output by the classification branch and the feature extracted by the backbone network are input into the pseudo-label refinement module to obtain a final result RCAM, which is used as a pseudo ground truth label of the segmentation branch and is input into the segmentation branch; after obtaining an initial segmentation result by using the segmentation branch, the feature enhancement module is used to improve the segmentation performance of the model; The specific implementation process of the semantic segmentation Water-WSSS model is as follows: (2.1) using an improved DPND as the backbone network, combining the dense connection block in the DenseNet network with the residual block in the ResNet network, adding three residual blocks at the end of the DPND, and performing dilated convolution on the residual blocks; (2.2) inputting the feature map extracted by the backbone network into the classification branch and the segmentation branch, the classification branch and the segmentation branch sharing the same backbone network, and the two branches updating the entire network at the same time during training; during testing, only the segmentation branch is used to generate a segmentation result; (2.3) in the classification branch, global average pooling is applied to the last convolutional layer, and the result is used for classification by the full connection layer; the initial class activation map of the water body is obtained by using the full connection layer weight on the last convolutional layer of the classification branch; (2.4) inputting the feature extracted by the backbone network and the initial class activation map obtained by the classification branch into the pseudo-label refinement module to obtain a final class activation map RCAM, which is used as a pseudo ground truth label of the segmentation branch and is input into the segmentation branch; (2.5) the segmentation branch is used for predicting a pixel-level label, and two layers of dilated convolution layers are added after the backbone network to obtain an initial segmentation result R1; (2.6) using the feature enhancement module on the initial segmentation result R1 to solve the problem of low pixel accuracy of small target water body segmentation and improve the segmentation performance of the model; the feature enhancement module inputs the initial segmentation result R1, uses a GAP operation, uses a 1x1 convolution operation once, up-samples to restore the original resolution to obtain a result R2, uses a 1x1 convolution operation once on R1 to obtain a result R3, uses a series of convolution operations on R1 to obtain a result R4, uses a multiplication operation on R3 and R4 to obtain a result R5, and adds R2 and R5 to obtain a final result R6, that is, the final segmentation result of the Water-WSSS model; Step 3: The initial result is obtained by segmenting the water body using the trained model Y through the segmentation branch, and then inputting the feature enhancement module to obtain the final segmentation result.
2. The weakly supervised end-to-end water body segmentation method based on the Water-WSSS model according to claim 1, wherein, In step 1, the water body dataset preprocessing is first to normalize the images of pixels and diversified water body scenes, then to randomly shuffle the pictures in the dataset, to take part of the original pictures as the training set, to mark the remaining pictures as water bodies, to take half of the remaining pictures as the validation set, and to take the other half as the test set. Only the marked pictures are used in validation and testing.
3. The weakly supervised end-to-end water body segmentation method based on the Water-WSSS model according to claim 1, characterized in that, The pseudo-label refinement module includes a pixel-related module PCM and a pixel region-related module PRCM. Through the PCM module, the context appearance information and the refined prediction of the current pixel neighbor pixels are used. Through the PRCM module, the context information is enhanced by using the relationship between the feature map and the CAM, and the accuracy of the CAM is further improved. The specific structure is as follows: The input of the pixel-related module PCM is the feature map F extracted by the DPND as the backbone network and the initial class activation map CAM generated by the classification branch. First, the feature map F is subjected to twice 1x1 convolution and bilinear interpolation to obtain F1. F1 and CAM are multiplied to obtain F2. F2 is subjected to a convolution operation and then input into CBAM. Finally, the adjusted feature map, i.e. PCAM, is obtained. The input of the pixel region-related module PRCM is the feature map F extracted by the DPND as the backbone network and the initial class activation map CAM generated by the classification branch. First, F and CAM are multiplied to obtain F3. F3 uses the context feature to refine the feature map to obtain F4. F4 uses bilinear interpolation to obtain F5. F is subjected to a 1x1 convolution operation to obtain the result F6. The multiplication result of F5 and F6 is input into CBAM. Finally, the adjusted feature map, i.e. PRCAM, is obtained. PCAM and PRCAM are multiplied and then subjected to a CBAM module to obtain the final result RCAM of the pseudo-label refinement module.
4. The weakly supervised end-to-end water body segmentation method based on the Water-WSSS model according to claim 1, wherein, The implementation process of step 3 is as follows: The segmentation branch performs segmentation prediction on the input picture using the trained model Y, and inputs the result into the feature enhancement module for operation. The total loss of the network is composed of two loss terms, i.e., a classification loss denoted as L cls and a segmentation loss denoted as L seg ; For the classification loss, the aggregated features are fed to a classification layer to compute a class probability vector p cls and using a multi-label soft-margin loss as the classification loss, which is computed as follows: where C is the total number of classes, and the self-built dataset only contains water bodies and backgrounds, C is 2; y c is the true value image-level label of the corresponding class, is the probability vector of the corresponding class. For the segmentation loss, it is composed of foreground segmentation loss and background segmentation loss, both of which use binary cross-entropy loss and dynamic weighting; the number ratio of foreground pixels and background pixels in the sampled water body dataset is 0.24:0.76, and the foreground segmentation loss L fg and the background segmentation loss L bg are calculated respectively to determine the position and size of the water body and generate the final segmentation map; the segmentation loss is calculated as follows: L seg = aL fg + bL bg Wherein, alpha and beta are weight coefficients for balancing the importance of water body and background, alpha = 0.76, beta = 0.
24. Foreground segmentation loss L fg The prediction accuracy of the model on water bodies is measured, and the specific calculation is as follows: where N fg is the number of pixels of the water body, is the model predicted pixel, i is the foreground probability; Background segmentation loss L bg The prediction accuracy of the model for the background is measured, and the calculation is as follows: where N bg is the number of pixels in the background, is the model predicted pixel, i is the background probability; The foreground segmentation loss and the background segmentation loss are combined to define the total loss of the network: L = L cls + L seg where L cls is the classification loss, L seg is the segmentation loss.
Citation Information
Patent Citations
Collaborative learning character recognition method under attention mechanism
CN112966684A
Weak supervision semantic segmentation method based on deep learning
CN113159048A