A remote sensing image cloud detection method and system based on a state space model

CN122967129APending Publication Date: 2026-10-23CHONGQING TECH & BUSINESS INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611188008.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-06
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0007]本发明提出了一种基于状态空间模型的遥感影像云检测方法、系统与介质,旨在解决现有遥感影像云检测方法难以在大尺度薄云长距离依赖建模与高反射率地表判别所要求的检测精度、与线性计算复杂度可部署的计算效率之间取得平衡的问题

Benefits of technology

1、与现有技术相比,本发明在编码阶段将输入特征沿通道维度分流为两路子特征,分别经滑动局部注意力与膨胀局部注意力增强,再将拼接得到的多尺度空间增强特征经状态空间模型进行全局空间依赖建模,并将全局建模结果与局部注意力增强结果动态聚合、与输入特征残差连接,使网络既能通过滑动局部注意力增强细粒度纹理判别以区分薄云与裸土、建筑等高反射率地物,又能通过膨胀局部注意力与状态空间模型的全局建模捕获大尺度半透明薄云的长距离空间连续性,解决了现有卷积类方法感受野受限导致大范围薄云漏检、以及薄云与高反射率地表相似而误检的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122967129A_ABST
    Figure CN122967129A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of remote sensing image reconstruction processing, and discloses a remote sensing image cloud detection method and system based on a state space model, which comprises the following steps: acquiring a remote sensing image to be detected and inputting the remote sensing image into an encoder comprising multiple cascaded coding stages; each coding stage performs local attention enhancement on features after the features are shunted along channels; global space dependence modeling is performed on the features by a state space model, and the features are dynamically aggregated and connected with residuals, so that the long-distance dependence modeling capability of large-scale thin clouds is enhanced, and high-reflectivity ground interference is inhibited; multi-scale features are input into a decoder for multi-granularity space feature perception and semantic aggregation, so that accurate positioning of a thin cloud boundary is realized; and finally, a cloud detection mask with the same resolution is output. While maintaining linear computational complexity, the application avoids the problems of large-scale thin cloud missing detection and high-reflectivity ground false detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of remote sensing image processing technology, and more specifically relates to a remote sensing image cloud detection method and system based on a state-space model. Background Technology

[0002] Cloud detection in remote sensing imagery is a core component of remote sensing data preprocessing. Earth observation data acquired by optical remote sensing satellites is widely used in environmental monitoring, disaster assessment, and land management. However, with an average annual cloud cover of nearly 70% globally, severe cloud pollution significantly interferes with solar radiation transmission and surface radiance retrieval, resulting in substantial data waste. Therefore, high-precision, automated cloud detection is crucial for ensuring data quality and improving image usability.

[0003] Early cloud detection methods primarily relied on spectral thresholds or manually designed physical rules for classification, exhibiting stable performance in typical scenarios. However, their generalization ability and robustness were significantly limited under conditions of complex lighting, large-scale thin cloud distribution, and strong background interference from highly reflective surfaces. With the development of deep learning, cloud detection techniques have gradually evolved into two main directions: methods based on convolutional neural networks and methods based on visual Transformers, achieving progress in multi-scale spatial feature extraction and global context modeling, respectively.

[0004] For example, the paper "Residual Dual U-Shape Networks With Improved Skip Connections for Cloud Detection" by A. Li, X. Li, X. Ma, et al., published in *IEEE Geoscience and Remote Sensing Letters*, 2024, Vol. 21, pp. 1-5 (DOI: 10.1109 / LGRS.2023.3337860), introduces a residual structure and improved skip connections into a U-Net, using an encoder-decoder architecture to extract multi-scale spatial texture and spectral features to improve cloud detection accuracy. However, this type of technique is limited by the inherent local receptive field of convolutional operations, making it difficult to capture the long-range spatial dependencies of large-scale semi-transparent targets such as thin clouds, leading to missed detections in large areas of thin clouds. Furthermore, the spectral characteristics of high-reflectivity features such as bare soil, buildings, and snow are similar to those of thin clouds, making false detections likely when global discrimination is lacking.

[0005] For example, the paper "CloudViT: A Lightweight Vision Transformer Network for Remote Sensing Cloud Detection" by B. Zhang, Y. Zhang, Y. Li, Y. Wan, and Y. Yao, published in *IEEE Geoscience and Remote Sensing Letters*, 2023, Vol. 20, pp. 1-5 (DOI: 10.1109 / LGRS.2022.3233122), utilizes a self-attention mechanism to explicitly establish global feature interactions, thereby overcoming the limitations of the local receptive field of convolution and demonstrating strong recognition capabilities for large-scale cloud structures. However, the computational complexity of self-attention in this type of technology increases quadratically with image size, significantly increasing memory usage and inference time when processing high-resolution remote sensing images. Furthermore, the lightweight approach taken to achieve efficiency often comes at the cost of sacrificing some detection accuracy, making it difficult to deploy efficiently in resource-constrained real-world business scenarios.

[0006] In summary, existing cloud detection methods for remote sensing images based on convolutional neural networks and visual Transformers struggle to achieve a good balance between the required detection accuracy for large-scale thin cloud long-distance dependency modeling and the distinction between thin clouds and high-reflectivity surfaces, as well as linear computational complexity and deployable computational efficiency. Furthermore, their robustness to interference from high-reflectivity surfaces is also insufficient. Summary of the Invention

[0007] This invention proposes a remote sensing image cloud detection method, system, and medium based on a state-space model, aiming to solve the problem that existing remote sensing image cloud detection methods struggle to balance the required detection accuracy for large-scale thin cloud long-distance dependent modeling and high-reflectivity surface discrimination with the computational efficiency that allows for deployment of linear computational complexity.

[0008] To achieve the above objectives, the basic solution of this invention provides a remote sensing image cloud detection method based on a state-space model, comprising the following steps: Step S1: Acquire the remote sensing image to be detected; Step S2: Input the remote sensing image to be detected into the encoder. The encoder includes multiple cascaded encoding stages. Each encoding stage sequentially performs embedding processing and attention-guided state space enhancement processing on the input features. The embedding processing is used to reduce spatial resolution and increase the number of channels. The attention-guided state space enhancement processing includes: splitting the input features into two sub-features along the channel dimension; performing local attention enhancement on the two sub-features respectively and concatenating the enhancement results to obtain multi-scale spatial enhancement features; performing global spatial dependency modeling on the multi-scale spatial enhancement features through a state space model to obtain global context features; dynamically aggregating the global context features with the results of the local attention enhancement and performing residual connection with the input features to output the enhanced encoded features. Step S3: Input the multi-scale features output from different coding stages in the encoder into the decoder. The decoder performs multi-granular spatial feature perception and semantic aggregation on the multi-scale features from different coding stages, and upsamples them step by step to restore spatial resolution. Step S4: Output a cloud detection prediction mask with the same resolution as the remote sensing image to be detected. The cloud detection prediction mask indicates whether a cloud is present on a pixel-by-pixel basis.

[0009] In one possible design, the attention-guided state-space enhancement process described in step S2 includes the following sub-steps: Step S201: Divide the input features into a first sub-feature and a second sub-feature along the channel dimension; Step S202: Perform sliding local attention enhancement on the first sub-feature to enhance the perception of fine-grained local features, and perform dilation local attention enhancement on the second sub-feature to enhance the perception of sparse large-scale context features; Step S203: Concatenate the attention enhancement results of the first sub-feature and the second sub-feature along the channel dimension to obtain the multi-scale spatial enhancement feature; Step S204: Project the multi-scale spatial enhancement features into multiple sequence features, and perform selective scanning through a state space model to obtain the global context features that characterize the long-distance spatial context; Step S205: Dynamically aggregate the global context features with the attention enhancement results of the first sub-feature and the second sub-feature, and use the input features as residual terms after being weighted by learnable weights for residual connection, and output the enhanced encoded features.

[0010] In one possible design, in step S202, the size of the attention window of the sliding local attention is K×K, where K is 5, 7 or 9; the expansion rate of the dilated local attention is d, where d is 2, 3 or 4.

[0011] In one possible design, the state space model described in step S2 uses a bidirectional scanning strategy or a four-directional scanning strategy to model global spatial dependencies.

[0012] In one possible design, the multi-granularity spatial feature perception and semantic aggregation in step S3 includes: performing spatial downsampling on multi-scale features from different encoding stages through pixel inverse rearrangement and stride convolution, and then performing reverse processing and channel alignment to obtain multiple spatial context features of different granularities; after aggregating and concatenating the multiple spatial context features of different granularities along the channels, fusing global pooling information to perform global context enhancement to obtain semantic aggregated features.

[0013] In one possible design, the encoder includes a first encoding stage, a second encoding stage, a third encoding stage, and a fourth encoding stage cascaded in sequence. The number of channels for the output features of the first to fourth encoding stages are 64, 128, 256, and 512, respectively, and the spatial dimensions of the output features are 1 / 2, 1 / 4, 1 / 8, and 1 / 16 of the remote sensing image to be detected, respectively.

[0014] In one possible design, in step S3, the output features of the first encoding stage are aligned by channels and then input together with the multi-scale features output by the third and fourth encoding stages into the decoder for multi-granularity spatial feature perception and semantic aggregation. The features input to the decoder for multi-granularity spatial feature perception and semantic aggregation are limited to the features from the first, third, and fourth encoding stages. The aggregation result is upsampled twice to restore the resolution of the remote sensing image to be detected.

[0015] In one possible design, the cloud detection prediction mask is obtained by training a network consisting of the encoder and the decoder, using cross-entropy loss as the loss function, as follows:

[0016] In the formula, Represents cross-entropy loss; Indicates the number of samples; Indicates the number of categories; Indicates the first The category in the true label of each sample The possible values ​​of ; The network predicts the first... Each sample belongs to category The probability of.

[0017] In one possible design, in step S1, the remote sensing image to be detected is cropped into multiple sliding window images with preset sizes and then input into the encoder respectively; in step S4, the cloud detection prediction masks corresponding to each sliding window image are stitched and fused to obtain the cloud detection result of the remote sensing image to be detected, and the overlapping areas in the stitching and fusion are processed by majority voting or probability averaging.

[0018] The present invention also provides a system including a storage component and a processing unit, wherein the storage component stores machine-executable instructions that can be executed by the processing unit, and the processing unit executes the machine-executable instructions to implement the method as described above.

[0019] The beneficial effects of this invention include: 1. Compared with existing technologies, this invention splits the input features into two sub-features along the channel dimension during the encoding stage. These sub-features are then enhanced by sliding local attention and dilated local attention, respectively. The resulting multi-scale spatially enhanced features are then modeled globally using a state-space model. The global modeling results are dynamically aggregated with the local attention enhancement results and connected to the input feature residuals. This allows the network to distinguish between thin clouds and high-reflectivity features such as bare soil and buildings by enhancing fine-grained texture discrimination through sliding local attention. It also captures the long-distance spatial continuity of large-scale semi-transparent thin clouds through global modeling of dilated local attention and the state-space model. This solves the problems of limited receptive field leading to missed detection of large-scale thin clouds and false detection due to the similarity between thin clouds and high-reflectivity surfaces in existing convolutional methods.

[0020] 2. Compared with the prior art, the present invention replaces the self-attention mechanism, whose computational complexity increases quadratically with the image size, with a state-space model whose computational complexity increases linearly with the sequence length to complete global spatial dependency modeling. While obtaining global context modeling capability, it maintains linear computational complexity and solves the problem that existing self-attention-based methods significantly increase memory usage and inference time when processing high-resolution remote sensing images, making them difficult to deploy efficiently.

[0021] 3. Compared with the prior art, the present invention performs multi-granular spatial feature perception and semantic aggregation on multi-scale features from different encoding stages during the decoding stage. Through spatial downsampling, multi-granular context extraction, aggregation and splicing and global pooling enhancement, shallow fine-grained spatial information and deep multi-scale semantic features are jointly modeled, which solves the problems of loss of fine-grained spatial information and inaccurate positioning of thin cloud boundaries during the step-by-step upsampling process. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This paper illustrates the overall network framework of a remote sensing image cloud detection method based on a state-space model proposed in this application, as well as the structural diagram of the multi-granularity spatial feature perception and semantic aggregation (MSSE) module. Figure 2 This paper shows a schematic diagram of the structure of the attention-guided state-space augmented ATT-M module proposed in an embodiment of this application; Figure 3 The diagram illustrates a comparison of cloud detection results between the method proposed in this application and a comparative method on two datasets. Detailed Implementation

[0024] To further illustrate the various embodiments, the present invention provides accompanying drawings, which are part of the disclosure of the present invention. These drawings are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementation methods and the advantages of the present invention. The components in the drawings are not drawn to scale, and similar component symbols are generally used to represent similar components.

[0025] Example: A cloud detection method for remote sensing images based on a state-space model, implementing, for example... Figure 1-2 As shown, it includes the following steps: Step S1: Acquire the remote sensing image to be detected.

[0026] Specifically, to adapt remote sensing images to the batch processing input of the network, the images are uniformly cropped into image patches of a preset size. In this embodiment, the AIR-CD dataset, constructed from high-resolution Gaofen-2 satellite imagery, and the 38-Cloud dataset, constructed from medium-resolution Landsat-8 satellite imagery, are used for training and validation. All images are uniformly cropped into 512×512 pixel image patches. The division of the training and test sets follows publicly available standards: AIR-CD uses 22 images for training and 12 images for testing, while 38-Cloud uses 18 images for training and 20 images for testing. Furthermore, data augmentation strategies are employed during the training phase, including random horizontal flipping, random vertical flipping, and random rotations of 90°, 180°, and 270°, to improve the model's generalization ability.

[0027] Step S2: Input the remote sensing image to be detected into the encoder, which performs embedding processing and attention-guided state space enhancement processing step by step to output multi-scale features.

[0028] Specifically, the encoder employs multiple cascaded encoding stages. Each stage includes an embedding layer for progressively reducing spatial resolution and increasing the number of channels, as well as an attention-guided state-space enhancement module for feature enhancement. The motivation for setting up dual-path differentiated local attention and state-space modeling is that convolutional methods are limited by their local receptive field, making it difficult to model the long-distance spatial dependencies of large-scale thin clouds; while self-attention-based methods, although possessing global modeling capabilities, have computational complexity that increases quadratically with image size. Therefore, this embodiment first uses channel-splitting dual-path local attention to enhance fine-grained texture discrimination and sparse large-scale perception respectively, and then uses a state-space model with linear complexity to complete global spatial dependency modeling, thus balancing accuracy and efficiency.

[0029] Feature maps of the input attention-guided state space enhancement module Its enhancement process includes the following sub-steps: Step S201: Input features Along the channel dimension, it is divided into a first sub-feature and a second sub-feature, both with the same number of channels. ; Step S202: Perform sliding local attention enhancement on the first sub-feature to enhance the perception of fine-grained local features, which is used to distinguish subtle texture differences between thin clouds and high-reflectivity ground features; perform dilated local attention enhancement on the second sub-feature to enhance the perception of sparse large-scale context features with a larger receptive field, which is used to suppress interference from high-reflectivity ground surfaces. Step S203: Concatenate the attention enhancement results of the first sub-feature and the second sub-feature along the channel dimension to obtain the multi-scale spatial enhancement feature; Step S204: Project the multi-scale spatial enhancement features into multiple sequence features, perform selective scanning through the state space model, capture the long-distance spatial continuity of large-scale semi-transparent thin clouds, and obtain global context features that characterize the long-distance spatial context. Step S205: Dynamically aggregate the global context features with the attention enhancement results of the first and second sub-features to achieve dynamic enhancement of global dependency and spatial consistency, and then aggregate the input features. The learned weights are used as residual terms for residual connection, and the enhanced encoded features are output.

[0030] In this embodiment, the encoder includes first to fourth encoding stages cascaded sequentially, with the number of output channels for each stage being 64, 128, 256, and 512 respectively, and the output spatial dimensions being 1 / 2, 1 / 4, 1 / 8, and 1 / 16 of the original image respectively; in the attention-guided state space enhancement module, the number of attention heads is 8, and the window size for sliding local attention is... The expansion rate of local attention The state space model has a state dimension of 16 and employs a bidirectional scanning strategy. Furthermore, the window size of the sliding local attention can be 5×5, 7×7, or 9×9, and the expansion rate of the dilated local attention can be 2, 3, or 4. The state space model can also employ a four-directional scanning strategy to adapt to cloud structures of different scales and shapes.

[0031] It should be noted that the projection method of sequence features and the selective scanning process of the state space model in step S204, and the dynamic aggregation method in step S205, can all adopt state space modeling and feature aggregation implementation methods known in the art. This embodiment limits their functions but does not limit their specific formulas.

[0032] This invention designs an ATT-M module (i.e., a state-space enhancement module), the structure of which is shown in Figure 2. This module mainly consists of two key components: local self-attention and a state-space model (SSM). Local self-attention enhances the spatial context awareness of remote sensing images, while the SSM module improves the recognition of large-scale cloud targets within the global context. For a given input feature... First, it is divided into two feature spaces along the channel dimension: The F1 algorithm employs sliding local attention to enhance its ability to perceive fine-grained local features and generates the following output:

[0033] Meanwhile, F2 is processed through dilated local attention, which has a larger receptive field, to enhance the perception of large-scale sparse features and generate:

[0034] Finally, by concatenating the above results along the channel dimension, we can obtain multi-scale spatial detail enhancement features: This process can be represented as:

[0035]

[0036]

[0037] Here, ATT_SLA represents sliding local attention, and ATT_DLA represents dilated local attention. Subsequently, based on the obtained multi-scale spatial enhancement features, the feature map is projected into three sequence features A, Δ, and B. These features are selectively scanned using the SSM module to obtain... This captures long-range spatial context information. The result is then dynamically aggregated with attention features X1 and X2, fusing global context features with multi-scale local fine-grained spatial features, and further generating enhanced features. This process achieves dynamic enhancement of global dependencies and spatial consistency. Next, the input features F are multiplied by the learnable sequence weights D to compute a residual term. This residual term serves as an incremental feature, enhancing the model's ability to learn fine-grained details and improve its ability to discriminate large-scale cloud structures, especially in complex thin cloud scenarios. This process can be represented as:

[0038]

[0039] Where SiLU represents the activation function of the Sigmoid Linear Unit.

[0040] Step S3: Input the multi-scale features output from different encoding stages in the encoder into the decoder. The decoder performs multi-granular spatial feature perception and semantic aggregation, and upsamples step by step to restore spatial resolution.

[0041] Specifically, during the resolution restoration process through progressive upsampling, the decoder introduces multi-granularity spatial feature perception and semantic aggregation processing. Multi-scale features from different encoding stages are processed as follows: First, these features are convolved and upsampled for alignment before being merged to obtain spatial context aggregation features. Then, they are spatially downsampled using pixel inverse rearrangement and stride convolution, combined with inversion processing and channel alignment to obtain multiple spatial context features of different granularities. These features are then aggregated and concatenated along the channels. Finally, global pooling information is fused for global context enhancement to obtain semantic aggregation features. This process jointly models shallow, fine-grained spatial information with deep, multi-scale semantic features, enhancing the accurate localization capability of thin cloud boundaries.

[0042] In this embodiment, multi-granularity spatial feature perception and semantic aggregation processing are inserted in the second upsampling stage. The connection method is as follows: the output features of the first encoding stage are aligned with the channels by a 1×1 convolution, and then input together with the multi-scale features output by the third and fourth encoding stages into the processing. The aggregation result is restored to the original image resolution by two upsampling operations.

[0043] As shown in Figure 1, the MSSE module (i.e., the Multi-granularity Spatial Feature Perception and Semantic Aggregation Module) performs deep aggregation of multi-granularity spatial context information and multi-scale semantic features during the decoding stage. First, the multi-scale features from Stage 3 and Stage 4 are processed through 1×1 convolution and upsampling, and then fused with the Stage 3 output after 1×1 convolution to obtain the spatial context aggregation feature F. Next, pixel unshuffle and a 3×3 convolution with a stride of 2 are used to spatially downsample the features from both stages to obtain... Subsequently, the features are processed in reverse order and obtained through 1×1 convolution. This step enhances the ability to perceive multi-scale semantic information while mitigating the loss of fine-grained spatial features. For Further, multi-granularity spatial context features are extracted through two 3×3 convolutions with a stride of 2. Finally, the feature set... By aggregating the features, we obtain the spatial context and semantic fusion features: Subsequently, the ATT-M module is used to introduce global contextual information to further enhance the output features. The result of the 5×5 convolution kernel processed by RepConv is then used as a residual connection and fused with F4 to recover potentially lost details. Finally, F, F4, and the features obtained after global pooling of F are concatenated along the channel dimension to obtain the final enhanced spatial contextual information and multi-scale semantically perceptual features. .

[0044] Finally, by fusing the results of the two upsampling operations with the 1×1 convolutional output features of Stage 1, the final high-precision cloud detection prediction result is reconstructed.

[0045] Step S4: Output a cloud detection prediction mask with the same resolution as the remote sensing image to be detected.

[0046] Specifically, the features restored by the decoder to the original resolution are mapped to pixel-by-pixel class probabilities to obtain a binary prediction mask with the same resolution as the input image. Each pixel in the mask indicates whether the pixel is a cloud.

[0047] Regarding network training, in this embodiment, network training includes: loading pre-trained weights; if no pre-trained weights are available, randomly initializing network parameters from zero; traversing all image patches in the training set for each epoch, calculating the loss through forward propagation and updating parameters through backpropagation; evaluating performance on the validation set every 5 epochs and saving the optimal model; and evaluating the final detection performance on the test set after training. The loss function used for training is cross-entropy loss.

[0048] In the formula, Represents cross-entropy loss; Indicates the number of samples; Indicates the number of categories; Indicates the first The category in the true label of each sample The value of ; Indicates the network prediction of the first Each sample belongs to category The probability. This embodiment uses the Adam optimizer ( The initial learning rate is It is combined with a cosine annealing decay strategy, with a batch size of 8 and a training round number of 50.

[0049] Regarding inference deployment, in this embodiment, the remote sensing image to be detected is cropped into a 512×512 sliding window with a step size of 256 or 512. The window's prediction mask is then input into the trained network to obtain the prediction mask for each window. After stitching and fusion, the cloud detection result of the entire image is output. Overlapping areas are processed using majority voting or probability averaging.

[0050] Performance verification: like Figure 3 As shown in Table 1, the proposed method is compared with representative methods such as CloudNet, CDNetV2, SwinUNet, HRCloudNet, and RD-UNet on two public datasets, AIR-CD and 38-Cloud. The evaluation is based on four metrics: overall accuracy (OA), mean intersection-overall ratio (mIoU), F1-Score, and Kappa coefficient. The model parameter count (Param / M) and computational complexity (FLOPs / G) are also compared.

[0051] Table 1. Quantitative evaluation results of different methods

[0052] As shown in Table 1, the method of this invention achieves the best performance across all four accuracy metrics on both datasets. Simultaneously, its parameter count is only 31.84M, the lowest among the compared methods, and its computational complexity is 63.08 GFLOPs, significantly lower than methods such as RD-UNet. It achieves a good balance between detection accuracy and computational efficiency, making it suitable for deployment on resource-constrained edge computing environments. The accuracy evaluation results on the AIR-CD and 38-Cloud cloud detection datasets are shown in Table 1. The proposed CloudMamba model of this invention achieves the best performance across all four evaluation metrics on images acquired from the Gaofen-2 high-resolution satellite and the Landsat-8 medium-resolution satellite. On the AIR-CD dataset, the OA, mIoU, F1-Score, and Kappa of CloudMamba of this invention reach 95.02%, 83.02%, 90.31%, and 0.8064, respectively. Meanwhile, CDNetV2, SwinUNet, and RS-UNet show relatively balanced performance across the metrics, but their overall results are still lower than those of CloudMamba of this invention. On the 38-Cloud dataset, the CloudMamba model of this invention also achieved state-of-the-art results, with OA, mIoU, F1-Score, and Kappa scores of 91.25%, 81.76%, 89.83%, and 0.7967, respectively. CDNetV2's performance was second only to CloudMamba, with an OA of 90.23% and an mIoU of 79.67%. Further comparison of model size and computational complexity shows that CloudMamba has only 31.84M parameters, the smallest among all compared methods. Furthermore, its computational complexity is 63.08 GFLOPs, second only to SwinUNet and significantly lower than HRCloudNet and RD-UNet. Overall, the CloudMamba model proposed in this invention achieves higher cloud detection accuracy while maintaining low model parameter count and computational complexity. This indicates that the model achieves a good balance between detection performance and computational efficiency, demonstrating good application potential in multi-source remote sensing image cloud detection tasks.

[0053] Visualization of cloud detection results from different models, for example Figure 3As shown, CloudMamba outperforms other methods in overall performance, especially in complex thin cloud scenarios. In the first thin cloud scenario of the AIR-CD dataset, all comparison methods except CloudMamba exhibited significant false negatives. Although the proposed model still has some false negatives in some areas, its detection performance is significantly improved in thin cloud areas with large areas of semi-transparent and complex surface backgrounds, demonstrating a clear advantage in thin cloud recognition. Furthermore, in the first scenario of the 38-Cloud dataset, the western high-reflectivity bare soil area produced varying degrees of false positives in most methods, while CloudMamba and SwinUNet were able to suppress this problem better. The proposed method shows stronger robustness in dealing with surface reflectivity noise. Overall, these results indicate that CloudMamba can achieve more accurate detection in thin cloud scenarios and has strong anti-interference ability against interference from high-reflectivity surfaces.

[0054] To further verify the effectiveness of the two key modules, an ablation experiment was conducted, and the results are shown in Table 2.

[0055] Table 2 Quantitative results of ablation experiments

[0056] As shown in Table 2, after removing the attention-guided state space augmentation module (replacing it with the ResNet backbone), the F1-Score on AIR-CD decreased from 90.31% to 89.12%, and the mIoU decreased by 1.06%. On 38-Cloud, the F1-Score decreased from 89.83% to 88.43%, indicating that the ATT-M module plays a key role in the detection of large-scale complex thin clouds. After removing the multi-granularity spatial feature perception and semantic aggregation module (i.e., the MSSE module), the F1-Score on AIR-CD decreased by 0.73%, and on 38-Cloud, it decreased by 0.56%, indicating that this module makes an important contribution to fine-grained information capture and accurate cloud boundary localization.

[0057] In summary, this invention enhances the long-distance dependency modeling capability of large-scale thin clouds and suppresses high-reflectivity surface interference while maintaining linear computational complexity by using dual-path local attention and state-space model collaborative modeling in the encoding stage and performing multi-granularity spatial feature perception and semantic aggregation in the decoding stage. This solves the problems of existing methods that are difficult to balance between thin cloud detection accuracy and computational efficiency and lack robustness to high-reflectivity surface interference.

[0058] It should be noted that in this application, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0059] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A cloud detection method for remote sensing images based on a state-space model, characterized in that, Includes the following steps: Step S1: Acquire the remote sensing image to be detected; Step S2: Input the remote sensing image to be detected into the encoder. The encoder includes multiple cascaded encoding stages. Each encoding stage sequentially performs embedding processing and attention-guided state space enhancement processing on the input features. The embedding processing is used to reduce spatial resolution and increase the number of channels. The attention-guided state space enhancement processing includes: splitting the input features into two sub-features along the channel dimension; performing local attention enhancement on the two sub-features respectively and concatenating the enhancement results to obtain multi-scale spatial enhancement features; performing global spatial dependency modeling on the multi-scale spatial enhancement features through the state space model to obtain global context features; dynamically aggregating the global context features with the results of the local attention enhancement and performing residual connection with the input features to output the enhanced encoded features. Step S3: Input the multi-scale features output from different coding stages in the encoder into the decoder. The decoder performs multi-granular spatial feature perception and semantic aggregation on the multi-scale features from different coding stages, and upsamples them step by step to restore spatial resolution. Step S4: Output a cloud detection prediction mask with the same resolution as the remote sensing image to be detected. The cloud detection prediction mask indicates whether a cloud is present on a pixel-by-pixel basis.

2. The method according to claim 1, characterized in that, The attention-guided state space enhancement process described in step S2 includes the following sub-steps: Step S201: Divide the input features into a first sub-feature and a second sub-feature along the channel dimension; Step S202: Perform sliding local attention enhancement on the first sub-feature to enhance the perception of fine-grained local features, and perform dilation local attention enhancement on the second sub-feature to enhance the perception of sparse large-scale context features; Step S203: Concatenate the attention enhancement results of the first sub-feature and the second sub-feature along the channel dimension to obtain the multi-scale spatial enhancement feature; Step S204: Project the multi-scale spatial enhancement features into multiple sequence features, and perform selective scanning through a state space model to obtain the global context features that characterize the long-distance spatial context; Step S205: Dynamically aggregate the global context features with the attention enhancement results of the first sub-feature and the second sub-feature, and use the input features as residual terms after being weighted by learnable weights for residual connection, and output the enhanced encoded features.

3. The method according to claim 2, characterized in that, In step S202, the size of the attention window of the sliding local attention is K×K, where K is 5, 7 or 9; the expansion rate of the dilated local attention is d, where d is 2, 3 or 4.

4. The method according to any one of claims 1-3, characterized in that, The state space model described in step S2 uses a bidirectional scanning strategy or a four-directional scanning strategy to model global spatial dependencies.

5. The method according to claim 4, characterized in that, The multi-granularity spatial feature perception and semantic aggregation in step S3 includes: performing spatial downsampling on multi-scale features from different encoding stages through pixel inverse rearrangement and stride convolution, and then performing reverse processing and channel alignment to obtain multiple spatial context features of different granularities; after aggregating and concatenating the multiple spatial context features of different granularities along the channels, fusing global pooling information to perform global context enhancement to obtain semantic aggregated features.

6. The method according to any one of claims 1-3 or 5, characterized in that, The encoder includes a first encoding stage, a second encoding stage, a third encoding stage and a fourth encoding stage cascaded in sequence. The number of channels for the output features of the first to fourth encoding stages are 64, 128, 256 and 512 respectively, and the spatial size of the output features is 1 / 2, 1 / 4, 1 / 8 and 1 / 16 of the remote sensing image to be detected respectively.

7. The method according to claim 6, characterized in that, In step S3, the output features of the first encoding stage are aligned by channels and then input into the decoder along with the multi-scale features output by the third and fourth encoding stages for multi-granularity spatial feature perception and semantic aggregation. The features input into the decoder for multi-granularity spatial feature perception and semantic aggregation are limited to the features from the first, third, and fourth encoding stages. The aggregation result is upsampled twice to restore the resolution of the remote sensing image to be detected.

8. The method according to any one of claims 1-3, 5 or 7, characterized in that, The cloud detection prediction mask is obtained by training a network consisting of the encoder and the decoder. The loss function used in the training is cross-entropy loss, as follows: In the formula, Represents cross-entropy loss; Indicates the number of samples; Indicates the number of categories; Indicates the first The category in the true label of each sample The value of ; The network predicts the first... Each sample belongs to category The probability of.

9. The method according to any one of claims 1-3, 5 or 7, characterized in that, In step S1, the remote sensing image to be detected is cropped into multiple sliding window images with preset sizes and then input into the encoder respectively; in step S4, the cloud detection prediction masks corresponding to each sliding window image are stitched and fused to obtain the cloud detection result of the remote sensing image to be detected, and the overlapping areas in the stitching and fusion are processed by majority voting or probability averaging.

10. A system, characterized in that, The method includes a storage component and a processing unit, wherein the storage component stores machine-executable instructions that can be executed by the processing unit, and the processing unit executes the machine-executable instructions to implement the method according to any one of claims 1-9.