A method for training a cloud detection model and a cloud detection method

By introducing a boundary position perception module with deformable convolution and attention mechanism into the cloud detection model, the accuracy of cloud detection in mixed cloud and snow scenes is solved, high-precision cloud and snow boundary recognition is achieved, and the observation effect of satellite remote sensing images is improved.

CN119068356BActive Publication Date: 2025-07-25NAT UNIV OF DEFENSE TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411283874.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2025-07-25
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

In the existing technology, in the mixed cloud and snow scenes of high altitude and high latitude areas, the cloud detection accuracy is low, making it difficult to accurately distinguish between clouds and snow, affecting the observation effect of satellite remote sensing images.

Method used

The cloud detection model training method is adopted to perform cloud detection through the image segmentation model. The encoder and the decoder are connected through the boundary position perception module composed of deformable convolution and attention mechanism to extract complex cloud boundary features and improve detection accuracy.

Benefits of technology

It effectively improves the accuracy of cloud detection and recognition in mixed cloud and snow scenes, enhances the feature extraction capability of complex cloud boundaries, and improves the availability of satellite remote sensing images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119068356B_ABST
    Figure CN119068356B_ABST
Patent Text Reader

Abstract

The present invention discloses a cloud detection model training method and a cloud detection method, which are applied to the technical field of cloud detection. The method includes: obtaining a remote sensing image set containing cloud-snow mixed scenes, inputting training samples in the remote sensing image set into a cloud detection model to obtain an output cloud detection segmentation image; determining a loss value based on the cloud detection segmentation image and the training samples, and updating the model parameters of the cloud detection model based on the loss value; retraining the cloud detection model until the model parameters converge to obtain a trained cloud detection model; wherein, the encoder and the decoder of the cloud detection model are skip-connected through a boundary position perception module with deformable convolution. Cloud detection is performed through an image segmentation model. The encoder and the decoder of the model are skip-connected through a boundary position perception module composed of deformable convolution and an attention mechanism. The boundary position perception module can effectively extract the features of complex cloud boundaries, improving the accuracy of cloud detection and recognition of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cloud detection, and particularly to a method for training a cloud detection model and a cloud detection method. Background Art

[0002] High-resolution remote sensing satellites can not only be used for road traffic navigation, but also capture detailed information on the ground, and have wide applications in land planning and security monitoring. Clouds and snow cover seriously affect the observation of the Earth by satellite remote sensing images. Clouds may block the imaging channels of optical satellites and reduce the number of pixels in available images. Accurate cloud detection is crucial for the preprocessing of most remote sensing images. In high-altitude and high-latitude regions, snow shows similar reflection characteristics and texture features to clouds, resulting in low accuracy of cloud detection in cloud-snow mixed scenarios in the prior art. Summary of the Invention

[0003] The purpose of the present invention is to provide a method for training a cloud detection model and a cloud detection method, which are applied to the technical field of cloud detection. This method performs cloud detection through an image segmentation model. The encoder and decoder of the model are skip-connected through a boundary position perception module composed of deformable convolution and an attention mechanism. Through the boundary position perception module, the features of complex cloud boundaries can be effectively extracted, improving the accuracy of cloud detection and recognition of the model.

[0004] To solve the above technical problems, the present invention provides a method for training a cloud detection model, including:

[0005] Obtain a remote sensing image set containing cloud-snow mixed scenarios, and input the training samples in the remote sensing image set into the cloud detection model to obtain an output cloud detection segmentation image;

[0006] Determine a loss value based on the cloud detection segmentation image and the training sample, and update the model parameters of the cloud detection model based on the loss value;

[0007] Re-train the cloud detection model until the model parameters converge to obtain the trained cloud detection model;

[0008] Wherein, the encoder and decoder of the cloud detection model are skip-connected through a boundary position perception module;

[0009] The boundary position perception module includes: a classifier, a deformable convolution unit, a low-pass filter, a channel multiplier, and a multi-head attention mechanism unit;

[0010] The inputs of the classifier and the low-pass filter are the features extracted by the encoder; the input of the deformable convolution unit is the pre-segmentation result map output by the classifier; the inputs of the channel multiplier are the pre-segmentation result map and the low-frequency features output by the low-pass filter; the inputs of the multi-head attention mechanism unit are the query vector encoded by the low-frequency features, the key vector and the value vector encoded by the boundary features, and the output boundary attention is used as the input of the decoder.

[0011] Optionally, the encoder includes: a first two-fold downsampling module, a second two-fold downsampling module, a third two-fold downsampling module, a first dilated convolution module, a second dilated convolution module, a dilated pyramid pooling layer, and a first channel dimension reduction module connected in sequence.

[0012] Optionally, the decoder includes: a first feature fusion module, a second feature fusion module, a first two-fold upsampling module, a channel adder, and a four-fold upsampling module connected in sequence; the first dilated convolution module is skip-connected to the first feature fusion module through a first boundary position perception module, the third two-fold downsampling module is skip-connected to the second feature fusion module through a second boundary position perception module, the second two-fold downsampling module is connected to the channel adder of the decoder through an external channel dimension reduction module, the first channel dimension reduction module of the encoder is connected to the channel adder of the decoder through a second two-fold upsampling module, and the first feature fusion module is connected to the channel adder of the decoder through a third two-fold upsampling module.

[0013] Optionally, the dilated pyramid pooling layer includes a second channel dimension reduction module, a third dilated convolution module, a fourth dilated convolution module, a fifth dilated convolution module, a pooling module, and a feature splicing module arranged in parallel.

[0014] Optionally, the dilation rate of the first dilated convolution module is 2, the dilation rate of the second dilated convolution module is 4, the dilation rate of the third dilated convolution module is 12, the dilation rate of the fourth dilated convolution module is 24, and the dilation rate of the fifth dilated convolution module is 36.

[0015] Optionally, the feature fusion module in the decoder includes: two convolution normalization units, two pooling units, four channel multipliers, two channel adders, an activation function unit, and a channel dimension reduction unit;

[0016] The first convolution normalization unit is directly connected to the first channel multiplier and is connected to the first channel multiplier through the first pooling unit; the second convolution normalization unit is directly connected to the second channel multiplier and is connected to the second channel multiplier through the second pooling unit;

[0017] The first-channel multiplier is connected to the first-channel adder and the third-channel multiplier; the second-channel multiplier is connected to the first-channel adder and the fourth-channel multiplier;

[0018] The first-channel adder is connected to the channel dimensionality reduction unit; the channel dimensionality reduction unit is connected to the activation function unit;

[0019] The probability map output by the activation function unit serves as the input to the third-channel multiplier;

[0020] The result of subtracting the probability map output by the activation function unit from the all-ones matrix serves as the input to the fourth-channel multiplier;

[0021] The third-channel multiplier and the fourth-channel multiplier are connected to the second-channel adder.

[0022] Optionally, determining the loss value based on the cloud detection segmentation image and the training sample includes:

[0023] Determining the intersection over union based on the cloud detection segmentation image and the training sample.

[0024] Optionally, the downsampling module in the encoder includes a convolutional unit and a pooling unit.

[0025] Optionally, the pooling in the cloud detection model is average pooling.

[0026] To solve the above technical problems, the present invention provides a cloud detection method, including:

[0027] Obtaining an image to be detected;

[0028] Inputting the image to be detected into the cloud detection model to obtain an object segmentation image output by the cloud detection model;

[0029] Wherein, the cloud detection model is a model trained according to the cloud detection model training method.

[0030] It can be seen that the method of the present invention obtains a remote sensing image set containing a cloud-snow mixed scene, inputs the training samples in the remote sensing image set into a cloud detection model to obtain an output cloud detection segmentation image; determines a loss value based on the cloud detection segmentation image and the training samples, and updates the model parameters of the cloud detection model based on the loss value; retrains the cloud detection model until the model parameters converge to obtain a trained cloud detection model; wherein, the encoder and decoder of the cloud detection model are skip-connected through a boundary position perception module; the boundary position perception module includes two branches, the first branch includes a classifier and a deformable convolution unit connected in sequence, and the second branch includes a low-pass filter; the low-pass filter and the deformable convolution unit are connected through a channel adder. The method of the present invention performs cloud detection through an image segmentation model. The encoder and decoder of the model are skip-connected through a boundary position perception module composed of a deformable convolution and an attention mechanism. The boundary position perception module can effectively extract the features of complex cloud boundaries, improving the accuracy of cloud detection and recognition of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.

[0032] Figure 1 It is a flowchart of a cloud detection model training method provided by an embodiment of the present invention;

[0033] Figure 2 It is a structural example diagram of a boundary position perception module provided by an embodiment of the present invention;

[0034] Figure 3 It is a structural example diagram of a cloud detection model provided by an embodiment of the present invention;

[0035] Figure 4 It is a structural example diagram of an atrous spatial pyramid pooling module provided by an embodiment of the present invention;

[0036] Figure 5 It is a structural example diagram of a feature fusion module provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0037] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0038] In addition to providing road traffic navigation, high-resolution remote sensing satellites can also capture detailed information on the ground and have extensive applications in land planning and security monitoring. However, on average, about 66% of the sky on Earth is covered by clouds every year, of which more than about 30% is covered by seasonal snow, and about 10% is covered by permanent snow.

[0039] Cloud and snow cover seriously affect the observation of the Earth by satellite remote sensing images. Clouds may block the imaging channels of optical satellites and reduce the number of pixels in the available images. In addition, clouds and snow may blur or obscure ground objects, seriously affecting the usability of optical satellite data. Accurate cloud detection is crucial for the preprocessing of most remote sensing images.

[0040] However, in high-altitude and high-latitude regions, snow shows similar reflection characteristics and texture features to clouds, which brings interference to cloud detection methods. Therefore, cloud detection in areas where clouds and snow coexist is more challenging than other situations. The boundary between clouds and snow is blurred, making it difficult to accurately classify clouds and snow.

[0041] Although the detection of clouds and snow in remote sensing images provides key information for various practical tasks, achieving high-precision detection is still challenging. The emergence of deep learning provides a promising solution to address this challenge.

[0042] Due to the similar radiation characteristics and similar texture features of clouds and snow in the cloud-snow mixed area, existing deep learning methods are only applicable to cloud detection and recognition in single scenes and are difficult to distinguish clouds from snow in such complex scenes. Moreover, the existence of thin clouds further makes it difficult to distinguish the cloud-snow boundary. How to correctly detect the cloud-snow boundary in the cloud-snow mixed scene is very important for improving the usability of optical remote sensing images.

[0043] The present invention proposes a cloud detection model based on boundary position attention for cloud detection in a cloud-snow mixed scene, which is used for accurate detection of cloud pixels in a cloud-snow mixed scene. Specifically, deformable convolution enhances the receptive field by dynamically adjusting the position of the convolution kernel. This technology enables the network to flexibly capture local target features, effectively identify complex cloud boundary features, and significantly improve the detection performance in an environment where clouds and snow coexist. And when deformable convolution is combined with the Transformer model, this method further enhances the ability to recognize attention and boundary positions. The Transformer model is a deep neural network model based on the self-attention mechanism.

[0044] The following combines Figure 1 , Figure 1 is a flowchart of a cloud detection model training method provided by an embodiment of the present invention. The method may include:

[0045] S101: Obtain a remote sensing image set containing a cloud-snow mixed scene, and input the training samples in the remote sensing image set into the cloud detection model to obtain an output cloud detection segmentation image.

[0046] The cloud detection model in this embodiment is designed to detect clouds in a complex cloud-snow scene. Therefore, this embodiment can obtain a remote sensing image set containing a cloud-snow mixed scene. This embodiment does not limit the specific method of obtaining the remote sensing image set, nor the specific type of the remote sensing image set. Specifically, the remote sensing image set in this embodiment can be the CloudS26 dataset. The CloudS26 dataset is a remote sensing image dataset focused on cloud detection. It provides a large number of high-resolution remote sensing images for training and testing deep learning models to identify and segment clouds. Each scene in the dataset has visible clouds and snow within the field of view. The CloudS26 dataset includes a training set, a validation set, and a test set, which contain 24,179, 2,679, and 8,380 images respectively.

[0047] The remote sensing image set in this embodiment may include the CSWV dataset. The CSWV dataset is a pioneering high-resolution cloud-snow dataset with a spatial resolution ranging from 0.5 meters to 10 meters. The scenes depicted by these images include forests, grasslands, lake areas, and bare ground, etc. The snow cover is divided into three types: permanent snow cover, stable snow cover, and intermittent snow cover, showing a variety of scenes and enhancing the universality and representativeness of the dataset.

[0048] Before model training, this embodiment can preprocess remote sensing image sets of different sizes, such as unifying the resolution and normalizing. This embodiment does not limit the size of the input image resolution, nor the specific method of normalization, which can be set based on actual applications.

[0049] This embodiment does not limit the specific manner of model training. Generally, AdaGrad (Adaptive Gradient Algorithm) can be used as the optimizer, the learning rate can be set to 0.05, and the Xavier strategy can be used for weight initialization. The Xavier strategy is a parameter initialization strategy widely used in deep learning, aiming to solve the problems of gradient disappearance and gradient explosion, and at the same time accelerate the convergence speed of the model. This embodiment can train for 500 epochs, the weight decay can be 1×10^(-4), and the batch size can be set to 16.

[0050] This embodiment can input the training samples in the remote sensing image set into the cloud detection model to obtain the output cloud detection segmentation image, and update the model parameters through the output cloud detection segmentation image.

[0051] S102: Determine the loss value based on the cloud detection segmentation image and the training samples, and update the model parameters of the cloud detection model based on the loss value.

[0052] This embodiment can determine the loss value based on the cloud detection segmentation image and the training samples, and update the model parameters of the cloud detection model based on the loss value. This embodiment does not limit the specific type of the model loss function. Generally, the ratio of the intersection area to the union area between the cloud detection segmentation image and the labeled ground truth can be calculated, that is, the intersection over union.

[0053] This embodiment can determine the intersection over union based on the cloud detection segmentation image and the training samples, and update the model parameters of the cloud detection model based on the intersection over union.

[0054] S103: Re-train the cloud detection model until the model parameters converge to obtain the trained cloud detection model; wherein, the encoder and decoder of the cloud detection model are connected by skipping layers through the boundary position perception module; the boundary position perception module includes: a classifier, a deformable convolution unit, a low-pass filter, a channel multiplier, and a multi-head attention mechanism unit; the input of the classifier and the low-pass filter is the feature extracted by the encoder; the input of the deformable convolution unit is the pre-segmentation result map output by the classifier; the input of the channel multiplier is the pre-segmentation result map and the low-frequency feature output by the low-pass filter; the input of the multi-head attention mechanism unit is the query vector encoded by the low-frequency feature and the key vector and value vector encoded by the boundary feature, and the output boundary attention is used as the input of the decoder.

[0055] This embodiment can re-train the cloud detection model based on the preset epochs until the model parameters converge to obtain the trained cloud detection model. This embodiment can perform cloud detection in complex scenarios through the trained cloud detection model.

[0056] This embodiment does not limit the specific architecture of the cloud detection model. Generally, it can be an image segmentation model with a U-shaped structure. The encoder and decoder of the cloud detection model are connected by skip layers through a boundary position attention module. The boundary position attention module includes: a classifier, a deformable convolution unit, a low-pass filter, a channel multiplier, and a multi-head attention mechanism unit. The inputs of the classifier and the low-pass filter are the features extracted by the encoder. The input of the deformable convolution unit is the pre-segmentation result map output by the classifier. The inputs of the channel multiplier are the pre-segmentation result map and the low-frequency features output by the low-pass filter. The inputs of the multi-head attention mechanism unit are the query vector encoded by the low-frequency features and the key vector and value vector encoded by the boundary features, and the output boundary attention is used as the input of the decoder.

[0057] By using deformable convolution and attention mechanism to generate attention centered on the boundary position, the network can learn the subtle differences at the object edges. The boundary position attention module is crucial for improving the model's ability to accurately divide boundaries in complex visual scenes.

[0058] The specific architecture of the boundary position attention module (BPAM) can be as Figure 2 shown. The input of the boundary position attention module can be the feature map extracted by the encoder. The feature map is pre-segmented by the classifier to obtain a pre-segmentation result map. The pre-segmentation result map is processed by the deformable convolution unit to extract the warping deformation field (Warp), thereby extracting boundary information from the rough prediction result. The feature map is processed by the low-pass filter to obtain low-frequency features. The low-frequency features and the warping deformation field are input into the channel multiplier to obtain boundary features containing boundary information. The boundary features are encoded to obtain a key vector (Key) and a value vector (Value). The low-frequency features are encoded to obtain a query vector (Query). The key vector, value vector, and query vector are used as the inputs of the multi-head attention mechanism unit, and the boundary attention of the boundary features is obtained through the multi-head attention mechanism unit. This embodiment does not limit the specific type of the classifier, nor the specific architecture of the multi-head attention mechanism unit.

[0059] This embodiment does not limit the specific architecture of the encoder. It can be based on the deeplabv3 architecture, including a downsampling module, an atrous convolution module, and an atrous spatial pyramid pooling module. Deeplabv3 is a classic deep neural network for semantic segmentation tasks. This embodiment does not limit the number of downsampling modules and the downsampling ratio, nor the number of atrous convolution modules and the atrous rate of the atrous convolution.

[0060] To extract multi-scale information from deep layers, this embodiment employs a set of parallel atrous convolutions operating at different dilation rates. This design choice enables the cloud detection model to cover different receptive fields without sacrificing resolution, thereby comprehensively capturing the various features necessary to understand complex images.

[0061] Specifically, the encoder in this embodiment can be as Figure 3 shown, including: a first two-fold downsampling module, a second two-fold downsampling module, a third two-fold downsampling module, a first atrous convolution module, a second atrous convolution module, an atrous spatial pyramid pooling layer, and a first channel reduction module connected in sequence. The two-fold downsampling module is used to perform downsampling with a factor of 2.

[0062] The downsampling module in this embodiment is used for feature extraction. This embodiment does not limit the specific manner of feature extraction by the downsampling module. Generally, the downsampling module can include a convolution unit and a pooling unit, and feature extraction is performed through the convolution unit and the pooling unit.

[0063] This embodiment does not limit the specific architecture of the atrous spatial pyramid pooling layer (ASPP). It can be as Figure 4 shown, generally including a second channel reduction module, a third atrous convolution module, a fourth atrous convolution module, a fifth atrous convolution module, a pooling module, and a feature concatenation module arranged in parallel. The outputs of the second channel reduction module, the third atrous convolution module, the fourth atrous convolution module, the fifth atrous convolution module, and the pooling module are feature concatenated by the feature concatenation module.

[0064] Furthermore, in this embodiment, the dilation rate of the first atrous convolution module can be 2, the dilation rate of the second atrous convolution module can be 4, the dilation rate of the third atrous convolution module can be 12, the dilation rate of the fourth atrous convolution module can be 24, and the dilation rate of the fifth atrous convolution module can be 36.

[0065] This embodiment does not limit the specific type of the decoder. Generally, as shown in 3, it includes: a first feature fusion module, a second feature fusion module, a first two-fold upsampling module, a channel adder, and a four-fold upsampling module connected in sequence; the first atrous convolution module is skip-connected to the first feature fusion module through a first boundary position perception module, the third two-fold downsampling module is skip-connected to the second feature fusion module through a second boundary position perception module, the second two-fold downsampling module is connected to the channel adder of the decoder through an external channel reduction module, the first channel reduction module of the encoder is connected to the channel adder of the decoder through a second two-fold upsampling module, and the first feature fusion module is connected to the channel adder of the decoder through a third two-fold upsampling module.

[0066] In this embodiment, the channel dimensionality reduction of the cloud detection model can generally be achieved through 1×1 convolution, and the pooling operation can be average pooling.

[0067] The feature fusion module is used to integrate features at different depths of the network, extract boundary details from shallow representations, and adaptively mix the boundary details learned from the shallows with the abstract features obtained from the deep layers. This module ensures that the network can utilize both local and global information simultaneously to improve its prediction accuracy and enhance its overall performance in boundary detection tasks.

[0068] In most previous studies, element-wise summation is the most widely used method in multi-scale feature fusion. However, this simple summation operation cannot consider the horizontal or scale differences between different feature maps. To effectively fuse multi-scale feature maps, this embodiment proposes a feature fusion module to ensure seamless fusion of features at different scales, and its architecture can be as Figure 5 shown, including: two convolutional normalization units, two pooling units, four channel multipliers, two channel adders, one activation function unit, and one channel dimensionality reduction unit;

[0069] The first convolutional normalization unit is directly connected to the first channel multiplier and is connected to the first channel multiplier through the first pooling unit;

[0070] The second convolutional normalization unit is directly connected to the second channel multiplier and is connected to the second channel multiplier through the second pooling unit;

[0071] The first channel multiplier is connected to the first channel adder and the third channel multiplier; the second channel multiplier is connected to the first channel adder and the fourth channel multiplier;

[0072] The first channel adder is connected to the channel dimensionality reduction unit; the channel dimensionality reduction unit is connected to the activation function unit;

[0073] The probability map output by the activation function unit serves as the input to the third channel multiplier; the result of subtracting the probability map output by the channel dimensionality reduction unit from the all-ones matrix serves as the input to the fourth channel multiplier;

[0074] The third channel multiplier and the fourth channel multiplier are connected to the second channel adder.

[0075] In this embodiment, the first convolutional normalization unit and the second convolutional normalization unit are used to receive the features to be fused. The first convolutional normalization unit and the second convolutional normalization unit can both receive the features of the current layer and the features of the previous layer, and this embodiment does not make specific limitations.

[0076] In this embodiment, features are enhanced by a Convolution Batch Normalization (CBN) unit, and then a global channel descriptor is extracted by a pooling unit; the output of the first convolution normalization unit is multiplied by the output of the first pooling unit through a first channel multiplier; the output of the second convolution normalization unit is multiplied by the output of the second pooling unit through a second channel multiplier; the outputs of the first channel multiplier and the second channel multiplier are added by a first channel adder.

[0077] In this embodiment, the output of the first channel adder is processed by a channel dimensionality reduction unit to compress the number of channels of the feature map to 1; the output of the channel dimensionality reduction unit is processed by an activation function to obtain the weight ratio of the feature map, that is, a probability map (map); the specific type of the activation function is not limited in this embodiment, and generally, it can be a sigmoid activation function.

[0078] The probability map output by the activation function unit is used as the input of a third channel multiplier and multiplied by the output of the first multiplier; the result of subtracting the probability map output by the activation function unit from the all-1 matrix is used as the input of a fourth channel multiplier and multiplied by the output of the second multiplier; the outputs of the third channel multiplier and the fourth channel multiplier are used as the input of a second channel adder, and finally, the fused feature output by the second channel adder is obtained.

[0079] Based on the above embodiment, the method of the present invention performs cloud detection through an image segmentation model. The encoder and decoder of the model are skip-connected through a boundary position perception module composed of deformable convolution and an attention mechanism. Through the boundary position perception module, the features of complex cloud boundaries can be effectively extracted, improving the accuracy of cloud detection and recognition of the model.

[0080] The following is a cloud detection method provided by an embodiment of the present invention. The method may include:

[0081] Obtain an image to be detected;

[0082] Input the image to be detected into a cloud detection model to obtain a target segmentation image output by the cloud detection model;

[0083] Wherein, the cloud detection model is a model trained according to the cloud detection model training method.

[0084] Based on the above embodiment, the present invention can also provide an electronic device. The device may include a memory and a processor. Among them, a computer program is stored in the memory. When the processor calls the computer program in the memory, the steps provided by the above embodiment can be implemented. Of course, the device may also include various necessary network interfaces, power supplies, and other components, etc.

[0085] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by an execution terminal or a processor, the method provided by the embodiments of the present invention can be implemented; the storage medium may include: various media capable of storing program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc.

[0086] In this text, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.

Claims

1. A method for training a cloud detection model, characterized in that, Including: Obtain a remote sensing image set containing a cloud-snow mixed scene, and input the training samples in the remote sensing image set into a cloud detection model to obtain an output cloud detection segmentation image; Determine a loss value based on the cloud detection segmentation image and the training samples, and update the model parameters of the cloud detection model based on the loss value; Retrain the cloud detection model until the model parameters converge to obtain the trained cloud detection model; Among them, the encoder and decoder of the cloud detection model are skip-connected through a boundary position perception module; The boundary position perception module includes: a classifier, a deformable convolution unit, a low-pass filter, a channel multiplier, and a multi-head attention mechanism unit; The input of the classifier and the low-pass filter is the feature extracted by the encoder; the input of the deformable convolution unit is the pre-segmentation result map output by the classifier; the input of the channel multiplier is the pre-segmentation result map and the low-frequency feature output by the low-pass filter; the input of the multi-head attention mechanism unit is the query vector obtained after encoding the low-frequency feature, the key vector and value vector obtained after encoding the boundary feature, and the output boundary attention is used as the input of the decoder; The feature fusion module in the decoder includes: two convolutional normalization units, two pooling units, four channel multipliers, two channel adders, one activation function unit, and one channel dimensionality reduction unit; The first convolutional normalization unit is directly connected to the first channel multiplier and is connected to the first channel multiplier through the first pooling unit; the second convolutional normalization unit is directly connected to the second channel multiplier and is connected to the second channel multiplier through the second pooling unit; The first channel multiplier is connected to the first channel adder and the third channel multiplier; the second channel multiplier is connected to the first channel adder and the fourth channel multiplier; The first channel adder is connected to the channel dimensionality reduction unit; the channel dimensionality reduction unit is connected to the activation function unit; The probability map output by the activation function unit is used as the input of the third channel multiplier; The result of subtracting the probability map output by the activation function unit from the all-1 matrix is used as the input of the fourth channel multiplier; The third channel multiplier and the fourth channel multiplier are connected to the second channel adder.

2. The cloud detection model training method according to claim 1, wherein The encoder includes: a first two-fold downsampling module, a second two-fold downsampling module, a third two-fold downsampling module, a first dilated convolution module, a second dilated convolution module, a dilated pyramid pooling layer, and a first channel dimensionality reduction module connected in sequence.

3. The cloud detection model training method according to claim 2, wherein The decoder includes: a first feature fusion module, a second feature fusion module, a first two-fold upsampling module, a channel adder, and a four-fold upsampling module connected in sequence; the first atrous convolution module is skip-connected to the first feature fusion module through a first boundary position perception module, the third two-fold downsampling module is skip-connected to the second feature fusion module through a second boundary position perception module, the second two-fold downsampling module is connected to the channel adder of the decoder through an external channel dimensionality reduction module, the first feature fusion module is connected to the channel adder of the decoder through a second two-fold upsampling module, and the first channel dimensionality reduction module of the encoder is connected to the channel adder of the decoder through a third two-fold upsampling module.

4. The cloud detection model training method according to claim 2, wherein The atrous spatial pyramid pooling layer includes a second channel dimensionality reduction module, a third atrous convolution module, a fourth atrous convolution module, a fifth atrous convolution module, a pooling module, and a feature splicing module arranged in parallel.

5. The cloud detection model training method according to claim 4, wherein The atrous rate of the first atrous convolution module is 2, the atrous rate of the second atrous convolution module is 4, the atrous rate of the third atrous convolution module is 12, the atrous rate of the fourth atrous convolution module is 24, and the atrous rate of the fifth atrous convolution module is 36.

6. The cloud detection model training method according to claim 1, wherein Determining the loss value based on the cloud detection segmentation image and the training sample includes: Determining the intersection over union based on the cloud detection segmentation image and the training sample.

7. The cloud detection model training method according to claim 1, wherein The downsampling module in the encoder includes a convolution unit and a pooling unit.

8. The cloud detection model training method according to claim 1, wherein The pooling in the cloud detection model is average pooling.

9. A cloud detection method, characterized in that, It includes: Obtaining an image to be detected; Inputting the image to be detected into the cloud detection model to obtain a target segmentation image output by the cloud detection model; Wherein, the cloud detection model is a model trained according to the cloud detection model training method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Dermatoscope image segmentation method and system

    CN114419060A