A hyperspectral remote sensing image cloud detection method
By using a Transformer-CNN collaborative dual-branch network architecture, combined with SpecFormer and U-Net networks, the confusion caused by the spectral similarity between thin clouds and the underlying surface in hyperspectral remote sensing images was resolved, achieving high-precision thin cloud detection and improving the model's robustness and feature extraction capabilities.
Patent Information
- Application Number
- CN202511667573.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-14
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-11-14
AI Technical Summary
Existing cloud detection methods have limited accuracy in detecting thin clouds in hyperspectral remote sensing images, making it difficult to effectively distinguish the subtle spectral differences between thin clouds and the underlying surface. Furthermore, existing dimensionality reduction methods weaken the continuous and fine spectral structure unique to hyperspectral imaging, resulting in insufficient detection accuracy.
A Transformer-CNN collaborative dual-branch network architecture is adopted, combining the SpecFormer module and the U-Net network. Through segmented principal component analysis (SS-PCA) dimensionality reduction, the spectral and spatial information features of hyperspectral clouds are collaboratively mined to generate a cloud detection mask with the same resolution as the hyperspectral apparent reflectance slice data.
It significantly improves the accuracy of thin cloud recognition and the robustness of the model in complex scenarios, effectively solves the confusion problem between thin clouds and the underlying surface caused by spectral similarity, and enhances the multi-scale feature extraction capability and boundary accuracy.
Smart Images

Figure CN121121504B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of hyperspectral remote sensing technology, specifically relating to a method for detecting clouds in hyperspectral remote sensing images. Background Technology
[0002] With the rapid development of hyperspectral remote sensing technology, hyperspectral satellites have become a core data source for fields such as environmental monitoring, resource surveys, and smart cities. However, cloud cover severely impacts the quality and application effectiveness of remote sensing imagery. According to the International Satellite Cloud Climatology Project (ISCCP), approximately 65% of the world's land area is covered by clouds annually. Thick clouds completely obscure surface information, while thin clouds cause spectral distortion and blurred spatial textures, seriously affecting the accuracy of quantitative remote sensing applications such as land classification, ocean parameters, aerosol and fine particulate matter inversion. Therefore, high-precision cloud detection is a crucial prerequisite for reliable remote sensing analysis.
[0003] Existing cloud detection methods can be mainly divided into three categories: First, threshold-based methods, such as ACCA and Fmask from the Landsat series satellites, Sen2Cor from Sentinel-2, and CloudMask from Modis, which manually set discrimination rules based on the difference in spectral reflectance between clouds and the underlying surface in specific bands. While simple and efficient, these methods heavily rely on manual thresholds, have poor generalization ability, and suffer from severe false detections, especially in complex scenarios such as thin cloud cover and high-reflectivity surfaces. Second, methods based on traditional machine learning, such as STmask based on Support Vector Machines (SVM) and RFmask based on Random Forests (RF). While these methods reduce reliance on thresholds to some extent, they heavily depend on domain knowledge for manual feature selection, requiring significant computation to achieve a certain level of detection accuracy, and their classification performance significantly degrades in complex scenarios such as cloud and snow confusion. Thirdly, there are deep learning-based methods, such as Landsat's ECDNet and MF-CNN, Modis's GCDB-UNet and LGCNet, Sentinel-2's CD-FM3SF and KappaMask, and the DABNet and GeoInfoNet from the Gaofen series satellites. These methods have the ability to automatically extract spatial and semantic features and are highly adaptable to complex cloud morphologies and scenes. However, they are highly dependent on spatial features for discrimination and do not make sufficient use of the rich spectral information between continuous bands of hyperspectral data. In particular, they are not good at capturing the subtle spectral differences between thin clouds and the underlying surface, resulting in limited accuracy in thin cloud detection.
[0004] Hyperspectral imagery offers the advantage of combining image and spectral data, but its extremely high dimensionality makes direct application of convolutional neural networks prone to the curse of dimensionality, typically requiring dimensionality reduction. Existing dimensionality reduction methods often weaken the unique continuous and fine spectral structure of hyperspectral images, making it difficult to preserve information and compress dimensionality. Therefore, there is an urgent need for a new method that can collaboratively mine the spectral and spatial features of hyperspectral images and optimize for the challenges of thin cloud detection. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a cloud detection method for hyperspectral remote sensing images. By employing Transformer branches and CNN convolutional neural network branches, it achieves collaborative mining of spectral and spatial information features of hyperspectral clouds. Furthermore, by fusing spectral and spatial information features, a cloud detection mask with the same resolution as the hyperspectral apparent reflectance slice data is generated. This method effectively solves the confusion problem caused by spectral similarity between thick clouds, thin clouds, and the underlying surface, significantly improving the recognition accuracy of thin clouds.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A method for cloud detection in hyperspectral remote sensing images, comprising:
[0008] Step 1: Preprocess the hyperspectral L1 level image to obtain apparent reflectance slice data, and then use segmented principal component analysis to reduce the dimensionality to obtain principal component slice data with the same resolution as the apparent reflectance slice data.
[0009] Step 2: Construct a Transformer-CNN collaborative dual-branch cloud detection network. The Transformer branch uses the SpecFormer module to capture the long-range dependencies between continuous bands from the apparent reflectance slice data to obtain the spectral detail differences between the cloud and the underlying surface. The CNN convolutional neural network branch adopts a U-shaped encoder-decoder architecture to extract local details and multi-scale spectral-spatial features of thin clouds from the principal component slice data.
[0010] Step 3: The features obtained from the Transformer branch and the CNN convolutional neural network branch are fused through cross-branch skip connections to generate a cloud detection mask with the same resolution as the apparent reflectance slice data.
[0011] In a second aspect, the present invention provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned hyperspectral remote sensing image cloud detection method.
[0012] Thirdly, the present invention provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enable the processor to implement the aforementioned hyperspectral remote sensing image cloud detection method.
[0013] The beneficial effects of this invention are as follows:
[0014] A Transformer-CNN collaborative dual-branch network architecture is proposed. The Transformer branch captures long-range dependencies between continuous bands of hyperspectral data to obtain fine spectral differences, while the CNN convolutional neural network branch extracts local details and multi-scale spatial features of thin clouds. This design achieves a deep fusion of global spectral perception and local spatial representation, effectively solving the confusion problem caused by the spectral similarity between thin clouds and the underlying surface, and significantly improving the accuracy of thin cloud recognition and the robustness of the model in complex scenarios.
[0015] Innovatively, a Focus structure and a Cross-Stage Residual Network (CSPR) module are introduced into the CNN convolutional neural network branch to enhance multi-scale feature extraction capabilities. Simultaneously, a Channel-Spatial Attention Residual (CAR) module is designed to adaptively optimize feature weights by collaboratively calibrating feature responses in the channel and spatial dimensions. This effectively characterizes the distribution of thin clouds and suppresses background interference, thereby improving the boundary accuracy of thin cloud segmentation.
[0016] To address the challenges of detecting thin clouds and the unique characteristics of hyperspectral data, a segmented principal component analysis (SS-PCA) dimensionality reduction method is proposed. This method divides the spectrum into sub-intervals based on spectral characteristics and reduces the dimensionality of each sub-interval separately. This allows for the selection and retention of key spectral information sensitive to clouds, mitigating the curse of dimensionality while providing more discriminative input to the branches of the CNN convolutional neural network, effectively reducing false detections of bright ground features. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the process of a hyperspectral remote sensing image cloud detection method according to the present invention;
[0018] Figure 2 This is a diagram illustrating the overall framework of the Transformer-CNN collaborative dual-branch cloud detection network structure of this invention.
[0019] Figure 3 The following are eight typical land cover types in the specific implementation method; schematic diagram of the apparent reflectance distribution curves of thick and thin clouds in the GF5-AHSI band above; where (a) is bare soil cover type, (b) is forest cover type, (c) is grassland cover type, (d) is shrub cover type, (e) is snow and ice cover type, (f) is urban cover type, (g) is water body cover type, and (h) is wetland cover type;
[0020] Figure 4 This is a schematic diagram illustrating the effect of segmented principal component analysis dimensionality reduction processing on a GF-5 AHSI image in a specific implementation method.
[0021] Figure 5 This is a schematic diagram of the SpecFormer module architecture in a specific implementation;
[0022] Figure 6 The following are schematic diagrams of all structures used in the coding layer of the CNN convolutional neural network branch structure in a specific implementation: (a) is a schematic diagram of the DCBL block structure; (b) is a schematic diagram of the Focus structure; and (c) is a schematic diagram of the cross-stage residual network structure.
[0023] Figure 7 This is a schematic diagram of the channel-space attention residual module structure in a specific implementation method;
[0024] Figure 8 The following are examples of results for GF5-AHSI cloud detection data in specific implementations, focusing on five land cover types with significant differences in VNIR band and cloud reflectivity: (a) forest cover, (b) farmland / grassland cover, (c) shrub cover, (d) wetland cover, and (e) water cover.
[0025] Figure 9 The following are examples of results for three land cover types with similar reflectivity to clouds in the VNIR band, as shown in the specific implementation. (a) represents bare soil cover, (b) represents urban cover, and (c) represents snow and ice cover. Detailed Implementation
[0026] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0027] Before providing a further detailed description of the present invention, the nouns and terms used in this invention are explained, and the nouns and terms used in this invention shall be interpreted as follows:
[0028] 1) Specformer: A novel graph neural network architecture that combines the advantages of spectral filters and Transformer models. It leverages spectral information to enhance the model's representational and generalization capabilities when processing graph-structured data. Specformer transforms graph data from the spatial domain to the spectral domain by introducing spectral filters, thereby capturing both the global structure and local features of the graph. Furthermore, Specformer employs the self-attention mechanism of the Transformer model, enabling it to adaptively learn complex relationships between nodes.
[0029] 2) The underlying surface is the main type of land cover beneath the cloud layer.
[0030] 3) The Focus structure is an effective feature fusion technique in YOLOv5. It improves the model's ability to detect small objects by slicing the input image, extracting features, and merging them. Specifically, it takes a value on the width and height (W, H) planes for every pixel, generating four complementary feature maps to achieve downsampling while minimizing information loss. Finally, after convolution, a feature map with expanded channel dimensions is obtained, thereby enhancing the model's performance.
[0031] 4) U-Net is a deep learning model based on convolutional neural networks (CNN), mainly used for image segmentation tasks, especially biomedical image segmentation. Its structure consists of two parts: an encoder (downsampling path) and a decoder (upsampling path), and its shape is U-shaped, hence the name U-Net.
[0032] like Figures 1-2 As shown, the hyperspectral remote sensing image cloud detection method of the present invention mainly includes:
[0033] Step 1: Preprocess the hyperspectral L1 level image to obtain apparent reflectance slice data, and then use segmented principal component analysis to reduce the dimensionality to obtain principal component slice data with the same resolution as the apparent reflectance slice data.
[0034] Step 2: Construct a Transformer-CNN collaborative dual-branch cloud detection network. The Transformer branch uses the SpecFormer module to capture the long-range dependencies between continuous bands from the apparent reflectance slice data to obtain the spectral detail differences between the cloud and the underlying surface. The CNN convolutional neural network branch adopts a U-shaped encoder-decoder architecture to extract local details and multi-scale spectral-spatial features of thin clouds from the principal component slice data.
[0035] Step 3: The features obtained from the Transformer branch and the CNN convolutional neural network branch are fused through cross-branch skip connections to generate a cloud detection mask with the same resolution as the apparent reflectance slice data.
[0036] The cloud detection method for hyperspectral remote sensing images based on Transformer-CNN collaborative network based on the present invention is described using hyperspectral images of Gaofen-5 01 satellite (GF-5 01) as an example. The details are as follows:
[0037] Hyperspectral L1 DN values of eight typical land cover types (bare soil, forest, grassland, shrubland, snow and ice, urban areas, water bodies, and wetlands) acquired by the hyperspectral camera (AHSI) of the Gaofen-5 01 satellite were selected. Band selection, radiometric correction, apparent reflectance conversion, and image cropping preprocessing were performed. For the eight preprocessed land cover types and thick and thin clouds in the scenes, the average apparent reflectance (TOA) was calculated band by band, ultimately forming 24 spectral curves, as shown below. Figure 3 As shown, in scenarios other than snow and ice, the TOA reflectance curve of thick clouds differs significantly from that of the underlying surface and is easily distinguishable. However, for thin clouds, in most scenarios (except urban areas), their TOA reflectance curve shape is similar to that of the underlying surface, making them prone to misjudgment.
[0038] To address this, this invention designs a dimensionality reduction scheme using Spectral Segmented Principal Component Analysis (SS-PCA). Hyperspectral apparent reflectance data is divided into N sub-bands based on spectral band characteristics. Principal component analysis is then performed on each sub-band for dimensionality reduction. Cloud-sensitive bands are selected to form N sets of principal components, which serve as inputs to the branches of the CNN convolutional neural network. Based on this method, and combined with cloud spectral feature analysis results, the entire spectral range of GF-5 AHSI is divided into three sub-bands (400-1350nm, 1425-1800nm, 1950-2500nm), and PCA processing is performed on each sub-band separately.
[0039] 1) Extract the first four principal components in the feature-rich visible-near infrared region (400-1350nm) (cumulative contribution rate of the region ≥99.75%).
[0040] 2) Extract the first two principal components in each of the short-wave infrared ranges (1425-1800nm and 1950-2500nm) (the cumulative contribution rate of each range is >99.5%).
[0041] Figure 4 An example of GF-5 AHSI image undergoing SS-PCA dimensionality reduction is shown. Figure 4 As shown, this invention effectively compresses the original 301 bands into 8 principal components while ensuring the integrity of spectral features. Different substances have unique absorption and reflection characteristics in different spectral ranges, and SS-PCA can better preserve these local spectral features and avoid dilution by other bands. Therefore, this method solves the "curse of dimensionality" problem while preserving the key spectral features required for thin cloud detection.
[0042] The architecture of the SpecFormer module in the Transformer branch described in this invention is as follows: Figure 5As shown, hyperspectral apparent reflectance slice data is used as input. Its operating mechanism is as follows: For each pixel in the input image, the normalized wavelength and apparent reflectance value are first combined into ordered "wavelength-reflectance" pairs; then, each ordered pair is embedded into a high-dimensional latent space through a fully connected layer to enhance its feature representation capability; subsequently, an 8-head self-attention mechanism is used to calculate the attention weights of different band pairs in the output, thereby prioritizing the learning of the spectral bands most relevant to the cloud detection task; then, in the spectral feature aggregation module, the self-attention output is passed sequentially through two fully connected layers to further refine key spectral features. Finally, by performing max pooling on the sequence dimension, the maximum value of each dimension is extracted along the feature direction, thereby aggregating the most significant spectral response globally (e.g., abrupt changes in specific absorption bands), ultimately generating a 64-dimensional feature vector T1, which supports subsequent feature fusion with the improved Unet branch and improves the accuracy of thin cloud detection.
[0043] The CNN convolutional neural network branch described in this invention uses the U-Net network as its main framework and takes the principal component slice data I, which has been reduced to dimensionality by SS-PCA, as input. In the encoding module, feature maps of different scales are extracted sequentially through a Focus structure and a downsampling unit composed of a depthwise separable convolution and a cross-stage residual network (CSPR) module. Then, in the decoding module, spatial resolution is gradually restored through upsampling operations, and skip connections are used to concatenate the feature maps of the encoder and decoder at the corresponding scales. After concatenation, a channel-spatial attention residual (CAR) module is used to adaptively calibrate the feature responses in the channel and spatial dimensions. Specifically:
[0044] First, the first feature map is generated in the encoder using a Focus structure. :
[0045] ,
[0046] Here, Focus(⋅) represents the Focus structure. It is 1 / 2 × 1 / 2 the size of the hyperspectral principal component slice data.
[0047] Then, a downsampling unit consisting of a depthwise separable convolution and a cross-stage residual network (CSPR) for feature extraction is used to generate a second feature map. Depthwise separable convolution consists of depthwise convolution and pointwise convolution. That is:
[0048] ,
[0049] ,
[0050] Where CSPR(⋅) represents the feature extraction module, and DCBL(⋅) represents depthwise separable convolution. This indicates a downsampling operation. It is 1 / 4 × 1 / 4 the size of the hyperspectral principal component slice data.
[0051] Then, through successive downsampling units, feature maps S3, S4, ..., Sm-1, m-1 feature maps are generated. m-1 S m m is the feature map number;
[0052] ,
[0053] ,
[0054] ...
[0055] ,
[0056] ,
[0057] Among them, the third feature map S3 is 1 / 8 × 1 / 8 of the size of the hyperspectral principal component slice data, the fourth feature map S4 is 1 / 16 × 1 / 16 of the size of the hyperspectral principal component slice data, ..., the (m-1)th feature map It is 1 / 2 of the hyperspectral principal component slice data. m-1 ×1 / 2 m-1 Size, m-th feature map It is 1 / 2 of the hyperspectral principal component slice data. m ×1 / 2 m size;
[0058] Due to the m-th feature map generated by the encoder The low spatial resolution leads to problems such as information loss, insufficient contextual information, and blurred boundaries. In the decoder section, this embodiment restores the feature map to the same resolution as the input image through progressive upsampling, with the upsampling limited to a factor of 2.
[0059] ,
[0060] in, This represents the bilinear interpolation operation. This indicates an upsampling operation.
[0061] To reduce computational complexity, this implementation uses simple bilinear interpolation to directly interpolate the m-th feature map. After upsampling, compared with the (m-1)th feature map The features are concatenated to generate the first output feature map. , It is 1 / 2 of the hyperspectral principal component slice data. m-2 ×1 / 2m-2 The size is used to generate the second, third, ..., m-2nd, and m-1st output feature maps through successive upsampling units. , ... , m is the feature map number:
[0062] ,
[0063] ,
[0064] ,
[0065] ...
[0066] ,
[0067] ,
[0068] in, This indicates a splicing operation. Represents the channel attention module, the first output feature map It is 1 / 2 of the hyperspectral principal component slice data. m-2 ×1 / 2 m-2 Size, second output feature map It is 1 / 2 of the hyperspectral principal component slice data. m-3 ×1 / 2 m-3 Size, third output feature map It is 1 / 2 of the hyperspectral principal component slice data. m-4 ×1 / 2 m-4 Size, ..., m-2th output feature map It is 1 / 2 × 1 / 2 the size of the hyperspectral principal component slice data, and the output feature map is at the m-1th position. It is the 1×1 size of the hyperspectral principal component slice data.
[0069] The (m-1)th output feature map will be generated subsequently. Feature vectors generated by the Transformer branch The data is stitched together, then subjected to successive depthwise separable convolutions and a final standard convolution operation to generate a cloud detection mask with the same resolution as the hyperspectral apparent reflectance slice data. :
[0070] ,
[0071] in, Same size as the input image.
[0072] It is worth noting that, such as Figure 2 In this embodiment, m=5.
[0073] The CNN convolutional neural network branch described in this invention introduces Focus and Cross-Stage Residual Network (CSPR) modules and uses Depthwise Separable Convolution (DWConv) instead of standard convolution. The kernel size of all convolutional layers is set to 3×3. As shown in Table 1, the CNN convolutional neural network branch is designed with a five-stage hierarchical structure, with the output feature map sizes of each stage being 1 / 2, 1 / 4, 1 / 8, 1 / 16, and 1 / 32 of the input image, respectively. In stage 1, a Focus structure replaces the original conventional convolutional downsampling operation. The structures of the remaining stages are the same, each consisting of one DCBL block and one cross-stage local convolutional block (CSPR). The complete structure used in the encoding layer of the CNN convolutional neural network branch is as follows: Figure 6 As shown, (a) presents a DCBL block (consisting of one depthwise separable convolutional block, one batch normalization, and one LeakyReLU activation function); (b) is a schematic diagram of the Focus structure. When the input image passes through the Focus structure, the image is first sliced, that is, the values of each image channel are taken every pixel, resulting in four feature maps. These feature maps are stacked to reduce the image's width and height information and increase the number of channels, and then subjected to DCBL convolution operation to obtain downsampled feature maps without information loss; (c) shows the structure of the Cross-Stage Residual Network (CSPR). This structure is based on the ResNet residual network and is improved by introducing the Cross-Stage Network CSPNet, so that the depthwise separable convolutional DCBL convolutional layer in the middle of the network can obtain gradient information from multiple branches, thereby effectively enhancing the representation ability and interpretability of features.
[0074] Table 1
[0075]
[0076] The Coordinate Attention Residual Block (CAR) module described in this invention, such as Figure 7 As shown, its structure generates a direction-aware attention map by aggregating features along both horizontal and vertical directions, thereby accurately preserving the spatial distribution of thin clouds (e.g., the edge positions of broken cloud fragments). In the cloud detection method, the CAR module implements the following functions: 1) Enhanced small target detection: accurately capturing the spatial distribution of broken thin clouds through coordinate attention; 2) Suppressing background interference: dynamically weighted channel features effectively distinguish thin clouds from highly reflective surfaces; 3) Optimized gradient propagation: residual design enables the network to be trained stably.
[0077] In this embodiment, 32 GF5-AHSI images were used as validation experimental data for the method of this invention. Eight images were used as test images, and the remaining 24 images were used to train the model, covering eight common scenarios: bare soil, urban areas, wetlands, forests, farmland, water bodies, snow and ice, and shrublands. The selected images are distributed globally, with complex underlying surface types, making the dataset established based on them representative for cloud detection research. This dataset uses Labelme software for fine-grained annotation, with annotation categories including thick clouds, thin clouds, and no clouds, meeting diverse cloud detection needs.
[0078] Furthermore, to comprehensively measure the effectiveness of the cloud detection method described in this invention, five quantitative metrics were used: Precision, Recall, F1-score, Overall Accuracy (OA), and Mean Intersection Over Union (MIoU). Higher values for these five metrics indicate better performance. To provide a more intuitive analysis of thin cloud detection performance, specific recall metrics, Recallthick for thick clouds and Recallthin for thin clouds, were generated based on these metrics.
[0079] Wherein, the precision rate is:
[0080] ,
[0081] The recall rate, thick cloud recall rate, and thin cloud recall rate are:
[0082] ,
[0083] ,
[0084] ,
[0085] The average F1 score of precision and recall:
[0086] ,
[0087] The overall accuracy OA:
[0088] ,
[0089] The average crossover ratio MIoU:
[0090] ,
[0091] in, To correctly identify cloud pixels, , To correctly identify thin cloud pixels, To correctly identify pixels in thick clouds; Unidentified cloud pixels , Unidentified thin cloud pixels, Unidentified thick cloud pixels; For incorrectly identified cloud pixels, TN represents correctly identified non-cloud pixels; k represents the number of categories, i represents the labeled cloud category, and j represents the predicted cloud category. The number of correctly identified cloud categories, The number of misidentifications of the labeled cloud categories This represents the number of misidentifications for the predicted cloud category.
[0092] Table 2 shows the quantitative comparison results of the cloud detection method described in this invention with classical semantic segmentation methods (based on FCN-8 network, DeeplabV3+, and Unet) and state-of-the-art cloud detection methods (based on CDnet and ECDnet) on the GF5-AHSI dataset. The proposed thin cloud detection method outperforms other methods in all metrics except precision, achieving a recall of 91.73%, an F1-score of 92.57%, an overall accuracy (OA) of 94.16%, and a mean intersection-union (MioU) of 90.14%. It leads in all comprehensive metrics for cloud detection, particularly excelling in thin cloud detection (Recallthin) and overall segmentation accuracy (F1-score, OA), with performance improvements of over 5.8% compared to the best performance of the comparative methods. The thin cloud recall (Recallthin = 85.81%) is 6.9% higher than the best performance of the comparative methods (compared to 80.29% for ECDnet). Although the accuracy of the thin cloud detection method described in this invention is lower than that of the CDnet model, its relative error is only 0.6%, which shows performance comparable to that of the CDnet model. This indicates that the thin cloud detection method proposed in this invention has a strong thin cloud detection capability, effectively solves the problem of missed thin cloud detection in cloud detection, and produces more accurate detection results.
[0093] Table 2
[0094]
[0095] To further illustrate the cloud detection performance of this invention on hyperspectral remote sensing imagery, GF5-AHSI cloud detection data were selected for explanation, focusing on land cover types with significant differences in VNIR band reflectance and land cover types with similar VNIR band reflectance curves. For example... Figure 8As shown, in land cover types with significant differences in VNIR band reflectance and cloud reflectance ((a) forest; (b) farmland / grassland; (c) shrubland; (d) wetland; (e) water area), all methods showed only minor errors in cloud detection, meaning all methods could easily distinguish these land cover types from clouds. However, compared to this invention, the ECDnet method contained more false negatives, while Unet contained more false positives. False negatives mainly occurred in thin clouds and fragmented clouds at the edges of thick clouds. The thin cloud detection method described in this invention can capture subtle features of easily confused thin cloud regions, thus obtaining more accurate cloud regions and boundaries, resulting in better cloud detection results. Figure 9 As shown, in land cover types with similar VNIR band reflectance curves to clouds ((a) bare soil; (b) city; (c) snow and ice), most methods struggle to accurately distinguish between bright surface rocks and ice / snow and clouds, misidentifying them as clouds and significantly reducing cloud detection accuracy. However, the method described in this invention performs relatively well in terms of recall and accuracy for thin clouds. Its visual results are most similar to the cloud annotation results, effectively distinguishing cloud pixels from their underlying surfaces. Compared to other methods, the false detection rate and false negative rate are significantly reduced.
[0096] In summary, the thin cloud detection method described in this invention not only performs excellently in thin cloud detection, significantly reducing missed detections and false detections, but also adapts to various underlying surfaces and complex cloud scenarios, providing a reliable solution for high-precision remote sensing cloud detection and playing an important role in promoting quantitative remote sensing applications.
[0097] In a second aspect, the present invention provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned hyperspectral remote sensing image cloud detection method.
[0098] Thirdly, the present invention provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enable the processor to implement the aforementioned hyperspectral remote sensing image cloud detection method.
[0099] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for cloud detection in hyperspectral remote sensing images, characterized in that, include: Step 1: Preprocess the hyperspectral L1 level image to obtain apparent reflectance slice data, and then use segmented principal component analysis to reduce the dimensionality to obtain principal component slice data with the same resolution as the apparent reflectance slice data. Step 2: Construct a Transformer-CNN collaborative dual-branch cloud detection network. The Transformer branch uses the SpecFormer module to capture long-range dependencies between continuous bands from the apparent reflectance slice data to obtain spectral detail differences between clouds and the underlying surface. The CNN convolutional neural network branch uses a U-shaped encoder-decoder architecture to extract local details and multi-scale spectral-spatial features of thin clouds from the principal component slice data. The operation of the CNN convolutional neural network branch includes: using the principal component slice data as input, in the encoding module, feature maps at different scales are extracted sequentially through a Focus structure, a downsampling unit composed of depthwise separable convolutions and a cross-stage residual network module; in the decoding module, spatial resolution is gradually restored through upsampling operations, and skip connections are used to concatenate the feature maps of the encoder and decoder at the corresponding scales. After concatenation, a channel-spatial attention residual module is used to adaptively calibrate the feature responses in the channel and spatial dimensions. The Focus structure generates an initial feature map S1 with increased channel count and halved spatial size by slicing and stacking the input principal component slice data image I. , Where Focus(·) represents the Focus structure, and S1 is 1 / 2 × 1 / 2 of the size of the hyperspectral principal component slice data; Then, a downsampling unit consisting of a depthwise separable convolution and a cross-stage residual network of feature extraction modules is used to generate the second feature map S2. , , Where CSPR(·) represents the feature extraction module, DCBL(·) represents depthwise separable convolution, and F down This indicates a downsampling operation, and the second feature map S2 is 1 / 4 × 1 / 4 the size of the hyperspectral principal component slice data; The third, fourth, ..., m-1, m-1 feature maps S3, S4, ..., S are generated through successive downsampling units. m-1 S m m is the feature map number; , , …… , , Among them, the third feature map S3 is 1 / 8 × 1 / 8 of the size of the hyperspectral principal component slice data, the fourth feature map S4 is 1 / 16 × 1 / 16 of the size of the hyperspectral principal component slice data, ..., the (m-1)th feature map S... m-1 It is 1 / 2 of the hyperspectral principal component slice data. m-1 ×1 / 2 m-1 Size, m-th feature map S m It is 1 / 2 of the hyperspectral principal component slice data. m ×1 / 2 m size; Step 3: The features obtained from the Transformer branch and the CNN convolutional neural network branch are fused through cross-branch skip connections to generate a cloud detection mask with the same resolution as the apparent reflectance slice data.
2. The method for cloud detection in hyperspectral remote sensing images according to claim 1, characterized in that, In step 1, the preprocessing includes band selection, radiometric correction, apparent reflectance conversion, and image cropping.
3. The method for cloud detection in hyperspectral remote sensing images according to claim 1, characterized in that, In step 1, the segmented principal component analysis dimensionality reduction specifically involves: dividing the hyperspectral apparent reflectance data into N band sub-intervals according to spectral band characteristics, performing principal component analysis dimensionality reduction on each sub-interval, filtering out cloud-sensitive band intervals, and forming N sets of principal components, which serve as inputs to the branches of the CNN convolutional neural network.
4. The method for cloud detection in hyperspectral remote sensing images according to claim 1, characterized in that, In step 2, the operation of the SpecFormer module includes: taking the apparent reflectance slice data as input, combining the normalized wavelength and apparent reflectance value into an ordered "wavelength-reflectance" pair, and embedding it into a high-dimensional latent space through a fully connected layer; using a multi-head self-attention mechanism to calculate the attention weights of different band pairs of output, and extracting key spectral features from the self-attention output through the fully connected layer in the spectral feature aggregation module; finally, by performing max pooling on the sequence dimension, aggregating the most significant spectral response globally, and generating a feature vector T1.
5. The method for cloud detection in hyperspectral remote sensing images according to claim 1, characterized in that, The upsampling operation in the decoding module uses bilinear interpolation. , in, This represents the bilinear interpolation operation; This indicates an upsampling operation; the m-th feature map S... m After upsampling, it is compared with the (m-1)th feature map S m-1 Concatenate the features to generate the first output feature map. The second, third, ..., m-2, and m-1th output feature maps are generated through successive upsampling units. , ... , m is the feature map number: , , , …… , , in, This indicates a splicing operation. Represents the channel attention module, the first output feature map It is 1 / 2 of the hyperspectral principal component slice data. m-2 ×1 / 2 m-2 Size, second output feature map It is 1 / 2 of the hyperspectral principal component slice data. m-3 ×1 / 2 m-3 Size, third output feature map It is 1 / 2 of the hyperspectral principal component slice data. m-4 ×1 / 2 m-4 Size, ..., m-2th output feature map It is 1 / 2 × 1 / 2 the size of the hyperspectral principal component slice data, and the output feature map is at the m-1th position. It is the 1×1 size of the hyperspectral principal component slice data.
6. The method for cloud detection in hyperspectral remote sensing images according to claim 5, characterized in that, The feature fusion in step 3 specifically involves: fusing the feature vectors generated by the Transformer branch... The feature map output by the final branch of the CNN convolutional neural network The data is stitched together, then subjected to successive depthwise separable convolutions and a final convolution operation to generate a cloud detection mask with the same resolution as the hyperspectral apparent reflectance slice data. : ; in, DCBL represents the convolution process. This represents depthwise separable convolution. This indicates a splicing operation.
7. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When one or more programs are executed by the one or more processors, the one or more processors implement the hyperspectral remote sensing image cloud detection method according to any one of claims 1-6.
8. A computer-readable storage medium, characterized in that, It stores executable instructions that, when executed by a processor, enable the processor to implement the hyperspectral remote sensing image cloud detection method according to any one of claims 1-6.
Citation Information
Patent Citations
Hyperspectral remote sensing image cloud detection method based on space-spectrum dual-coding U-shaped network
CN120182825A
Transform model for real-time image detection and application thereof
CN120708081A