High-resolution image water extraction method supported by object-oriented convolutional neural networks
By optimizing the sample set through unsupervised object unit extraction and edge detection algorithms, and combining it with the ResNet50 neural network, the problems of high sample annotation cost and inaccurate edge information in the extraction of pond water bodies from remote sensing images are solved, and high-precision extraction of pond water bodies is achieved.
Patent Information
- Application Number
- CN202310053700.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-03
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2043-02-03
AI Technical Summary
Existing object-oriented convolutional neural networks face challenges in extracting pond water bodies from remote sensing images, including high sample labeling costs, interference from low-quality samples during training, and the inability to accurately remove edge information, leading to difficulties in accurate extraction.
We extract object units and scene samples in an unsupervised manner, adaptively crop to generate scene classification datasets, combine edge detection algorithms and purity threshold screening to optimize the sample set, use ResNet50 neural network for training and iterative optimization, and finally restore the pixel-level results.
It effectively reduces sample labeling costs, improves model prediction accuracy, enhances edge extraction performance, and achieves accurate extraction of pond water bodies from high-resolution images.
Smart Images

Figure CN116664860B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of remote sensing intelligent information extraction technology, specifically relating to a method for extracting pond water bodies from high-resolution images supported by object-oriented convolutional neural networks. Background Technology
[0002] Ponds and ponds refer to land with a water storage capacity of less than 100,000 cubic meters below the normal water level, whether artificially excavated or naturally formed. As an important land use type, ponds and ponds are significant for aquaculture and water conservation. Their management has gradually shifted from independent and scattered operations to large-scale, scientific production management. Therefore, how to improve management, establish a long-term monitoring mechanism, and promote the healthy development of modern agriculture, and how to quickly and effectively extract data from ponds and ponds for quantitative and qualitative analysis, has become a key focus in various regions. With the rapid development of remote sensing technology, its characteristics of large coverage area, short revisit cycle, strong timeliness, and low cost have made it a new technical means for obtaining ground information in fields such as resource surveys and environmental monitoring. Ponds and ponds have significant edge characteristics, and their edge information is richer and more detailed than other land features, providing a data foundation for accurate extraction. Using remote sensing to dynamically monitor ponds and ponds, and quickly and accurately obtain their distribution density, area, and range, is of great significance for the rational formulation of land use planning and management policies. Meanwhile, with the rapid development of neural network technology, using neural networks for classification tasks has become a popular solution, capable of solving scene classification tasks to some extent. However, due to the complex terrain features and blurred edges in remote sensing imagery, neural networks cannot achieve high accuracy in edge extraction, posing a challenge to the precise extraction of water bodies in ponds and pits.
[0003] Therefore, for the problem of accurately extracting pond water bodies in remote sensing images, the existing object-oriented convolutional neural network-supported methods have the following limitations: (1) The cost of labeling remote sensing image samples is high. Low-quality samples not only cannot bring effective accuracy improvement, but will also interfere with training weights. However, high-quality pixel-level samples require a lot of manpower and material resources. (2) Edge information cannot be accurately removed. If the neural network is used directly for training and prediction, the edge information cannot be accurately distinguished, resulting in the integration of continuous ponds and failing to accurately express the complex spatial information between ground features. Summary of the Invention
[0004] This invention addresses the shortcomings of existing technologies by providing a method for extracting water bodies from high-resolution images of ponds supported by object-oriented convolutional neural networks.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A method for extracting pond water bodies from high-resolution images supported by object-oriented convolutional neural networks includes the following steps:
[0007] Step 1: Collect high-resolution remote sensing image data and preprocess the high-resolution remote sensing image data. The preprocessing includes image cropping, geometric correction and RGB band selection to obtain high-resolution images of pits and ponds, and label the pits and ponds in the high-resolution images to generate a ground truth label map of the pits and ponds. Use an unsupervised method to segment the high-resolution images of pits and ponds to obtain multiple object units, and extract scene sample sampling points for each object unit.
[0008] Step 2: Extract the features of each object unit, set the threshold of the object unit features and the default size of the scene samples, and calculate the scene sample size of different object units based on the quantitative relationship between the object unit features and the threshold. With the scene sample sampling point as the center point, adaptively crop the scene samples according to the size. The scene samples generated by cropping form the original scene classification dataset without classification labels.
[0009] Step 3: Extract edges from the high-resolution images of pond water bodies and calculate the edge threshold of the extracted edge results; set a purity threshold based on the ground truth label map of the pond water bodies; calculate the edge ratio of scene samples, compare the quantitative relationship between the edge ratio and the edge threshold, calculate the purity ratio of scene samples, compare the quantitative relationship between the purity ratio and the purity threshold, remove edge samples and low-purity samples, and obtain the optimized scene classification dataset.
[0010] Step 4: Feed the optimized scene classification dataset and the ground truth label map of the pond water body into the convolutional neural network classification model for model training and parameter iterative optimization; after training, feed the original scene classification dataset into the trained neural network classification model to predict the scene sample classification results.
[0011] Step 5: Combine the edge threshold and the edge ratio of scene samples to correct the predicted scene sample classification results, reassign the scene sample categories for edge scenes to form the final scene classification results, and assign the scene sample sampling points; calculate the mode of the category of the scene sample sampling points in the object unit, assign the object unit category, restore the object unit to the pixel-level results and evaluate the accuracy.
[0012] To optimize the above technical solution, the specific measures also include:
[0013] Further, in step 1, the extraction of object units and scene sample sampling points using an unsupervised method specifically involves:
[0014] An image multi-scale segmentation algorithm is used to extract unsupervised object units. The optimal segmented object unit is obtained by iterating the shape factor and compactness factor parameters.
[0015] Set area threshold, density threshold, area influence factor and density influence factor, use binary tree sampling method to calculate the number weight of sampling points, and combine the total number of pixels of object unit to calculate the number of scene sample sampling points one by one;
[0016] The number of scene sample sampling points is used as the number of K-Means cluster points. The location of each scene sample sampling point is calculated and the Euclidean distance is used to round the coordinates of the sampling point location to form a scene sample sampling point file.
[0017] Furthermore, step 2 includes the following sub-steps:
[0018] Step 2.1: Extract the features of a single object unit, including length, width, and aspect ratio;
[0019] Step 2.2: Set the aspect ratio threshold, the default size of the scene sample, and the minimum size. Compare the quantitative relationship between the aspect ratio and the aspect ratio threshold. If the aspect ratio is less than the aspect ratio threshold, the default size is used to crop the scene sample. If the aspect ratio is not less than the aspect ratio threshold, the quantitative relationship between the length and the width is compared, and the smaller one is selected as the larger size after cropping. If the length or width is lower than the minimum size limit, the minimum size is selected to crop the scene sample.
[0020] Step 2.3: Based on the scene sample clipping size set in Step 2.2, calculate the coordinates of the four corners of the clipping rectangle with the scene sample sampling point as the center point. If it exceeds the boundary limit of the object unit, the scene sample is clipped according to the boundary to form the original scene classification dataset.
[0021] Furthermore, step 3 includes the following sub-steps:
[0022] Step 3.1: Extract edges from the high-resolution pit and pond water images using the Canny operator based on the second derivative, and perform intersection-union ratio (IU / R) calculation with the ground truth label image of the pit and pond water bodies. Iterate the parameters to obtain the optimal edge extraction result image. Binarize the edge extraction result image, calculate the proportion of edge pixels to the total number of pixels in the image, and obtain the edge threshold.
[0023] The specific formula for calculating the edge threshold, which involves calculating the proportion of edge pixels to the total number of pixels in the image, is as follows:
[0024]
[0025] In the formula, Point is the edge threshold. Edge Point represents the number of edge pixels in the edge extraction result image. All This represents the total number of pixels in the edge extraction result image;
[0026] Step 3.2: Based on the ground truth label map of the pond water body, calculate the ratio of the number of pixels of the pond water body in the label map to the total number of pixels of the high-resolution pond water body image, and use it as the purity threshold of the scene sample. The formula is as follows:
[0027]
[0028] In the formula, Point is the purity threshold. true Point represents the number of pixels representing the water bodies in the ponds in the truth label image. All This represents the total number of pixels in the high-resolution image of the pond water body.
[0029] Step 3.3: Calculate the ratio of edge pixels to total pixels in a single scene sample image. The calculation formula is as follows:
[0030]
[0031] in, Point represents the edge weight of the scene sample. UnitEdge Point represents the number of edge pixels in an object unit. UnitAll This represents the total number of pixels in the object unit.
[0032] Compare the relationship between the edge weight of scene samples and the edge threshold. If the edge weight of a scene sample is not lower than the edge threshold, it is an edge sample. If the edge weight of a scene sample is lower than the edge threshold, it is a non-edge sample.
[0033] Step 3.4: Calculate the ratio of target pixels to total pixels in a single scene sample as the purity of the scene sample image, using the following formula:
[0034]
[0035] in, Point represents the purity of the scene samples. Unitkt Point represents the number of pixels representing the water bodies in the pond within the object unit. UnitAll This represents the total number of pixels in the object unit.
[0036] Compare the relationship between the purity of the scene sample and the purity threshold. If the purity of the scene sample is not lower than the purity threshold, it is a high-purity sample. If the purity of the scene sample is lower than the purity threshold, it is a low-purity sample.
[0037] Step 3.5: Label the edge samples, non-edge samples, high-purity samples, and low-purity samples in the original scene classification dataset with corresponding values. Treat the edge samples and low-purity samples in the original scene classification dataset as invalid samples. After removing the invalid samples, label the target scene and background scene of the scene samples in the scene classification dataset after removing invalid samples with different values according to the scene category corresponding to the point at the same position as the sampling point of the scene sample in the ground truth label map of the pond water body. Generate the optimized scene classification dataset, where the target scene is the pond water body.
[0038] Furthermore, in step 4, the neural network classification model is selected as ResNet50, and the parameters include the optimizer SGD, learning rate, number of iterations, and batch size.
[0039] Furthermore, step 5 includes the following sub-steps:
[0040] Step 5.1: Based on the classification results of the obtained original scene classification dataset, execute step 3.3 again to correct the classification results corresponding to the edge scene to the background value;
[0041] Step 5.2: Assign scene sample sampling points to the corrected scene classification results, calculate the mode of the category of scene sample sampling points in the object unit, assign the category corresponding to the mode to all pixels in the object unit, and complete the pixel-level result restoration;
[0042] Step 5.3: Based on the truth label map, evaluate the accuracy of the pixel-level results.
[0043] Furthermore, the method of using a binary tree sampling method to calculate the weight of the number of sampling points, and combining this with the total number of pixels in the object unit, specifically calculates the number of scene sample sampling points one by one as follows:
[0044] A binary tree sampling point weight calculation matrix is constructed based on the area and density characteristics of the object unit. The weight of the number of scene sample sampling points for a single object unit is calculated using a binary tree sampling algorithm. Combined with the total number of pixels in the object unit, the number of sampling points for each object unit is obtained. The specific calculation formula is as follows:
[0045] Posum = 1.5 * (Pts / 100) * matrix k
[0046] In the formula: Pts represents the total number of pixels in the object unit, matrix represents the weight in the binary tree sampling point weight calculation matrix, k represents the ordinal number of the element in the weight calculation matrix, and Posum represents the final number of sampling points obtained by rounding up after calculating the number of sampling points.
[0047] Furthermore, the step of using the number of scene sample sampling points as the number of K-Means clustering points, calculating the position of each scene sample sampling point, and rounding the sampling points using Euclidean distance specifically involves:
[0048] The formula for calculating K-Means clustering is as follows:
[0049]
[0050] In the formula: x i Let y be the x-coordinate of the sampling point. i Let i be the vertical coordinate of the sampling point, i be the sampling point number, and n be the total number of sampling points.
[0051] After K-Means values are obtained, if floating-point data is present, Euclidean distance is used to calculate the location of the nearest sampling point to the floating-point data, and the final scene sample sampling point location is rounded up.
[0052] Further, in step 3.1, the specific steps of the Canny operator edge extraction include:
[0053] Step 3.1.1: Gaussian filter smoothing of the image
[0054] G(x,y)=F(x,y)*H(x,y)
[0055] In the formula, G(x, y) is the filtered image, F(x, y) is the original image, and H(x, y) is the Gaussian function.
[0056]
[0057] In the formula, (x, y) are the pixel coordinates, and σ is the standard deviation;
[0058] Step 3.1.2: Calculate the gradient of the filtered image using the finite difference of the first-order partial derivative;
[0059] Step 3.1.3: Suppress non-maximum gradients using gradient magnitude;
[0060] Step 3.1.4: Detect and connect edges using a double threshold algorithm.
[0061] The beneficial effects of this invention are:
[0062] (1) This invention proposes a high-resolution image pit and pond water body extraction method supported by object-oriented convolutional neural network. This method integrates unsupervised object unit extraction and scene sample adaptive generation method to convert pixel-level annotation into scene category annotation, effectively reducing the sample annotation cost, and effectively solving the problem of different information content of scene images of object units of different sizes, thus effectively improving the quality of scene samples.
[0063] (2) Considering edge information, the sample optimization strategy uses edge detection algorithm, adds edge threshold and purity threshold screening modules, optimizes the original scene dataset, removes low purity scenes and edge scenes, reduces the impact of data quality on the accuracy of the model, improves the model prediction accuracy, and enhances the edge extraction effect.
[0064] This invention has achieved good classification results in large-scale pit and pond water body image datasets. Compared with traditional convolutional neural networks, the method of this invention has improved overall accuracy, lower labeling cost, and more accurate edges, providing a new solution to the problem of accurate extraction of pit and pond water bodies based on remote sensing images. Attached Figure Description
[0065] Figure 1 This is a flowchart illustrating the overall process of a high-resolution image extraction method for ponds supported by an object-oriented convolutional neural network, according to the present invention.
[0066] Figure 2 This is a schematic diagram illustrating the acquisition of scene sample sampling points in this invention;
[0067] Figure 3 This is a schematic diagram of adaptive scene sample acquisition in this invention;
[0068] Figure 4 This is a schematic diagram of the sample optimization strategy that takes edge information into account in this invention;
[0069] Figure 5 This is the final result image obtained using this method. Figure 5 (a) in the image is a water body image of the Gaofen pond. Figure 5 (b) in the text is the truth label. Figure 5 (c) in the figure represents the edge detection result. Figure 5 (d) in the figure represents the precise extraction result of the water body in the pit / pond;
[0070] Figure 6 Calculate the weight matrix for the sampling points of the binary tree. Detailed Implementation
[0071] The invention will now be described in further detail with reference to the accompanying drawings.
[0072] In one embodiment, the present invention proposes a method for extracting pond water bodies from high-resolution images supported by object-oriented convolutional neural networks. The overall flowchart of the method is as follows: Figure 1 As shown; the dataset used in this embodiment is remote sensing image data of a coastal area in Yancheng City, with a spatial resolution of 0.5 meters and an image pixel size of 10240×7168. The dataset itself is a three-band remote sensing image, containing only RGB bands. After preprocessing, for ease of subsequent description, the image is referred to as "high-resolution pit and pond water body image".
[0073] The specific process of extracting the pond water body areas from the above remote sensing images using this method is as follows:
[0074] Step 1: Acquire high-resolution remote sensing images of the coastal area of Yancheng City. Perform preprocessing such as cropping to obtain high-resolution images of ponds and reservoirs. Based on these images, manually label the ponds and reservoirs. Utilize a multi-scale image segmentation algorithm to segment the high-resolution pond and reservoir images, iterating parameters to generate the optimal segmentation object unit. Using binary tree sampling and the K-Means algorithm, obtain the number and location of scene sample sampling points for each object unit, forming a scene sample sampling point file. The process for obtaining scene sample sampling points is as follows: Figure 2 As shown.
[0075] Step 1.1: Generate vector files in ArcMap, perform preprocessing such as cropping on the image to obtain the original image of the study area, referred to as the high-resolution pit and pond water body image in this embodiment. Use the New Region of Interest function of the remote sensing processing software ENVI to manually label the pit and pond water bodies in the high-resolution pit and pond water body image. During the labeling process, the edge positions should be kept as accurate as possible to avoid accuracy errors caused by ground truth labels. Generate a ground truth label map of the pit and pond water bodies and save it as a separate TIFF file.
[0076] Step 1.2: Using the ESP2 plugin in eCognition software, image segmentation of the high-resolution pit and pond water body image was completed. The initial parameters of the EPS2 plugin were set as follows: shape factor of 0.1, compactness factor of 0.5, and segmentation level of 1. After the initial segmentation, the segmentation results (object units) were analyzed, and the parameters were iterated to obtain the optimal segmentation result. The segmentation result with the best distinction between the pit and pond water body and edge information was exported. In this experiment, the object unit was Level 1, and it was saved as a grayscale TIFF image.
[0077] Step 1.3: Using the binary tree sampling method, calculate the weight of the number of sampling points for each object unit scene sample, where the threshold α and influence factor β are set as follows:
[0078] Set area threshold α1, density threshold α2, area influence factor β1, and density influence factor β2. The area threshold α1 and density threshold α2 have the same value, both 0.2 and 0.6. The area influence factor β1 and density influence factor β2 also have the same value, both 0.2, 0.4, and 0.6. The area threshold α1 and density threshold α2 are collectively referred to as threshold α, and the area influence factor β1 and density influence factor β2 are collectively referred to as influence factor β.
[0079] α≤0.2 is considered a small area / density region, 0.2<α<0.6 is considered a medium area / density region, and α≥0.6 is considered a large area / density region. The influence factor β for small area / density regions is 0.2, the influence factor β for medium area / density regions is 0.4, and the influence factor β for large area / density regions is 0.6.
[0080] The binary tree sampling point weight calculation matrix is as follows: Figure 6 As shown in the diagram. The horizontal axis represents the area influence factor β1, and the vertical axis represents the density influence factor β2. The ordinal number of each weight element in the matrix is k, which ranges from 1 to 9 from top to bottom and left to right. For example, if a region is a low-density and large-area region, i.e., α2≤0.2 and α1>0.6, then the area influence factor β1 is 0.2 and the density influence factor β2 is 0.6. Therefore, the sampling weight of this region corresponds to the ninth element in the matrix, matrix9=0.12.
[0081] The weight of the number of scene sample sampling points for a single object unit is calculated using a binary tree sampling algorithm. Combined with the total number of pixels in a single object unit, the number of scene sample sampling points for each object unit is obtained one by one. The specific calculation formula is as follows:
[0082] Posum = 1.5 * (Pts / 100) * matrix k
[0083] In the formula: Pts represents the total number of pixels in the object unit, matrix represents the weight in the binary tree sampling point weight calculation matrix, and k represents the ordinal number of the element in the weight calculation matrix, such as... Figure 6 As shown, there are a total of 9 weight elements in the matrix. Posum represents the final number of sampling points obtained by rounding up the calculated number of scene sample sampling points.
[0084] Step 1.4: After calculating the number of sampling points, the K-Means algorithm and Euclidean distance are used to perform unsupervised sampling of sampling points in the object cells to ensure the randomness and reliability of sampling and reduce manual costs. The K-Means calculation formula is as follows:
[0085]
[0086] In the formula: x i Let y be the x-coordinate of the sampling point. i The vertical coordinate of the sampling point, where i is the sampling point number and n is the total number of sampling points.
[0087] After K-Means values are obtained, floating-point data appears. Euclidean distance is used to calculate the position of the nearest pixel and round it to the final scene sample sampling point position coordinates.
[0088] Step 2: Extract the object unit features from Step 1, set the threshold for aspect ratio features, and define the default and minimum sizes of scene samples. Based on the relationship between the object unit aspect ratio and the threshold, and the relationship between the smaller of the length and width and the minimum size, calculate the scene sample clipping size corresponding to the sampling point. Using the sampling point as the center, calculate the coordinates of the four corners of the clipping rectangle. Within the boundary constraints of the object unit, clip the scene samples to achieve the adaptive generation of scene samples, forming an unlabeled original scene classification dataset. The process of generating scene samples is as follows: Figure 3 As shown.
[0089] Step 2.1: Using eCognition software, extract features from the object units extracted in Step 1.2. The extracted features include three aspects: length, width, and aspect ratio, and are saved in .csv format.
[0090] Step 2.2: Based on the actual annotation experience in Step 1.1, the aspect ratio of the target features is generally kept within 3 times, therefore the aspect ratio threshold is set to 3. If the aspect ratio is lower than this threshold, the default width is used; if the aspect ratio exceeds this threshold, the quantitative relationship between length and width is compared, and the smaller value is compared with the minimum size. If it is less than the minimum size, the scene sample cropping size is set to the minimum size; otherwise, the length / width ratio is used. The length ratio threshold, default size, and minimum size settings are shown in the table below:
[0091]
[0092] Step 2.4: Using the scene sample sampling point as the center point, perform image cropping according to the final selected scene sample cropping size. The cropping process is limited by the boundary range of the object unit. If it exceeds the boundary range, the boundary range shall prevail, and finally obtain the original scene classification data without classification labels.
[0093] Step 3: A scene optimization strategy considering edge information is implemented. Edge extraction is performed on the high-resolution images of pond water bodies, and edge thresholds are calculated. Purity thresholds are then calculated based on the ground truth labels. Based on the edge and purity thresholds, edge samples and low-purity samples are extracted to obtain an optimized scene classification dataset. The sample optimization strategy process is as follows: Figure 4 As shown, the specific steps include the following:
[0094] Step 3.1: Edge detection is performed using the Canny operator based on the second derivative. The Canny operator edge detection steps are as follows:
[0095] ① Gaussian filter smoothing of images
[0096]
[0097] G(x,y)=F(x,y)*H(x,y)
[0098] Where G(x,y) is the filtered image, F(x,y) is the original image, H(x,y) is the Gaussian function, (x,y) are the pixel coordinates, and σ is the standard deviation.
[0099] ② The gradient of the filtered image is calculated using the finite difference of the first-order partial derivative;
[0100] ③ Use gradient magnitude to suppress non-maximum values of the gradient;
[0101] ④ Use a double threshold algorithm to detect and connect edges.
[0102] After edge detection, the intersection-union ratio (IoU) of the edge detection result image and the ground truth map is calculated to obtain the optimal edge extraction result image. Then, the edge threshold is calculated. The edge threshold calculation formula is as follows:
[0103]
[0104] in, Point is the edge threshold. Edge Point represents the number of edge pixels in the edge extraction result image. All This represents the total number of pixels in the edge extraction results.
[0105] Step 3.2: Based on the truth label map, calculate the purity threshold using the following formula:
[0106]
[0107] in, Point is the purity threshold. true Point represents the number of pixels representing the water bodies in the ponds in the truth label image. All This represents the total number of pixels in the image.
[0108] Step 3.3: Edge optimization of the scene dataset. The edge weight calculation method for scene sample images is as follows:
[0109]
[0110] in, Point represents the edge weight of the scene sample image. UnitEdge Point represents the number of edge pixels in an object unit. UnitAll This represents the total number of pixels in the object unit. If the proportion of edge pixels in a scene sample image exceeds the edge threshold, it is considered an edge sample, i.e., an invalid sample. If it is below the threshold, it is considered a non-edge sample, i.e., a valid sample.
[0111] Step 3.4: Scene dataset purity optimization. The scene sample purity is calculated as follows:
[0112]
[0113] in, Point represents the purity of the scene samples. Unitkt Point represents the number of pixels representing the water bodies in the pond within the object unit. UnitAll This represents the total number of pixels in the object unit. If the purity of the scene sample exceeds the threshold, it is considered a high-purity sample, i.e., a valid sample; if the purity of the scene sample is below the threshold, it is considered a low-purity sample, i.e., an invalid sample.
[0114] Step 3.5: Label the low-purity samples in the original scene classification dataset as 255, the high-purity samples as 254, the edge samples as 253, and the non-edge samples as 252. Remove the edge and low-purity samples from the original scene classification dataset. Based on the scene category corresponding to the point at the same position as the scene sample sampling point in the ground truth label map of the pond water body, determine the scene sample label category in the scene classification dataset after removing invalid scenes. The target scene (pond water body) is labeled as 1, and the background scene is labeled as 0, generating the optimized scene classification dataset.
[0115] The annotation process and the annotation status of the final scene classification dataset are shown in the table below:
[0116]
[0117] Step 4: Input the optimized scene classification dataset and the ground truth label map of the pond water body into the convolutional neural network classification model for model training, iterate and fine-tune the parameters. After training, feed the original scene classification dataset into the trained classification model to predict the scene sample classification results.
[0118] The convolutional neural network classification model chosen is ResNet50. The model initialization parameters are: optimizer SGD, learning rate 0.0002, number of iterations 200, and batch size 64.
[0119] Step 5: Use the edge information of the pond water body to correct the predicted scene sample classification results, perform pixel-level reconstruction of the corrected classification results, and compare them with the ground truth label image to complete the accuracy assessment. This includes the following sub-steps:
[0120] Step 5.1: Based on the predicted scene sample classification results, execute step 3.3 again to calculate the edge samples in the predicted scene sample classification results, modify the edge samples to the background scene, so as to better remove the edges of the pond water body, improve the edge extraction accuracy, and form the final prediction results of the original scene classification dataset.
[0121] Step 5.2: Based on the correspondence between scene sample images and sampling points, and building upon the results of Step 5.1, assign values to the categories of the sampling points; calculate the mode of the categories of the sampling points contained in a single object unit, and assign all pixels of the object unit to a single category, thereby completing the pixel-level result restoration and obtaining a high-resolution image of the accurately extracted pond water body; the final result image is shown below. Figure 5 As shown.
[0122] Step 5.3: Based on the truth label map, evaluate the accuracy of the pixel-level results from Step 5.2 using five metrics: accuracy, precision, recall, balanced F-score, and intersection-union ratio (mIoU).
[0123] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should be considered within the scope of protection of the present invention.
Claims
1. A method for extracting pond water bodies from high-resolution images supported by object-oriented convolutional neural networks, characterized in that, Includes the following steps: Step 1: Collect high-resolution remote sensing image data and preprocess the high-resolution remote sensing image data. The preprocessing includes image cropping, geometric correction and RGB band selection to obtain high-resolution images of pits and ponds, and label the pits and ponds in the high-resolution images to generate a ground truth label map of the pits and ponds. Use an unsupervised method to segment the high-resolution images of pits and ponds to obtain multiple object units, and extract scene sample sampling points for each object unit. Step 2: Extract the features of each object unit one by one, set the threshold of the object unit features and the default size of the scene sample, and calculate the scene sample size of different object units based on the quantitative relationship between the object unit features and the threshold. Using the scene sample sampling point as the center point, the scene samples are adaptively cropped according to size. The scene samples generated by the cropping form an original scene classification dataset without classification labels. Step 3: Extract edges from the high-resolution images of the pond water bodies and calculate the edge threshold of the extracted edge results; set a purity threshold based on the true value label map of the pond water bodies. Calculate the edge proportion of scene samples, compare the quantitative relationship between the edge proportion and the edge threshold, calculate the purity proportion of scene samples, compare the quantitative relationship between the purity proportion and the purity threshold, remove edge samples and low-purity samples, and obtain the optimized scene classification dataset; Step 3 includes the following sub-steps: Step 3.1: Extract edges from the high-resolution pit and pond water images using the Canny operator based on the second derivative, and perform intersection-union ratio (IU / R) calculation with the ground truth label image of the pit and pond water bodies. Iterate the parameters to obtain the optimal edge extraction result image. Binarize the edge extraction result image, calculate the proportion of edge pixels to the total number of pixels in the image, and obtain the edge threshold. The specific formula for calculating the edge threshold, which involves calculating the proportion of edge pixels to the total number of pixels in the image, is as follows: In the formula, Point is the edge threshold. Edge Point represents the number of edge pixels in the edge extraction result image. All This represents the total number of pixels in the edge extraction result image; Step 3.2: Based on the ground truth label map of the pond water body, calculate the ratio of the number of pixels of the pond water body in the label map to the total number of pixels of the high-resolution pond water body image, and use it as the purity threshold of the scene sample. The formula is as follows: In the formula, Point is the purity threshold. true Point represents the number of pixels representing the water bodies in the ponds in the truth label image. All This represents the total number of pixels in the high-resolution image of the pond water body. Step 3.3: Calculate the ratio of edge pixels to total pixels in a single scene sample image. The calculation formula is as follows: in, Point represents the edge weight of the scene sample. UnitEdge Point represents the number of edge pixels in an object unit. UnitAll This represents the total number of pixels in the object unit. Compare the relationship between the edge weight of scene samples and the edge threshold. If the edge weight of a scene sample is not lower than the edge threshold, it is an edge sample. If the edge weight of a scene sample is lower than the edge threshold, it is a non-edge sample. Step 3.4: Calculate the ratio of target pixels to total pixels in a single scene sample as the purity of the scene sample image, using the following formula: in, Point represents the purity of the scene samples. Unitkt Point represents the number of pixels representing the water bodies in the pond within the object unit. UnitAll This represents the total number of pixels in the object unit. Compare the relationship between the purity of the scene sample and the purity threshold. If the purity of the scene sample is not lower than the purity threshold, it is a high-purity sample. If the purity of the scene sample is lower than the purity threshold, it is a low-purity sample. Step 3.5: Label the edge samples, non-edge samples, high-purity samples, and low-purity samples in the original scene classification dataset with corresponding values. Treat the edge samples and low-purity samples in the original scene classification dataset as invalid samples. After removing the invalid samples, label the target scene and background scene of the scene samples in the scene classification dataset after removing invalid samples with different values according to the scene category corresponding to the point at the same position as the sampling point of the scene sample in the ground truth label map of the pond water body. Generate the optimized scene classification dataset, where the target scene is the pond water body. Step 4: Feed the optimized scene classification dataset and the ground truth label map of the pond water body into the convolutional neural network classification model for model training and parameter iterative optimization; after training, feed the original scene classification dataset into the trained neural network classification model to predict the scene sample classification results. Step 5: Combine the edge threshold and the edge ratio of scene samples to correct the predicted scene classification results, reassign the scene sample categories for edge scenes to form the final scene classification results, and assign the scene sample sampling points; calculate the mode of the category of the scene sample sampling points in the object unit, assign the object unit category, restore the object unit to the pixel-level results and evaluate the accuracy.
2. The method for extracting pond water bodies from high-resolution images supported by object-oriented convolutional neural networks according to claim 1, characterized in that, In step 1, the extraction of object units and scene sample points using an unsupervised method specifically involves: An image multi-scale segmentation algorithm is used to extract unsupervised object units. The optimal segmented object unit is obtained by iterating the shape factor and compactness factor parameters. Set area threshold, density threshold, area influence factor and density influence factor, use binary tree sampling method to calculate the number weight of sampling points, and combine the total number of pixels of object unit to calculate the number of scene sample sampling points one by one; The number of scene sample points is used as the number of K-Means cluster points. The location of each scene sample point is calculated and the Euclidean distance is used to round the coordinates of the sample point locations, thus forming a scene sample point file.
3. The method for extracting pond water bodies from high-resolution images supported by object-oriented convolutional neural networks according to claim 1, characterized in that, Step 2 includes the following sub-steps: Step 2.1: Extract the features of a single object unit, including length, width, and aspect ratio; Step 2.2: Set the aspect ratio threshold, the default size of the scene sample, and the minimum size. Compare the quantitative relationship between the aspect ratio and the aspect ratio threshold. If the aspect ratio is less than the aspect ratio threshold, the default size is used to crop the scene sample. If the aspect ratio is not less than the aspect ratio threshold, the quantitative relationship between the length and the width is compared, and the smaller one is selected as the larger size after cropping. If the length or width is lower than the minimum size limit, the minimum size is selected to crop the scene sample. Step 2.3: Based on the scene sample clipping size set in Step 2.2, calculate the coordinates of the four corners of the clipping rectangle with the scene sample sampling point as the center point. If it exceeds the boundary limit of the object unit, the scene sample is clipped according to the boundary to form the original scene classification dataset.
4. The method for extracting pond water bodies from high-resolution images supported by object-oriented convolutional neural networks according to claim 1, characterized in that, In step 4, the neural network classification model selected is ResNet50, and the parameters include the optimizer SGD, learning rate, number of iterations, and batch size.
5. The method for extracting pond water bodies from high-resolution images supported by object-oriented convolutional neural networks according to claim 1, characterized in that, Step 5 includes the following sub-steps: Step 5.1: Based on the classification results of the obtained original scene classification dataset, execute step 3.3 again to correct the classification results corresponding to the edge scene to the background value; Step 5.2: Assign scene sample sampling points to the corrected scene classification results, calculate the mode of the category of scene sample sampling points in the object unit, assign the category corresponding to the mode to all pixels in the object unit, and complete the pixel-level result restoration; Step 5.3: Based on the truth label map, evaluate the accuracy of the pixel-level results.
6. The method for extracting pond water bodies from high-resolution images supported by object-oriented convolutional neural networks according to claim 2, characterized in that, The method of using a binary tree sampling approach to calculate the weight of the number of sampling points, combined with the total number of pixels in the object unit, specifically calculates the number of scene sample sampling points one by one as follows: A binary tree sampling point weight calculation matrix is constructed based on the area and density characteristics of the object unit. The weight of the number of scene sample sampling points for a single object unit is calculated using a binary tree sampling algorithm. Combined with the total number of pixels in the object unit, the number of sampling points for each object unit is obtained. The specific calculation formula is as follows: Posum=1.5*(Pts / 100)*matrix k In the formula: Pts represents the total number of pixels in the object unit, matrix represents the weight in the binary tree sampling point weight calculation matrix, k represents the ordinal number of the element in the weight calculation matrix, and Posum represents the final number of sampling points obtained by rounding up after calculating the number of sampling points.
7. The method for extracting pond water bodies from high-resolution images supported by object-oriented convolutional neural networks according to claim 2, characterized in that, The specific steps involve using the number of scene sample sampling points as the number of K-Means clustering points, calculating the position of each scene sample sampling point and rounding the sampling points using Euclidean distance: The formula for calculating K-Means clustering is as follows: In the formula: x i Let y be the x-coordinate of the sampling point. i Let be the ordinate of the sampling point, i be the sampling point number, and n be the total number of sampling points; After K-Means values are obtained, if floating-point data is present, Euclidean distance is used to calculate the location of the nearest sampling point to the floating-point data, and the final scene sample sampling point location is rounded up.
8. The method for extracting pond water bodies from high-resolution images supported by object-oriented convolutional neural networks according to claim 1, characterized in that, In step 3.1, the specific steps of edge extraction using the Canny operator include: Step 3.1.1: Gaussian filter smoothing of the image G(x,y)=F(x,y)*H(x,y) In the formula, G(x,y) is the filtered image, F(x,y) is the original image, and H(x,y) is the Gaussian function. In the formula, (x,y) are the pixel coordinates, and σ is the standard deviation; Step 3.1.2: Calculate the gradient of the filtered image using the finite difference of the first-order partial derivative; Step 3.1.3: Suppress non-maximum gradient values using gradient magnitude; Step 3.1.4: Detect and connect edges using a double threshold algorithm.
Citation Information
Patent Citations
Depth image object edge extraction method, device, medium and computer equipment
CN108830873A
Image annotation method and device, image semantic segmentation method and device and model training method and device
CN112734775A