A cloud mask image generation method and a pre-training network training method
By obtaining the slope of the boundary line and the classification threshold of the spectral feature space from satellite imagery, cloud mask images are generated, and the pre-trained network is fine-tuned. This solves the problem of high cost and low efficiency of manual annotation in satellite imagery cloud detection, and achieves fast and accurate cloud detection.
Patent Information
- Application Number
- CN202210951650.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-09
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-08-09
AI Technical Summary
Existing technologies rely on a large amount of manually labeled data in satellite image cloud inspection, resulting in high labeling costs and low efficiency, making it difficult to meet the needs of real-time and rapid applications.
By acquiring the normalized vegetation index and the pixel value of the visible red band of each pixel in multispectral satellite imagery, mapping them to a preset spectral feature space, obtaining the slope of the boundary line, determining the classification threshold of cloud features, generating a cloud mask image, and fine-tuning the pre-trained network using a small number of manually labeled samples.
It achieves rapid and accurate cloud detection, reduces the workload and time cost of manual annotation, significantly improves work efficiency, and meets the needs of rapid application in emergency situations.
Smart Images

Figure CN115311566B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of remote sensing technology, and in particular to a method for generating cloud mask images, a pre-trained network training method, an apparatus, and electronic equipment. Background Technology
[0002] In recent years, cloud detection in satellite imagery has always been one of the research hotspots in remote sensing mapping. Since clouds can obscure targets on land and sea, making subsequent satellite applications impossible, how to quickly and accurately detect cloud-covered areas is of great significance for remote sensing mapping.
[0003] Currently, with the development of machine learning technology, the research and application of pattern recognition in the field of remote sensing are constantly deepening, and it has been widely used in image cloud detection, becoming the mainstream cloud detection method today. Pattern recognition-based remote sensing image cloud detection methods are mainly divided into artificial neural networks, clustering, SVM, and deep learning methods.
[0004] However, the aforementioned detection algorithms are all highly dependent on data. Labeling a large amount of data is an extremely difficult, time-consuming, costly, and inefficient task. This is especially true for labeling satellite imagery clouds with hundreds of millions of pixels, which consumes significant hardware resources and time, making it difficult to meet the demands of real-time, rapid application. Summary of the Invention
[0005] The purpose of this invention is to provide a cloud mask image generation method, a pre-trained network training method, an apparatus, and an electronic device that can achieve rapid cloud detection, thereby reducing the workload and time cost of manual annotation and significantly improving work efficiency.
[0006] In a first aspect, embodiments of the present invention provide a cloud mask image generation method, the method comprising: acquiring the Normalized Difference Vegetation Index (NDVI) and the pixel value of the visible red band corresponding to each pixel in a multispectral satellite image; mapping each pixel in the multispectral satellite image to a preset spectral feature space according to the NDVI and the pixel value of the visible red band corresponding to each pixel in the multispectral satellite image, thereby obtaining a set of mapping points for two types of samples, wherein the set of mapping points includes mapping points of the NDVI and the visible red band corresponding to each pixel in the multispectral satellite image to the preset spectral feature space respectively; acquiring the slope of the boundary line between the two types of sample mapping points, and determining a classification threshold for cloud features; and labeling the cloud feature information of the multispectral satellite image according to the classification threshold for cloud features, thereby obtaining a cloud mask image.
[0007] In one embodiment, the method further includes: segmenting the multispectral satellite image and the cloud mask image to obtain a first image block of the multispectral satellite image and a second image block of the cloud mask image, wherein the first image block includes multiple image blocks of the same size but different colors and different bands; inputting the first image block and the second image block into a preset pre-trained network for pre-training to obtain pre-trained network parameters for classifying the multispectral satellite image; updating the pre-trained network according to the pre-trained network parameters; and obtaining the cloud mask image through the updated pre-trained network.
[0008] In one embodiment, the pre-trained network includes a shrinking path network module and an expanding path network module corresponding to the shrinking path network. The step of inputting the first image block and the second image block into the preset pre-trained network for pre-training to obtain pre-trained network parameters for classifying multispectral satellite images includes:
[0009] The cloud image features at multiple depths of multispectral satellite imagery are extracted and generated by the shrinking path network module; based on the cloud image features at multiple depths, the cloud attributes of the cloud mask image are retrieved by the expanding path network module, and the pre-trained network parameters after multispectral satellite image classification are obtained.
[0010] In one embodiment, the method further includes:
[0011] The parameter information of the network layer in the pre-trained network is determined to have a greater impact on the classification results of the multiple image blocks of the same size but different colors and different bands than the preset requirements; the parameter information of the network layer is fixed, and the network parameters of other network layers are optimized.
[0012] In one embodiment, before mapping each pixel in the multispectral satellite image to a preset spectral feature space based on the normalized vegetation index and the pixel value in the visible red band corresponding to each pixel in the multispectral satellite image, to obtain the mapping point set of the two types of samples, the method further includes:
[0013] The first and second reflectance values of each pixel in the multispectral satellite image are obtained in the near-infrared band and the red band, respectively.
[0014] Based on the first reflectance value and the second reflectance value, the normalized vegetation index corresponding to each pixel in the multispectral satellite image is calculated.
[0015] In one embodiment, obtaining the slope of the boundary line between the two types of sample mapping points and determining the classification threshold of cloud features includes:
[0016] Multiple boundary lines between two types of samples are obtained in the spectral feature space, and the boundary line with the slope of the principal axis with the largest variance is determined from the multiple boundary lines.
[0017] Obtain a straight line that passes through the means of the two classes of samples in the spectral feature space and is perpendicular to the dividing line;
[0018] The classification threshold of the cloud feature is determined based on the slope of the boundary line with the slope of the principal axis of maximum variance and the intercept of the line on the y-axis.
[0019] Secondly, embodiments of the present invention provide a training method for a cloud mask image pre-trained network, the method comprising:
[0020] Obtain a first sample set of manually annotated cloud mask images and a second sample set of cloud mask images obtained by the method described in the first aspect above;
[0021] The first and second sample sets are used to train and optimize the initial cloud mask image pre-training network at a ratio of 1:4 to obtain the trained cloud mask image pre-training network.
[0022] In one embodiment, after training the initial cloud mask image pre-training network with the first sample set and the second sample set at a 1:4 ratio, the method further includes:
[0023] Based on the training results, the network parameters of the preset number of neural network layers in the initial cloud mask image pre-training network are adjusted to obtain the corrected cloud mask image pre-training network.
[0024] Thirdly, embodiments of the present invention provide a cloud mask image generation apparatus, the apparatus comprising: an acquisition module, a mapping module, a classification threshold determination module, and a generation module electrically connected to each other;
[0025] The acquisition module is used to acquire the Normalized Difference Vegetation Index (NDVI) and the pixel value of the visible red band corresponding to each pixel in the multispectral satellite image.
[0026] The mapping module is used to map each pixel in the multispectral satellite image to a preset spectral feature space based on the normalized vegetation index and the pixel value of the visible red band corresponding to each pixel in the multispectral satellite image, thereby obtaining a mapping point set for two types of samples. The mapping point set includes the mapping points of the normalized vegetation index and the visible red band corresponding to each pixel in the multispectral satellite image mapped to the preset spectral feature space.
[0027] The classification threshold determination module is used to obtain the slope of the boundary line between the two types of sample mapping points and determine the classification threshold of cloud features.
[0028] The generation module is used to label the cloud feature information of the multispectral satellite image according to the classification threshold of the cloud features, and obtain a cloud mask image.
[0029] Fourthly, embodiments of the present invention provide an electronic device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the method described in the first or second aspect.
[0030] Compared with the prior art, this embodiment has the following beneficial effects:
[0031] The cloud mask image generation method provided in this embodiment obtains the Normalized Difference Vegetation Index (NDVI) and the pixel value of the visible red band corresponding to each pixel in a multispectral satellite image. Based on the NDVI and the visible red band pixel value, each pixel in the multispectral satellite image is mapped to a preset spectral feature space, resulting in two sets of mapped points for different types of samples. The slope of the boundary line between the two types of mapped points is obtained to determine the classification threshold of cloud features. Based on the classification threshold, the cloud feature information of the multispectral satellite image is labeled to obtain a cloud mask image. That is, by using the NDVI and the visible red band pixel value corresponding to each pixel in the multispectral satellite image, the cloud mask image is generated. The pixel values of the visible red band are used to map each pixel in the multispectral satellite image to a preset spectral feature space, resulting in a set of mapping points for two types of samples. The slope of the boundary line between the two types of sample mapping points is obtained, and the classification threshold of cloud features is determined. This can quickly generate weakly supervised samples that are not very accurate. The parameters of the pre-trained network formed by these weakly supervised samples are then fine-tuned using a small number of manually labeled samples. Ultimately, the cloud detection results can reach the detection accuracy range of using fully manually labeled samples, thereby reducing the workload of manual labeling and event costs, significantly improving work efficiency, and overcoming the shortcomings of deep learning models that require large amounts of data for training and learning, resulting in low efficiency and difficulty in meeting the rapid application needs in emergency situations. Attached Figure Description
[0032] Figure 1 This diagram illustrates the flow chart of the cloud mask image generation method provided in an embodiment of the present invention. Figure 1 ;
[0033] Figure 2 This diagram illustrates the flow chart of the cloud mask image generation method provided in an embodiment of the present invention. Figure 2 ;
[0034] Figure 3 This diagram illustrates the calculation of the b-value in the cloud mask image generation method provided in an embodiment of the present invention.
[0035] Figure 4 This illustration shows a cloud mask image pre-training network provided in an embodiment of the present invention. Figure 1 ;
[0036] Figure 5 A schematic diagram of the network structure of the cloud mask image generation method provided in an embodiment of the present invention is shown;
[0037] Figure 6 A schematic diagram of the structure of the cloud mask image generation device provided in an embodiment of the present invention is shown;
[0038] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present invention is shown. Detailed Implementation
[0039] The method for generating cloud mask images and the training method for the cloud mask image pre-training network of the present invention will be described in more detail below with reference to the schematic diagrams. It should be understood that those skilled in the art can modify the present invention described herein while still achieving the advantageous effects of the present invention. Therefore, the following description should be understood as being of general knowledge to those skilled in the art and is not intended to limit the present invention.
[0040] The invention is described more specifically by way of example in the following paragraphs with reference to the accompanying drawings. The advantages and features of the invention will become clearer from the following description and claims. It should be noted that the drawings are in a very simplified form and use non-precise proportions, and are only used to facilitate and clarify the illustration of the embodiments of the invention.
[0041] Currently, accurately and quickly identifying cloud cover areas is a crucial step in satellite imagery applications. Clouds obscure targets on land and sea, making subsequent satellite applications impossible. For satellite mapping applications, a direct consequence is that excessively large cloud cover areas at the image processing stage prevent subsequent adjustment and mapping. Furthermore, in actual mapping practice, reporting and statistically analyzing unmeasurable areas within the survey area is extremely difficult. Therefore, cloud detection in satellite imagery has always been a research hotspot in remote sensing mapping, and how to quickly and accurately detect cloud cover areas is of great significance for remote sensing mapping.
[0042] With the development of machine learning technology, the research and application of pattern recognition in the field of remote sensing have been continuously deepening, and it has been widely used in image cloud detection, becoming the mainstream cloud detection method today. Pattern recognition-based remote sensing image cloud detection methods are mainly divided into artificial neural networks, clustering, SVM, and deep learning methods. Deep learning networks, represented by CNNs, have been widely used in remote sensing image cloud detection and have achieved good results. Compared with machine learning methods, deep learning has the advantages of more neural network layers, a larger receptive field, the ability to learn more image features from images, and more abstract features. It can handle massive amounts of sample data and improve the training efficiency of the network through weight sharing and local connections, thereby achieving accurate cloud detection. Numerous research results show that deep learning-based cloud detection methods generally outperform traditional methods. These methods are generally data-driven. First, a large amount of data is obtained, which is divided into training, validation, and test sets. Then, a large number of real labeled data samples are manually created and input into a certain neural network structure to train a classifier using gradient descent. Finally, the performance is tested on the test set and applied in practice. For example, Zhang Yonghong et al. proposed an improved U-Net network model that combines the encoder and residual module of the U-Net model and integrates the dense connection module into the decoder, thereby improving feature utilization and optimizing cloud detection performance.
[0043] Deep learning methods are highly data-dependent; the more data, the better the classifier. However, labeling large amounts of data is an extremely difficult, time-consuming, costly, and inefficient task, especially for creating cloud labels for satellite imagery. This is because deep learning-based cloud detection is performed end-to-end at the pixel level, resulting in a massive amount of labeling work. For example, labeling a 12000*12000 pixel image (with hundreds of millions of pixels) with moderate cloud cover can take 4 to 5 days. Therefore, traditional deep learning methods are inefficient and have limitations for emergency applications of satellite imagery, especially when there is no prior annotation training to develop a classifier for new satellite imagery. Furthermore, training with a large number of cloud label samples is extremely resource-intensive and time-consuming, making it difficult to meet the demands of real-time, rapid deployment.
[0044] This application provides a method for generating cloud mask images, which can quickly label and learn from a large number of cloud label samples, thereby enabling rapid and accurate detection of cloud cover areas in satellite images.
[0045] Example 1
[0046] like Figures 1-2 As shown, this embodiment of the invention provides a cloud mask image generation method, which includes:
[0047] Step S101: Obtain the Normalized Difference Vegetation Index (NDVI) and the pixel value of the visible red band corresponding to each pixel in the multispectral satellite image.
[0048] Step S102: Based on the normalized vegetation index and the pixel value of the visible red band corresponding to each pixel in the multispectral satellite image, map each pixel in the multispectral satellite image to a preset spectral feature space to obtain the mapping point set of the two types of samples.
[0049] The mapping point set includes the mapping points of each pixel in the multispectral satellite image, which are mapped to the preset spectral feature space, respectively, based on the normalized vegetation index and the visible red band.
[0050] Step S103: Obtain the slope of the boundary line between the two types of sample mapping points and determine the classification threshold of cloud features;
[0051] Step S104: Based on the classification threshold of cloud features, label the cloud feature information of the multispectral satellite image to obtain a cloud mask image.
[0052] Specifically, multispectral satellite imagery refers to the acquisition of multiple single-band radiation from ground objects, resulting in satellite image data containing spectral information across multiple bands. The international consensus in remote sensing is that spectral resolution in the order of λ / 10 to λ / 10λ / 10 is considered multispectral. Such remote sensors have only a few bands in the visible and near-infrared spectral regions, such as the US Landsat MSS and TM, and the French SPOT. If information from the RGB bands is extracted and displayed, it becomes an RGB color image. Since spectral information essentially corresponds to color information, multispectral remote sensing images can obtain color information of ground objects, but the spatial resolution is relatively low. Furthermore, the more spectral channels there are, the stronger the ability to distinguish objects, i.e., the higher the spectral resolution.
[0053] To address the shortcomings of traditional deep learning methods in cloud detection using satellite imagery, such as low efficiency and high hardware resource consumption, this application proposes a method using multispectral satellite imagery. This method maps each pixel in the multispectral satellite imagery to a preset spectral feature space based on the normalized vegetation index (NDI) and the pixel value in the visible red band. This results in two sets of mapped points for different classes of samples. The slope of the boundary line between these two classes is then obtained to determine the classification threshold for cloud features. This embodiment uses the visible red band as an example, but near-infrared and red bands, near-infrared and green bands, or near-infrared and blue bands can also be used for cloud detection algorithms. The threshold classification model can be, for example, a thresholding method, a method based on texture and spatial features, or a pattern recognition method. The thresholding method utilizes the physical properties of an image, such as radiation and spectrum, and detects individual pixels based on certain rules. The fixed threshold method is the most common and basic cloud detection method. It uses the difference in radiation spectrum between the cloud layer and the underlying surface to extract the cloud layer using a fixed boundary point. NDVI and D-threshold methods are representative typical methods.
[0054] Cloud detection methods based on cloud texture and spatial characteristics are essentially thresholding methods. However, unlike physical thresholding methods that rely on the radiometric and spectral information of images, these methods rely on the texture and spatial information of cloud images. A typical algorithm utilizes fractal dimension and the second moment of the co-occurrence matrix to detect clouds in images. For example, Cao et al. used two types of textures—fractal and gray-level co-occurrence matrix—to simplify the multidimensional space into a minimum two-dimensional classification space, designing a linear classifier to effectively distinguish between cloud and non-cloud underlying surfaces, achieving efficient and automatic cloud detection.
[0055] Based on the Normalized Difference Vegetation Index (NDV) and the pixel value of the visible red band for each pixel in a multispectral satellite image, each pixel in the multispectral satellite image is mapped to a preset spectral feature space, resulting in mapping point sets for two classes of samples. The slope of the boundary line between the two classes of sample mapping points is obtained to determine the classification threshold of cloud features, which can quickly acquire cloud feature information from multispectral satellite images as weakly supervised samples. These weakly supervised samples are then input into a pre-trained network for cloud feature extraction for pre-training, resulting in a classified cloud mask image. This pre-trained network can be a classification network consisting of a contraction path and a corresponding expansion path, such as a U-Net network, or a Cloud-Net network based on the U-Net concept, etc., to obtain an initial classifier. Next, this classifier is fine-tuned using a few labeled artificial samples, and the pre-trained network is optimized. For example, the network training process can be further accelerated by fixing the first 195 layers of the initial classifier and training only the last 5 layers of the neural network, or by adjusting other network parameters. Finally, the trained classifier is used to detect satellite images to obtain actual results.
[0056] Specifically, before mapping each pixel in the multispectral satellite image to a preset spectral feature space based on the normalized vegetation index and the pixel value in the visible red band of each pixel, the method further includes:
[0057] The first and second reflectance values of each pixel in the multispectral satellite image are obtained in the near-infrared band and the red band, respectively.
[0058] Based on the first reflectance value and the second reflectance value, the normalized vegetation index corresponding to each pixel in the multispectral satellite image is calculated.
[0059] Specifically, pixel values and reflectance values based on preset color light bands in multispectral satellite imagery can be obtained through the Normalized Difference Vegetation Index (NDVI). This can be calculated using NDVI = (NIR - R) / (NIR + R), or by calculating the reflectance of the two bands. Here, NIR is the reflectance value of the near-infrared band, and R is the reflectance value of the red band. Generally speaking, the Normalized Difference Vegetation Index is one of the important parameters reflecting crop growth and nutritional information.
[0060] Step S103 above obtains the slope of the boundary line between the two types of sample mapping points and determines the classification threshold of cloud features, including:
[0061] Obtain multiple boundary lines between two classes of samples in the spectral feature space, and determine the boundary line with the slope of the principal axis with the largest variance from the multiple boundary lines;
[0062] Obtain a straight line that passes through the means of two classes of samples in the spectral feature space and is perpendicular to the dividing line;
[0063] The classification threshold for cloud features is determined based on the slope of the boundary line with the slope of the principal axis of maximum variance and the intercept of the line on the y-axis.
[0064] Specifically, this embodiment can use pixel values and reflectance values based on preset color light bands in multispectral satellite imagery to calculate the absolute value of the preset color light band index data, thereby distinguishing between two types of samples: one type is multispectral satellite imagery with cloud-covered pixels, and the other type is multispectral satellite imagery with cloudless or few-cloud-covered pixels. For example... Figure 3 As shown, Figure 3 The squares and crosses in the diagram correspond to two different types of samples. The solid line passes through the average of the two types of samples, while the dashed line is perpendicular to the solid line. The dashed line is the boundary between the two types of samples, and its slope is the b-value.
[0065] By using least squares linear fitting, the slope of the optimal boundary line for the mapping point set of multispectral satellite imagery and the classification threshold of the multispectral satellite imagery are obtained. Specifically, 'b' can be set as the slope with the principal axis of maximum variance, which can be obtained by the slope of the boundary line between two classes of samples in the spectral feature space. Based on the classification threshold, cloud-covered satellite images in the multispectral satellite imagery are classified to obtain the cloud mask image. That is, by using cloudless or partially clouded pixels from multiple temporal images of the same region, and using the above method to obtain the 'b' value and the 'D' threshold, cloud-covered pixels in cloud-covered images can be detected. The slope of the boundary line is the desired 'b' value, and the y-intercept of the line is the classification threshold 'D', thus yielding the multispectral satellite imagery's classification threshold 'D'. By using cloudless or partially clouded pixels from multiple temporal images of the same region, and using the above method to obtain the 'b' value and the 'D' threshold, cloud-covered pixels in cloud-covered images can be detected.
[0066] If a pixel t in a cloud image is less than the D threshold corresponding to the b value, then pixel t is considered a cloud pixel; otherwise, pixel t is considered a non-cloud pixel.
[0067] The cloud mask image generation method provided in this embodiment obtains the Normalized Difference Vegetation Index (NDVI) and the pixel value of the visible red band corresponding to each pixel in a multispectral satellite image. Based on the NDVI and the visible red band pixel value, each pixel in the multispectral satellite image is mapped to a preset spectral feature space to obtain mapping point sets for two types of samples. The slope of the boundary line between the two types of sample mapping points is obtained to determine the classification threshold of cloud features. Based on the classification threshold of cloud features, the cloud feature information of the multispectral satellite image is labeled to obtain a cloud mask image. This method involves mapping each pixel in a multispectral satellite image to a preset spectral feature space to determine the classification threshold for cloud features. This allows for the labeling of cloud feature information in the multispectral satellite image, generating weakly supervised samples. These weakly supervised samples are then fine-tuned using a pre-trained network with a small number of manually labeled samples. Ultimately, the cloud detection results can reach the detection accuracy range of using fully manually labeled samples, thereby reducing the workload and event costs of manual labeling, significantly improving work efficiency, and overcoming the limitations of deep learning models which require large amounts of data for training, have low efficiency, and are difficult to meet the rapid application needs in emergency situations.
[0068] Optionally, the above-mentioned method for generating cloud mask images further includes:
[0069] Multispectral satellite imagery and cloud mask imagery are segmented to obtain a first image block of multispectral satellite imagery and a second image block of cloud mask imagery, respectively. The first image block includes multiple image blocks of the same size but different colors and different bands.
[0070] The first and second image blocks are input into a preset pre-trained network for pre-training to obtain pre-trained network parameters for classifying multispectral satellite images. The pre-trained network is updated according to the pre-trained network parameters, and cloud mask images are obtained through the updated pre-trained network.
[0071] Optionally, the multispectral satellite image and the cloud mask image are segmented to obtain a first image block of the multispectral satellite image and a second image block of the cloud mask image, respectively, and to obtain a multi-scene D-threshold weak supervision sample image block and a multispectral image block of different colors and different bands.
[0072] Multiple D-threshold weakly supervised image blocks and multispectral image blocks of different colors and bands are input into a pre-trained network. High-level semantic context information is obtained from the low-level features of the multiple D-threshold weakly supervised image blocks and multispectral image blocks of different colors and bands through the shrinking path network module. Cloud attributes are retrieved from the cloud features of the multiple D-threshold weakly supervised image blocks and multispectral image blocks of different colors and bands through the expanding path network module corresponding to the shrinking path network module. The classified cloud mask image is then output.
[0073] Specifically, the multispectral satellite image and the cloud mask image are segmented to obtain a first image block of the multispectral satellite image and a second image block of the cloud mask image. For example, the cloud mask image and the multispectral satellite image can be segmented to a size of 512 or 384 pixels. The first image block is a multispectral image block of different colors and different bands, and the second image block is a multi-scene D-threshold weak supervision sample image block. For example, the multispectral image block of different colors and different bands can be a four-band multispectral image of red, green, blue and near-infrared. The specific colors and number can be set according to the actual situation.
[0074] Multiple D-threshold weakly supervised image blocks and red, green, blue, and near-infrared four-band multispectral image blocks are input into a pre-trained network. This pre-trained network can consist of a contraction path and a corresponding expansion path. Multiple convolutional blocks in the contraction path network module extract high-level semantic context information from the low-level features of the multiple D-threshold weakly supervised image blocks and the multispectral image blocks of different colors and bands, responsible for extracting and generating deep low-level features of the input image. The expansion path network corresponding to the contraction path module obtains cloud features from the multiple D-threshold weakly supervised image blocks and the multispectral image blocks of different colors and bands to retrieve cloud attributes, recover the image feature map, and output the classified cloud mask image, thus obtaining the pre-trained network parameters after multispectral satellite image classification.
[0075] Optionally, the pre-trained network includes a shrinking path network module and an extended path network module corresponding to the shrinking path network module. The first image block and the second image block are input into the preset pre-trained network for pre-training to obtain pre-trained network parameters for classifying multispectral satellite images, including:
[0076] The cloud image features at multiple different depths of the multispectral satellite image are extracted and generated by the shrinking path network module.
[0077] Based on cloud image features at multiple depths, cloud attributes of cloud mask images are retrieved through an extended path network module, resulting in hyperparameters for the pre-trained network after multispectral satellite image classification.
[0078] Specifically, multiple convolutional blocks in the contraction and expansion paths can extract high-level semantic context information from low-level features of the input image. For example... Figure 5 As shown, Figure 5 The top row of bars and blocks forms a contraction path, consisting of 6 contraction blocks, responsible for extracting and generating deep low-level features from the input image. The bottom row of bars and blocks forms an expansion path, containing 5 expansion blocks, responsible for using the features obtained from the contraction blocks to retrieve cloud attributes, recover the image feature map, and finally generate the output cloud mask image.
[0079] Figure 5 In the diagram, Conv, ConvT, Concat, Addition, Copy, and Maxpool refer to convolution, convolution transpose, concatenation, addition, copy, and maxpooling, respectively. The n×n number following them indicates the kernel size. Skip Connection is a shortcut connection. The gray vertical bar on the far right represents the feature map, and the numbers at the top and bottom of the bar are the corresponding depths of each feature map.
[0080] In CNNs, the size of the convolutional kernel and the order of different layers play a crucial role in the quality of activated features, directly affecting the model's image segmentation performance. Figure 5 The pre-trained network in the model improves the internal convolutional blocks, with each block containing operations such as convolution, connection, and pooling, and incorporates the idea of residual networks to enhance the model's sensitivity to cloud features.
[0081] Optionally, the above methods also include:
[0082] It was determined that the classification results of multiple image patches of the same size but different colors and different bands in the pre-trained network have a greater impact than the parameter information of the network layers required by the preset requirements.
[0083] Fix the parameter information of the network layer and optimize the network parameters of other network layers.
[0084] Specifically, coarse-tuned samples are obtained using the inexpensive and efficient D-thresholding method, quickly yielding automatically labeled samples. A small number of manually labeled samples are then used to fine-tune the coarse-tuned samples, thereby rapidly correcting the classifier. This allows for quick detection results while maintaining similar detection accuracy, improving the practical application of cloud detection. The theoretical basis for fixing the training coefficients of the first 195 layers of the coarse classifier is that high-level features have a significant impact on classification results in deep learning.
[0085] This application also provides a training method for a cloud mask image pre-trained network, the method comprising:
[0086] Obtain a first sample set of pre-defined manually labeled cloud mask images and a second sample set of cloud mask images generated by the cloud mask image generation method described above;
[0087] The initial cloud mask image pre-training network was trained using the first and second sample sets at a ratio of 1:4, resulting in the trained cloud mask image pre-training network.
[0088] The training method for the cloud mask image pre-training network, which involves training the first and second sample sets at a 1:4 ratio, further includes:
[0089] The network parameters of the preset number of neural network layers in the initial cloud mask image pre-training network are adjusted based on the training results to obtain the corrected cloud mask image pre-training network.
[0090] Specifically, fine-tuning is performed using a small number of labeled manual samples. The optimal ratio of coarse-tuned samples to fine-tuned samples is 4:1. At the same time, the network training process is further accelerated by using cloud mask images to pre-train the network, training only the parameters of the last 5 neural network layers in the first 195 layers, resulting in a finely tuned corrected classifier.
[0091] In this embodiment, the coarse-tuned samples of the second sample set are obtained through the inexpensive and efficient D-threshold method, quickly yielding automatically labeled samples. Fine-tuning is then performed using a small number of manually labeled samples from the first sample set, thereby quickly obtaining a corrected classifier. This allows for rapid acquisition of detection results while maintaining similar detection accuracy, improving the practical application requirements of cloud detection. The theoretical basis for fixing the training coefficients of the first 195 layers of the coarse classifier is that high-level features have a significant impact on classification results in deep learning.
[0092] In terms of datasets, deep learning models are extremely reliant on large-scale training data because they require a large amount of data to learn and understand potential data patterns and features. The amount of data required is almost linearly related to the model size. The cloud mask image pre-training network mentioned above can use Cloud-Net as a deep learning model with multiple layers to build a semantic segmentation model for satellite image cloud detection, which requires a large amount of training data. Obtaining large-scale ground-truth samples through manual annotation is difficult. This embodiment uses the D-thresholding method based on the NDVI index to generate less accurate weakly supervised samples for cloud detection. This method is simple, low-cost, and quick to produce, and the constructed sample set can serve as a large dataset for the pre-training stage. In the fine-tuning stage, the training set is fine-tuned by manually annotating a small number of cloud image samples. The final cloud detection performance is very close to that of the conventional Cloud-Net model using fully manually annotated data, meeting the standards and requirements of general surveying and mapping engineering practices. While ensuring accuracy, this significantly reduces the workload and time cost of manual annotation, significantly improves work efficiency, and overcomes the shortcomings of deep learning models, which require large amounts of data for training, have low efficiency, and are difficult to meet the rapid application needs in emergency situations.
[0093] This application provides a method for generating cloud mask images, such as... Figure 3-5 As shown below, the cloud detection method based on NDVI improvement—the D-threshold method—will be described in detail:
[0094] 1. An improved cloud detection method based on NDVI—the D-threshold method for rapid acquisition of cloud masks.
[0095] A cloud detection method based on NDVI, proposed by Di Girolamo and Davies—the D-thresholding method—is used to quickly acquire inaccurate cloud mask images. This method defines a threshold D:
[0096]
[0097] Where and are the reflectance values of the near-infrared and red bands of the image, respectively. b is the slope with the principal axis of maximum variance, which can be obtained from the slope of the boundary line between the two classes of samples in the spectral feature space, such as... Figure 3 As shown in the diagram, the squares and crosses correspond to two different types of samples. The solid line passes through the average of the two types of samples, and the dashed line is perpendicular to the solid line. The dashed line is the boundary between the two types of samples, and its slope is the b-value. The specific method is as follows:
[0098] Taking the natural logarithm of both sides of equation (2), we get:
[0099] 2log(β R Formula (3) = b·log(|NDVI|) - log(D)
[0100] For each pixel in the image, calculate the absolute value of its NDVI value and take the pixel value in the visible red band. Using least-squares linear fitting, an optimal boundary line for the mapping point set of the image can be obtained. The slope of this boundary line is the desired value b, and the intercept of this line on the y-axis is the threshold D of the image.
[0101] By using cloudless or sparsely clouded pixels from multiple temporal images of the same area, and obtaining the b-value and D-threshold using the method described above, clouded pixels can be detected in clouded images.
[0102] If a pixel in a cloud image is t, its visible light red band pixel value is, and its NDVI response value is, when...
[0103]
[0104] If the condition is met, then pixel t is considered a cloud; otherwise, pixel t is considered a non-cloud.
[0105] 2. Data partitioning: The mask image and the 4-band multispectral image obtained in step 1 are divided into 384*384 image blocks. Then, the multi-scene D-threshold weakly supervised sample image blocks and the red, green, blue, and near-infrared 4-band multispectral images are input into the Cloud-Net network based on the U-Net concept for pre-training to obtain the initial classifier. The Cloud-Net network structure is as follows: Figure 5 As shown.
[0106] Like the basic U-Net, Cloud-Net consists of a contraction path and a corresponding expansion path. Multiple convolutional blocks in the contraction and expansion paths are able to extract high-level semantic context information from low-level features of the input image. Figure 5 The bars and blocks in the top row form the contraction path, which includes 6 contraction blocks and is responsible for extracting and generating deep low-level features of the input image. The bars and blocks in the bottom row form the expansion path, which contains 5 expansion blocks and is responsible for retrieving cloud attributes using the features obtained from the contraction blocks, restoring the image feature map, and finally generating the output cloud mask image.
[0107] Figure 5 In the diagram, Conv, ConvT, Concat, Addition, Copy, and Maxpool refer to convolution, convolution transpose, concatenation, addition, copy, and maxpooling, respectively. The n×n number following them indicates the kernel size. Skip Connection is a shortcut connection. The gray vertical bar on the far right represents the feature map, and the numbers at the top and bottom of the bar are the corresponding depths of each feature map.
[0108] In CNNs, the size of the convolutional kernels and the order of different layers play a crucial role in the quality of activated features, directly affecting the model's image segmentation performance. Cloud-Net improves upon the traditional U-Net by adding internal convolutional blocks, with each block containing operations such as convolution, connection, and pooling, and incorporating the concept of residual networks to enhance the model's sensitivity to cloud features.
[0109] 3. Based on the classifier obtained in step 2, fine-tuning is performed using a small number of labeled manual samples. The optimal ratio of coarse-tuned samples to fine-tuned samples is 4:1. At the same time, the network training process is further accelerated by fixing the first 195 layers of the initial classifier of the Cloud-Net network in step 2 and training only the parameters of the last 5 neural network layers, thus obtaining the fine-tuned corrected classifier.
[0110] Coarse-tuned samples are obtained using the inexpensive and efficient D-thresholding method, quickly yielding automatically labeled samples. A small number of manually labeled samples are then used to fine-tune the coarse-tuned samples, rapidly refining the classifier. This allows for quick detection results while maintaining similar accuracy, improving the practical application of cloud-based detection. The theoretical basis for fixing the training coefficients of the first 195 layers of the coarse classifier is that high-level features have a significant impact on classification results in deep learning.
[0111] 4. The corrected classifier obtained in step 3 is used to perform cloud detection on the cloud image to be detected, and the final cloud detection result is obtained.
[0112] In terms of datasets, deep learning models are extremely reliant on large-scale training data because they require a large amount of data to learn and understand potential data patterns and features. The amount of data required is almost linearly related to the model size. Cloud-Net, as a deep learning model with multi-layer networks, requires a large amount of training data to support the construction of a semantic segmentation model for cloud detection in satellite imagery. Obtaining large-scale ground-truth samples through manual annotation is difficult. This patent's D-thresholding method based on the NDVI index generates weakly supervised samples for cloud detection, which is simple, inexpensive, and quick to produce. The constructed sample set can serve as a large dataset for the pre-training stage. In the fine-tuning stage, the training set is fine-tuned by manually annotating a small number of cloud image samples. The final cloud detection performance is very close to that of a conventional Cloud-Net model using fully manually annotated data, meeting the standards and requirements of general surveying and mapping engineering practices. While ensuring accuracy, it significantly reduces the workload and time cost of manual annotation, significantly improves work efficiency, and overcomes the limitations of deep learning models, which require large amounts of data for training and are less efficient, making them unsuitable for rapid application in emergency situations.
[0113] The above method was tested on a domestically produced satellite, including 24 pre-training samples, 6 manually labeled samples, and 10 test samples, which achieved good results.
[0114] The accuracy results are shown in Table 1. The method of this embodiment, the conventional Cloud-Net model, the NDVI detection method and the D thresholding method are evaluated from four dimensions: Precision, Recall, OA and F1 score.
[0115] Table 1 Quantitative Evaluation of Cloud Detection Results
[0116]
[0117] The results are shown in Table 1. The cloud detection precision of this patented method reached 88.98%, and the overall accuracy reached 96.00%, which is very close to the detection results of the conventional Cloud-Net model (slightly lower by 0.71% and 0.49%, respectively). The recall rate was 84.53%, and the F1 score was 86.70%, which was only slightly lower than the conventional Cloud-Net model (reduced by 3.26% and 1.82%, respectively). Compared with the detection accuracy of the NDVI detection method and the D-threshold method, it is superior in all accuracy indicators except for the precision of the D-threshold method.
[0118] The results of work efficiency are shown in Tables 2, 3, and 4:
[0119] Table 2 Statistics of Labeling Workload
[0120]
[0121] Table 3 Training Time Statistics
[0122]
[0123] Table 4 Overall Comparison
[0124]
[0125] As shown in Tables 2, 3, and 4, the method in this embodiment uses 24 weakly supervised sample data scenes and 6 manually labeled data scenes for cloud detection of 10 test images, with a workload of 25.7 man-days and a time consumption of 433 hours. The conventional Cloud-Net cloud detection model uses 24 manually labeled data scenes for cloud detection of the same 10 test images, with a workload of 96.7 man-days and a time consumption of 969 hours. Compared with the conventional Cloud-Net cloud detection model, the method in this embodiment reduces the workload by 73.4% and the time consumption by 55.3%.
[0126] In summary, although the method in this embodiment uses only a small number of manually labeled samples, its detection accuracy is very close to that of the conventional Cloud-Net model, which uses all manually labeled samples, meeting general engineering practice standards and requirements. Its greatest significance lies in significantly reducing the workload and time cost of manual labeling while maintaining accuracy, thus significantly improving work efficiency. This provides an effective path for reducing the cost of cloud image detection and improving work efficiency, aligning with rapid engineering applications.
[0127] The cloud mask image generation method provided in this embodiment obtains the Normalized Difference Vegetation Index (NDVI) and the pixel value of the visible red band corresponding to each pixel in a multispectral satellite image. Based on the NDVI and the pixel value of the visible red band corresponding to each pixel in the multispectral satellite image, each pixel in the multispectral satellite image is mapped to a preset spectral feature space to obtain mapping point sets for two types of samples. The slope of the boundary line between the mapping points of the two types of samples is obtained to determine the classification threshold of cloud features. Based on the classification threshold of cloud features, the cloud feature information of the multispectral satellite image is labeled to obtain a cloud mask image. That is, by using the NDVI and the visible red band pixel value corresponding to each pixel in the multispectral satellite image, the cloud mask image is obtained. The pixel values of the number and visible red band of the cloud feature are used to map each pixel in the multispectral satellite image to a preset spectral feature space, resulting in a set of mapping points for two types of samples. The slope of the boundary line between the two types of sample mapping points is obtained, and the classification threshold of cloud features is determined. This can generate weakly supervised samples that are not very accurate. These weakly supervised samples are then fine-tuned by a pre-trained network using a small number of manually labeled samples. Ultimately, the cloud detection results can reach the detection accuracy range of using fully manually labeled samples, thereby reducing the workload and event costs of manual labeling, significantly improving work efficiency, and overcoming the shortcomings of deep learning models that require large amounts of data for training and learning, resulting in low efficiency and difficulty in meeting the rapid application needs in emergency situations.
[0128] It should be understood that the embodiments described above are merely illustrative, and the circuits and methods disclosed in the embodiments of the present invention can also be implemented in other ways. For example, the division of modules is only a logical functional division, and there may be other division methods in actual implementation. For another example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some communication interfaces, devices, or modules, and may be electrical, mechanical, or other forms. Additionally, the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0129] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause the processor to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0130] That is, those skilled in the art should understand that the embodiments of the present invention can be implemented in any of the following forms: a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects.
[0131] Example 2
[0132] Based on the cloud mask image generation method described in the foregoing embodiments, this invention also provides a cloud mask image generation apparatus. The figure shows a schematic diagram of the structure of the cloud mask image generation apparatus provided in this invention. Figure 1 .
[0133] like Figure 6 As shown, the cloud mask image generation device includes: an acquisition module 10, a mapping module 20, a classification threshold determination module 30, and a generation module 40.
[0134] The acquisition module 10 is used to acquire the Normalized Difference Vegetation Index (NDVI) and the pixel value of the visible red band corresponding to each pixel in the multispectral satellite image.
[0135] The mapping module 20 is used to map each pixel in the multispectral satellite image to a preset spectral feature space according to the normalized vegetation index and the pixel value of the visible red band corresponding to each pixel in the multispectral satellite image, so as to obtain a mapping point set of two types of samples. The mapping point set includes the mapping points of the normalized vegetation index and the visible red band corresponding to each pixel in the multispectral satellite image to the preset spectral feature space.
[0136] The classification threshold determination module 30 is used to obtain the slope of the boundary line between the two types of sample mapping points and determine the classification threshold of cloud features.
[0137] The generation module 40 is used to label the cloud feature information of the multispectral satellite image according to the classification threshold of the cloud features, and obtain a cloud mask image.
[0138] The cloud mask image generation device provided in this embodiment uses an acquisition module 10 to acquire the Normalized Difference Vegetation Index (NDVI) and the pixel value of the visible red band corresponding to each pixel in the multispectral satellite image. A mapping module maps each pixel in the multispectral satellite image to a preset spectral feature space based on the NDVI and the pixel value of the visible red band, obtaining mapping point sets for two types of samples. A classification threshold determination module acquires the slope of the boundary line between the two types of sample mapping points to determine the classification threshold for cloud features. A generation module labels the cloud feature information of the multispectral satellite image based on the cloud feature classification threshold, thus obtaining a cloud mask image. The normalized vegetation index and the pixel value of the visible red band corresponding to each pixel in the multispectral satellite image are used to map each pixel to a preset spectral feature space, obtaining the mapping point set of the two types of samples. The slope of the boundary line between the two types of sample mapping points is obtained, and the classification threshold of cloud features is determined. This can generate weakly supervised samples that are not very accurate. The weakly supervised samples are then fine-tuned by a pre-trained network using a small number of manually labeled samples. Ultimately, the cloud detection results can reach the detection accuracy range of using fully manually labeled samples, thereby reducing the workload of manual labeling and event costs, significantly improving work efficiency, and overcoming the shortcomings of deep learning models that require large amounts of data for training and learning, have low efficiency, and are difficult to meet the rapid application needs in emergency situations.
[0139] Example 3
[0140] Optionally, embodiments of the present invention also provide an electronic device, which may be a server, computer, or other similar device. Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present invention is shown. For example... Figure 7 As shown, the electronic device may include a processor 701, a storage medium 702, and a bus 703. The storage medium 702 stores machine-readable instructions executable by the processor 701. When the electronic device is running, the processor 701 communicates with the storage medium 702 via the bus 703. The processor 701 executes the machine-readable instructions to perform the steps of the cloud mask image generation method described in the foregoing embodiments. The specific implementation and technical effects are similar and will not be repeated here.
[0141] For ease of explanation, only one processor is described in the above-described electronic device. However, it should be noted that in some embodiments, the electronic device of the present invention may also include multiple processors. Therefore, the steps performed by one processor as described in the present invention may also be performed jointly or individually by multiple processors. For example, if the processor of the electronic device performs steps A and B, it should be understood that steps A and B may also be performed jointly by two different processors or individually by one processor. For example, a first processor performs step A, a second processor performs step B, or a first processor and a second processor jointly perform steps A and B, etc.
[0142] In some embodiments, the processor may include one or more processing cores (e.g., a single-core processor (S) or a multi-core processor (S)). By way of example only, the processor may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), an application-specific instruction-set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field-programmable gate array (FPGA), a programmable logic device (PLD), a controller, a microcontroller unit, a reduced instruction set computing (RISC) computer, or a microprocessor, or any combination thereof.
[0143] Based on this, embodiments of the present invention also provide a program product, which can be a storage medium such as a USB flash drive, portable hard drive, ROM, RAM, magnetic disk, or optical disk. The storage medium can store a computer program, which, when run by a processor, executes the steps of the motor stator insulation defect detection device as described in the foregoing method embodiments. The specific implementation method and technical effects are similar and will not be repeated here.
[0144] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0145] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for generating a cloud mask image, characterized in that, include: Obtain the Normalized Difference Vegetation Index (NDVI) and the pixel value of the visible red band for each pixel in the multispectral satellite image; Based on the normalized vegetation index and the pixel value of the visible red band corresponding to each pixel in the multispectral satellite image, each pixel in the multispectral satellite image is mapped to a preset spectral feature space to obtain two sets of mapping points for samples. The mapping point set includes the mapping points of the normalized vegetation index and the visible red band corresponding to each pixel in the multispectral satellite image mapped to the preset spectral feature space. Obtain the slope of the boundary line between the two types of sample mapping points to determine the classification threshold of cloud features; Based on the classification threshold of the cloud features, the cloud feature information of the multispectral satellite image is labeled to obtain a cloud mask image; The step of obtaining the slope of the boundary line between the two types of sample mapping points and determining the classification threshold of cloud features includes: Multiple boundary lines between two types of samples are obtained in the spectral feature space, and the boundary line with the slope of the principal axis with the largest variance is determined from the multiple boundary lines. Obtain a straight line that passes through the means of the two classes of samples in the spectral feature space and is perpendicular to the dividing line; The classification threshold of the cloud feature is determined based on the slope of the boundary line with the slope of the principal axis of maximum variance and the intercept of the line on the y-axis.
2. The method according to claim 1, characterized in that, The method further includes: The multispectral satellite image and the cloud mask image are segmented to obtain a first image block of the multispectral satellite image and a second image block of the cloud mask image, wherein the first image block includes multiple image blocks of the same size but different colors and different bands. The first image block and the second image block are input into a preset pre-trained network for pre-training to obtain the pre-trained network parameters for classifying the multispectral satellite images; The pre-trained network is updated according to the pre-trained network parameters, and the cloud mask image is obtained through the updated pre-trained network.
3. The method according to claim 2, characterized in that, The pre-trained network includes a shrinking path network module and an extended path network module corresponding to the shrinking path network module. The process of inputting the first image block and the second image block into a preset pre-trained network for pre-training to obtain pre-trained network parameters for classifying the multispectral satellite imagery includes: The shrinking path network module extracts and generates cloud image features at multiple different depths from the multispectral satellite imagery. Based on the cloud image features at multiple different depths, the cloud attributes of the cloud mask image are retrieved through the extended path network module to obtain the pre-trained network parameters after the multispectral satellite image classification.
4. The method according to claim 2, characterized in that, The method further includes: The parameter information of the network layer in the pre-trained network is determined to have a greater impact on the classification results of the multiple image patches of the same size but different colors and different bands than the preset requirements. The parameter information of the network layer is fixed, and the network parameters of other network layers are optimized.
5. The method according to claim 1, characterized in that, Before mapping each pixel in the multispectral satellite image to a preset spectral feature space based on the normalized vegetation index and the pixel value in the visible red band corresponding to each pixel, and obtaining the mapping point set of the two types of samples, the method further includes: The first and second reflectance values of each pixel in the multispectral satellite image are obtained in the near-infrared band and the red band, respectively. Based on the first reflectance value and the second reflectance value, the normalized vegetation index corresponding to each pixel in the multispectral satellite image is calculated.
6. A training method for a cloud mask image pre-trained network, characterized in that, The method includes: Obtain a first sample set of pre-defined manually labeled cloud mask images and a second sample set of cloud mask images obtained by the method described in claim 1 above; The first and second sample sets are used to fine-tune the initial cloud mask image pre-training network at a ratio of 1:4 to obtain the parameters of the trained cloud mask image pre-training network.
7. The method according to claim 6, characterized in that, After training and optimizing the initial cloud mask image pre-training network using the first sample set and the second sample set at a 1:4 ratio, the method further includes: Based on the training results, the network parameters of the preset number of neural network layers in the initial cloud mask image pre-training network are adjusted to obtain the corrected cloud mask image pre-training network parameters.
8. An apparatus for generating a cloud mask image, characterized in that, The device includes: an acquisition module, a mapping module, a classification threshold determination module, and a generation module that are electrically connected to each other; The acquisition module is used to acquire the Normalized Difference Vegetation Index (NDVI) and the pixel value of the visible red band corresponding to each pixel in the multispectral satellite image. The mapping module is used to map each pixel in the multispectral satellite image to a preset spectral feature space based on the normalized vegetation index and the pixel value of the visible red band corresponding to each pixel in the multispectral satellite image, thereby obtaining a mapping point set for two types of samples. The mapping point set includes the mapping points of the normalized vegetation index and the visible red band corresponding to each pixel in the multispectral satellite image mapped to the preset spectral feature space. The classification threshold determination module is used to obtain the slope of the boundary line between the two types of sample mapping points and determine the classification threshold of cloud features. The generation module is used to label the cloud feature information of the multispectral satellite image according to the classification threshold of the cloud features, and obtain a cloud mask image. The step of obtaining the slope of the boundary line between the two types of sample mapping points and determining the classification threshold of cloud features includes: Multiple boundary lines between two types of samples are obtained in the spectral feature space, and the boundary line with the slope of the principal axis with the largest variance is determined from the multiple boundary lines. Obtain a straight line that passes through the means of the two classes of samples in the spectral feature space and is perpendicular to the dividing line; The classification threshold of the cloud feature is determined based on the slope of the boundary line with the slope of the principal axis of maximum variance and the intercept of the line on the y-axis.
9. An electronic device, comprising: The electronic device includes a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus. The processor executes the machine-readable instructions to perform a cloud mask image generation method as described in any one of claims 1-5 or a cloud mask image pre-training network training method as described in any one of claims 6-7.
Citation Information
Patent Citations
Remote sensing image cloud detection method based on fuzzy self-compiling network
CN106228130A
Method and device for detecting integrated feature cloud of multi-spectral remote sensing image
CN109376600A