A rapid detection method and system for multi-spectral and multi-type water bodies

By applying the J-M distance method and the improved UNet model in water body detection, combined with morphological opening operations, the problem of rapid detection of multiple types of water bodies is solved, and efficient water body type identification and change detection is achieved.

CN114120139BActive Publication Date: 2025-03-18HENAN UNIVERSITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111326775.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-10
Publication Date
2025-03-18
Estimated Expiration
2041-11-10

AI Technical Summary

Technical Problem

The prior art is difficult to detect multiple water types quickly and efficiently, especially in the case of multi-spectral data limitations and lack of field verification.

Method used

Automatic band screening based on J-M distance method is used, combined with ResNet residual block and Focal Loss function to improve the UNet model, obtain the optimal band combination of different types of water bodies, and image processing is carried out through morphological opening operations to achieve feature extraction and rapid detection of multiple types of water bodies.

Benefits of technology

The model reasoning speed and convergence ability are improved, the balance problem between samples is solved, and the rapid change detection of multiple types of water bodies is realized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114120139B_ABST
    Figure CN114120139B_ABST
Patent Text Reader

Abstract

The present invention discloses a multi-spectral multi-type water body rapid detection method and system, the method comprising: making different types of water body samples based on remote sensing images; obtaining the best band combination of different types of water bodies based on the J-M distance method; improving the UNet model based on the ResNet residual block and the Focal Loss function, and taking the best band combination of different types of water bodies as the input of the improved UNet model to complete the extraction of different types of water body features; using morphological opening operation to perform image processing on the extracted different types of water body features, first performing corrosion operation on the image, and then performing expansion operation to obtain different types of water body record grid maps; setting different types of water body colors, generating different types of water body detection color classification maps, selecting corresponding colors according to different water body types, and completing different types of water body rapid detection. The present invention can realize the rapid detection of multiple types of water bodies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of remote sensing image processing, and in particular relates to a method and system for rapid detection of multi-spectral and multi-type water bodies. Background Art

[0002] As an important indicator of the urban ecosystem, water bodies are of great significance for evaluating the development of a city. With the acceleration of urbanization, the increase in population has also led to an increasing demand for water resources. On the other hand, the expansion of industrial land has caused the degradation of urban water ecology and water pollution in cities, further exacerbating the contradiction between water supply and demand. Monitoring the changes in different types of water bodies has become an indispensable part of urban governance. Remote sensing, as an important means of obtaining global surface change information, plays an irreplaceable role in water body change detection.

[0003] Water body extraction has made great progress in the past few decades. Wang Jinhua et al. (2004) used the inter-spectral relationship and ratio model (TM4 / TM2<0.9) and (TM2+TM3-TM4+TM5)>0 to extract water body information in Tangshan area, but the effect of extracting small rivers was not good. Mcfeeters (1996) constructed the NDWI index, which suppressed information such as vegetation, soil, buildings, shadows, etc., and highlighted water body information. Duan Qiuya et al. (2015) used the SVM extraction method to extract the water body of Poyang Lake in GF-1 satellite images. The overall accuracy was good, but the ability to extract river boundaries or small rivers was not strong. Wang Xue et al. (2018) used a fully convolutional neural network, a graph-based Grab Cut algorithm, and a traditional threshold method for water body extraction. Experiments showed that the fully convolutional neural network model was more capable of extracting water bodies than the traditional threshold method and the graph-based Grab Cut algorithm. It can be seen that the neural network-based method for extracting water bodies has become one of the current mainstream methods, but the water body extraction method does not involve the identification of water body types. On the one hand, it is limited by multi-spectral data, and on the other hand, it lacks field-verified water body types. Summary of the invention

[0004] Aiming at the problem of rapid detection of multiple types of water bodies, the present invention proposes a rapid detection method and system for multiple types of water bodies based on multiple spectrum bands, which can realize rapid (change) detection of multiple types of water bodies.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] On the one hand, the present invention proposes a multi-spectral multi-type water body rapid detection method, comprising:

[0007] Step 1: Prepare different types of water samples based on remote sensing images, including general water, turbid water, eutrophic water, and black and smelly water samples;

[0008] Step 2: Obtain the optimal band combination for different types of water bodies based on the JM distance method;

[0009] Step 3: Improve the UNet model based on the ResNet residual block and Focal Loss function, and use the optimal band combination of different types of water bodies as the input of the improved UNet model to complete the feature extraction of different types of water bodies;

[0010] Step 4: Use morphological opening operation to process the image of different types of water body features extracted in step 3. First, perform corrosion operation on the image, and then perform expansion operation to obtain raster images of different types of water body records;

[0011] Step 5: Set the colors of different types of water bodies, generate color classification maps for different types of water body detection, select corresponding colors according to different water body types, and complete rapid detection of different types of water bodies.

[0012] Furthermore, the step 1 comprises:

[0013] The sample vectors of different types of water bodies are labeled, with 1, 2, 3, and 4 representing general water bodies, turbid water bodies, eutrophic water bodies, and black and smelly water bodies, respectively. The water sample vectors are converted into raster label images that correspond one to one with the remote sensing images, and the images are cropped using a sliding window. The samples are randomly divided into training sets and test sets in proportion. The divided training sets are processed by horizontal flipping, mirroring, rotation, and Gaussian noise.

[0014] Furthermore, the step 2 comprises:

[0015] Based on the JM distance, the band combinations of different types of water bodies and land objects are automatically screened and separated. The number of band combinations is k, k = 3, 4, 5, 6, 7, 8, and the number of permutations of each combination is The JM distances of all water samples of different types and different landforms are calculated iteratively until the JM distances of all samples are greater than 1.9, then the iteration is stopped and the current band combination is selected as the optimal band combination for different types of water bodies.

[0016] Furthermore, the step 3 comprises:

[0017] Based on the UNet model, a four-layer downsampling module is used. A ResNet residual block is added after each downsampling module. A four-layer upsampling module is used to improve the information encoding dimension, and the upsampled feature map and the corresponding downsampled feature map of the same size are fused to complete the fusion of coarse-grained feature information and fine-grained feature information of water bodies. The Focal Loss function is used to balance the ratio of positive and negative samples of different types of water bodies to guide model training.

[0018] Another aspect of the present invention provides a multi-spectral multi-type water rapid detection system, comprising:

[0019] The water sample preparation module is used to prepare different types of water samples based on remote sensing images, including general water, turbid water, eutrophic water, and black and smelly water samples;

[0020] The best band combination acquisition module is used to obtain the best band combination for different types of water bodies based on the JM distance method;

[0021] UNet model improvement module, which is used to improve the UNet model based on ResNet residual block and Focal Loss function, and use the optimal band combination of different types of water bodies as the input of the improved UNet model to complete the feature extraction of different types of water bodies;

[0022] The image processing module is used to process the different types of water body features extracted by the UNet model improvement module using morphological opening operations. The image is first eroded and then expanded to obtain raster images of different types of water body records.

[0023] The water body type detection module is used to set the colors of different types of water bodies, generate color classification maps for different types of water body detection, select corresponding colors according to different water body types, and complete rapid detection of different types of water bodies.

[0024] Furthermore, the water sample preparation module is specifically used for:

[0025] The sample vectors of different types of water bodies are labeled, with 1, 2, 3, and 4 representing general water bodies, turbid water bodies, eutrophic water bodies, and black and smelly water bodies, respectively. The water sample vectors are converted into raster label images that correspond one to one with the remote sensing images, and the images are cropped using a sliding window. The samples are randomly divided into training sets and test sets in proportion. The divided training sets are processed by horizontal flipping, mirroring, rotation, and Gaussian noise.

[0026] Furthermore, the optimal band combination acquisition module is specifically used for:

[0027] Based on the JM distance, the band combinations of different types of water bodies and land objects are automatically screened and separated. The number of band combinations is k, k = 3, 4, 5, 6, 7, 8, and the number of permutations of each combination is Iteratively calculate the JM distance of all water samples of different types and different landforms until the JM distance of all samples is greater than 1.9, and then stop the iteration. Select the current band combination as the best band combination for different types of water bodies.

[0028] Furthermore, the UNet model improvement module is specifically used for:

[0029] Based on the UNet model, a four-layer downsampling module is used. A ResNet residual block is added after each downsampling module. A four-layer upsampling module is used to improve the information encoding dimension, and the upsampled feature map and the corresponding downsampled feature map of the same size are fused to complete the fusion of coarse-grained feature information and fine-grained feature information of water bodies. The Focal Loss function is used to balance the ratio of positive and negative samples of different types of water bodies to guide model training.

[0030] Compared with the prior art, the present invention has the following beneficial effects:

[0031] From the perspective of rational use of multiple bands, the present invention performs automatic band screening based on the JM distance method, can obtain and separate band combinations of different types of water bodies, and improve the model reasoning speed; the present invention improves the UNet model based on the ResNet residual block and the Focal Loss function, and uses the optimal band combination of different types of water bodies as the input of the improved UNet model to complete the feature extraction of different types of water bodies, improve the model convergence ability and solve the balance problem between samples. Finally, through the present invention, the rapid (change) detection of multiple types of water bodies is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 This is a flow chart of a method for rapid detection of multi-type water bodies based on multiple spectrum bands according to an embodiment of the present invention;

[0033] Figure 2 This is a flow chart of automatically searching for the best band combination based on the JM distance method according to an embodiment of the present invention;

[0034] Figure 3 The improved Unet model network structure diagram of the embodiment of the present invention;

[0035] Figure 4 This is a diagram showing the detection effects of different types of water bodies according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:

[0037] like Figure 1 As shown, a multi-spectral multi-type water body rapid detection method of the present invention comprises:

[0038] Step 1: Prepare different types of water samples based on remote sensing images, including general water, turbid water, eutrophic water, and black and smelly water samples;

[0039] Specifically, step 1 includes:

[0040] a) Preparation of training sets for different types of water bodies. The judgment of different types of water bodies is based on the government's public river management report and manual field verification. 60 high-quality GF-6 satellite images are selected, and different types of water body sample vectors are marked. 1, 2, 3, and 4 are used to represent general water bodies, turbid water bodies, eutrophic water bodies, and black and smelly water bodies respectively; the water body sample vectors are converted into raster label images that correspond to the remote sensing images one by one, and a 224×224 sliding window is used to segment the label and the image. 80% of the data set is used as the training set and 20% as the test set.

[0041] b) Data quantization. Normalize the training graph to 0-1, then magnify it by 255 times, convert the floating point type to integer type storage, speed up network calculation, and reduce the system's computing overhead. The normalization calculation formula is as follows:

[0042]

[0043] Where x is the training image, x' is the normalized image. min(x) represents the minimum value of the training image. max(x) represents the maximum value of the training image.

[0044] c) Sample augmentation. To improve the robustness of the network model, the training images segmented into 224×224 and their corresponding label images were augmented in the same way, including 45°, 90°, 135°, 180°, 225°, 270°, 315°, and 360° rotations; vertical and horizontal mirror flipping, and Gaussian noise, and the number of training sets was expanded. The expanded data reached 12,466 groups.

[0045] Step 2: Obtain the optimal band combination for different types of water bodies based on the JM distance method;

[0046] Specifically, Figure 2 As shown, step 2 includes:

[0047] The JM distance method is a spectral separability index based on conditional probability theory. It calculates the JM distance of band combinations of different water types. The formula is as follows

[0048]

[0049] Among them, J ij For category ω i With category ω j The Jeffries–Matusita distance between them; X is the feature vector of the target and the background in the k dimension; ω is a set of different types of objects, where ω i is the type of ground feature corresponding to the i-th pixel, ω j is the type of ground feature corresponding to the jth pixel; p(X / ω i) is the ω of X i The conditional probability distribution of the class, that is, the i-th pixel belongs to ω i The probability of the category, where the Gaussian distribution density function is used as the evaluation function The value of J is between 0 and 2, and its size represents the degree of separability between samples. ij When it is between 0.0 and 1.0, there is no spectral separability between samples; J ij When it is between 1.0 and 1.9, the samples have certain spectral separability, but there is a large degree of overlap; J ij When it is between 1.9 and 2.0, the samples have good spectral separability.

[0050] The JM distance method is used to mine the positively correlated bands of the eight bands of GF-6 for different types of water body classification, and the different bands of GF-6 are combined, where the number of combined bands is k (k = 3, 4, 5, 6, 7, 8), and the number of permutations of each combination is The JM distances of all water samples and different land objects are calculated iteratively until the JM distances of all samples are greater than 1.9 and the iteration is stopped.

[0051] Step 3: Improve the UNet model based on the ResNet residual block and Focal Loss function, and use the optimal band combination of different types of water bodies as the input of the improved UNet model to complete the feature extraction of different types of water bodies;

[0052] Specifically, step 3 includes:

[0053] a) Improved UNet model (ResNetUnet) Figure 3 As shown in the figure, 4 encoders and 4 decoders are used; the encoder includes 6 ResNet residual blocks, which are composed of two groups of unit blocks. Each group of unit blocks contains 2 3*3 convolution units. After convolution, the ReLU activation function is used to nonlinearize the output. The input and output of each unit block are combined by skip connection, and the two groups of unit blocks are connected by short lines. Among them, ResNet solves the problem of gradient disappearance in deep networks better. Copy and crop channels are added to the encoder, and the context feature information of the network is deeply fused to obtain a coarse-grained feature map, which is sent to the decoder for upsampling to obtain a fine-grained feature map. The decoder is 2 layers of 3*3 convolution and one layer of 2*2 deconvolution.

[0054] b) Loss function optimization: Focal loss function is introduced to strengthen the balance between positive and negative samples. The formula is as follows:

[0055]

[0056] Among them, p n is the predicted value, rn is the true value of the sample, α and γ are parameters. α is the balance factor, which is used to balance the uneven ratio of positive and negative samples.

[0057] Step 4: Use morphological opening operation to process the image of different types of water body features extracted in step 3. First, perform corrosion operation on the image, and then perform expansion operation to obtain raster images of different types of water body records;

[0058] Specifically, step 4 includes:

[0059] To solve the “hole” problem in water body extraction, morphological opening operation is used for image processing, and the image corrosion operation is then expanded to refine the water body recognition accuracy.

[0060] The expression of corrosion in morphology is:

[0061]

[0062] The expression for dilation in morphology is:

[0063]

[0064] In the formula, X is the target image, B is the structural element, and B v is the symmetric set of B, X is the displacement of the set translation, Θ is the operator of the erosion operation, The operator for the dilation operation.

[0065] Step 5: Set the colors of different types of water bodies, generate color classification maps for different types of water body detection, select corresponding colors according to different water body types, and complete rapid detection of different types of water bodies.

[0066] Specifically, step 5 includes:

[0067] The obtained raster images of different types of water bodies, where 0, 1, 2, 3, and 4 correspond to background, general water, turbid water, eutrophic water, and black and smelly water, respectively, set the corresponding colors of the recorded values ​​to complete the color classification results of water body categories. Select the corresponding colors according to different water body types to complete the rapid detection of different types of water bodies. The detection effect is as follows Figure 4 shown.

[0068] Based on the above embodiments, the present invention further proposes a multi-spectral multi-type water body rapid detection system, comprising:

[0069] The water sample preparation module is used to prepare different types of water samples based on remote sensing images, including general water, turbid water, eutrophic water, and black and smelly water samples;

[0070] The best band combination acquisition module is used to obtain the best band combination for different types of water bodies based on the JM distance method;

[0071] UNet model improvement module, which is used to improve the UNet model based on ResNet residual block and Focal Loss function, and use the optimal band combination of different types of water bodies as the input of the improved UNet model to complete the feature extraction of different types of water bodies;

[0072] The image processing module is used to process the different types of water body features extracted by the UNet model improvement module using morphological opening operations. The image is first eroded and then expanded to obtain raster images of different types of water body records.

[0073] The water body type detection module is used to set the colors of different types of water bodies, generate color classification maps for different types of water body detection, select corresponding colors according to different water body types, and complete rapid detection of different types of water bodies.

[0074] Furthermore, the water sample preparation module is specifically used for:

[0075] The sample vectors of different types of water bodies are labeled, with 1, 2, 3, and 4 representing general water bodies, turbid water bodies, eutrophic water bodies, and black and smelly water bodies, respectively. The water sample vectors are converted into raster label images that correspond one to one with the remote sensing images, and the images are cropped using a sliding window. The samples are randomly divided into training sets and test sets in proportion. The divided training sets are processed by horizontal flipping, mirroring, rotation, and Gaussian noise.

[0076] Furthermore, the optimal band combination acquisition module is specifically used for:

[0077] Based on the JM distance, the band combinations of different types of water bodies and land objects are automatically screened and separated. The number of band combinations is k, k = 3, 4, 5, 6, 7, 8, and the number of permutations of each combination is Iteratively calculate the JM distance of all water samples of different types and different landforms until the JM distance of all samples is greater than 1.9, and then stop the iteration. Select the current band combination as the best band combination for different types of water bodies.

[0078] Furthermore, the UNet model improvement module is specifically used for:

[0079] Based on the UNet model, a four-layer downsampling module is used. A ResNet residual block is added after each downsampling module. A four-layer upsampling module is used to improve the information encoding dimension, and the upsampled feature map and the corresponding downsampled feature map of the same size are fused to complete the fusion of coarse-grained feature information and fine-grained feature information of water bodies. The Focal Loss function is used to balance the ratio of positive and negative samples of different types of water bodies to guide model training.

[0080] In summary, from the perspective of rational use of multiple bands, the present invention performs automatic band screening based on the JM distance method, can obtain and separate band combinations of different types of water bodies, and improve the model reasoning speed; the present invention improves the UNet model based on the ResNet residual block and the Focal Loss function, and uses the optimal band combination of different types of water bodies as the input of the improved UNet model to complete the feature extraction of different types of water bodies, improve the model convergence ability and solve the balance problem between samples. Finally, through the present invention, the change detection of multiple types of water bodies is realized.

[0081] The above is only a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A multi-spectral multi-type water body rapid detection method, characterized in that: include: Step 1: Prepare different types of water samples based on remote sensing images, including general water, turbid water, eutrophic water, and black and smelly water samples; Step 2: Obtain the optimal band combination for different types of water bodies based on the JM distance method; The step 2 comprises: Based on the JM distance, the band combinations of different types of water bodies and land objects are automatically screened and separated. The number of band combinations is k, k=3, 4, 5, 6, 7, 8, and the number of permutations of each combination is , iteratively calculate the JM distances of all water samples of different types and different landforms until the JM distances of all samples are greater than 1.9, and then stop the iteration, and select the current band combination as the best band combination for different types of water bodies; Step 3: Improve the UNet model based on the ResNet residual block and Focal Loss function, and use the optimal band combination of different types of water bodies as the input of the improved UNet model to complete the feature extraction of different types of water bodies; The step 3 comprises: Based on the UNet model, a four-layer downsampling module is used. A ResNet residual block is added after each downsampling module. A four-layer upsampling module is used to improve the information encoding dimension, and the upsampling feature map and the corresponding downsampling feature map of the same size are fused to complete the fusion of coarse-grained feature information and fine-grained feature information of the water body. The Focal Loss function is used to balance the ratio of positive and negative samples of different types of water bodies to guide model training. Step 4: Use morphological opening operation to process the image of different types of water body features extracted in step 3. First, perform corrosion operation on the image, and then perform expansion operation to obtain raster images of different types of water body records; Step 5: Set the colors of different types of water bodies, generate color classification maps for different types of water body detection, select corresponding colors according to different water body types, and complete rapid detection of different types of water bodies.

2. According to claim 1, a multi-spectral multi-type water body rapid detection method is characterized in that: The step 1 comprises: The sample vectors of different types of water bodies are labeled, with 1, 2, 3, and 4 representing general water bodies, turbid water bodies, eutrophic water bodies, and black and smelly water bodies, respectively. The water sample vectors are converted into raster label images that correspond one to one with the remote sensing images, and the images are cropped using a sliding window. The samples are randomly divided into training sets and test sets in proportion. The divided training sets are processed by horizontal flipping, mirroring, rotation, and Gaussian noise.

3. A multi-spectral multi-type water rapid detection system, characterized in that: include: The water sample preparation module is used to prepare different types of water samples based on remote sensing images, including general water, turbid water, eutrophic water, and black and smelly water samples; The module for obtaining the best band combination is used to obtain the best band combination for different types of water bodies based on the JM distance method; it is specifically used for: Based on the JM distance, the band combinations of different types of water bodies and land objects are automatically screened and separated. The number of band combinations is k, k=3, 4, 5, 6, 7, 8, and the number of permutations of each combination is , iteratively calculate the JM distances of all water samples of different types and different landforms until the JM distances of all samples are greater than 1.9, and then stop the iteration, and select the current band combination as the best band combination for different types of water bodies; The UNet model improvement module is used to improve the UNet model based on the ResNet residual block and the Focal Loss function, and use the optimal band combination of different types of water bodies as the input of the improved UNet model to complete the feature extraction of different types of water bodies; specifically used for: Based on the UNet model, a four-layer downsampling module is used. A ResNet residual block is added after each downsampling module. A four-layer upsampling module is used to increase the information encoding dimension. The upsampling feature map and the corresponding downsampling feature map of the same size are fused to complete the fusion of coarse-grained feature information and fine-grained feature information of the water body. The Focal Loss function is used to balance the ratio of positive and negative samples of different types of water bodies to guide model training; The image processing module is used to process the different types of water body features extracted by the UNet model improvement module using morphological opening operations. The image is first eroded and then expanded to obtain raster images of different types of water body records. The water body type detection module is used to set the colors of different types of water bodies, generate color classification maps for different types of water body detection, select corresponding colors according to different water body types, and complete rapid detection of different types of water bodies.

Citation Information

Patent Citations

  • Optical remote sensing image total factor change detection method

    CN110956207A

  • Remote sensing image water area automatic extraction method and system based on deep learning

    CN111767801A