Method and system for extracting water elements from satellite images and generating water system vector elements
Through multi-field adaptive fusion network and bridge detection technology, the water mask and bridge location are optimized, and the accuracy of water body element extraction and water system vector generation is solved in large-format satellite image, achieving high-precision water body recognition and water system vectorization.
Patent Information
- Application Number
- CN202310988773.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-07
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2043-08-07
AI Technical Summary
The prior art is difficult to adapt to the extraction of water element elements of large-format satellite images, especially in complex scenarios, where bridge targets across water bodies cannot be processed, and large-format satellite images cannot be directly processed, resulting in poor stability and universality of water element extraction and inaccurate generation of water system vectors.
A multi-field adaptive fusion network is used to extract water body elements, combined with the bridge position detection network and the contour point mobile network, through multi-field adaptive fusion and cross-window consistency constraints, the water mask and bridge position rectangular frame are optimized to generate vector extraction results for the entire water system elements.
It improves the accuracy of water body elements extraction and the accuracy of water system vector generation, can handle the cross-water bridge target, avoids the splicing problem between image tiles, and improves the continuity and integrity of water body elements.
Smart Images

Figure CN117132887B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the interdisciplinary technical field of remote sensing data and artificial intelligence, and relates to a method and system for extracting water body elements and generating water system vector elements from satellite images. Specifically, it relates to a method and system for extracting water body elements and generating water system vector elements from large-format satellite images based on the integration of semantic segmentation and vector generation. The method includes a large-format water body extraction scheme with multi-field adaptive fusion and cross-window consistency constraints, a bridge rotation detection scheme based on a sample sampling optimization strategy, and a water system (water body + bridge) vector generation scheme based on a contour point movement model that integrates bridge information. Background Art
[0002] As one of the fundamental components of the Earth, water is not only essential to natural ecosystems but also closely intertwined with human life, such as health, energy, and power generation. In recent years, with the rapid development of remote sensing Earth observation capabilities and technologies in various fields, such as artificial intelligence, it has become possible to automatically extract water bodies from remote sensing imagery. Against the backdrop of increasing global water scarcity, water extraction and water system vector feature generation technologies for large-scale remote sensing imagery can be widely applied to tasks such as water resource assessment, environmental protection, and urban planning, attracting the attention of numerous researchers in the remote sensing field. Extracting water masks and generating water system vector features are fundamental to subsequent spatial statistical analysis, modeling water dynamics, and making decision-making plans.
[0003] The difficulties in extracting water features and generating water system vector elements from satellite imagery are primarily due to factors such as the shape, scale, distribution diversity, scene complexity, boundary complexity, and spectral diversity of water features in remote sensing imagery. Water bodies include rivers, irrigation canals, ponds, lakes, and oceans, which vary greatly in shape and scale. Relying solely on spectral characteristics or morphological algorithms makes it difficult to extract all water body information using a single paradigm. Compared to natural images, remote sensing images feature large formats, multiple channels, and metadata such as imaging time and geographic coordinates. With the rapid advancement of remote sensing sensor technology, full-scene imagery acquired from observation platforms can cover areas ranging from approximately 500 to over 2,500 square kilometers. Large-format satellite imagery can simultaneously provide macroscopic structural information and microscopic detail. A global perspective facilitates holistic understanding of large-format imagery, while a local perspective provides precise, detailed information. Similar to the human visual pattern, a comprehensive consideration of these two perspectives can achieve better water feature extraction. Due to GPU memory limitations, current mainstream deep learning-based semantic segmentation methods for large-scale satellite imagery typically employ downsampling or cropping to smaller image tiles. First, downsampling inevitably results in a significant loss of detail, resulting in poorly extracted water features. Second, cropping to smaller image tiles compromises the continuity and integrity of water features. A systematic literature review reveals that existing methods primarily focus on improving deep segmentation networks to effectively encode both global and local information. However, there remains significant research interest in optimizing data utilization by integrating the characteristics of water features. Therefore, considering the characteristics of large-scale remote sensing imagery and the topological continuity of water features, it is crucial to investigate the structural design and optimization of deep semantic segmentation networks that can exploit a wide range of context and eliminate the blocking effect during network inference.
[0004] Furthermore, compared to raster data, vector data offers the advantages of facilitating spatial analysis and rapid information query. However, there remains a significant gap between pixel-level semantic segmentation results and cartographic-level feature extraction requirements. Therefore, achieving high-precision, automated vector mapping of natural features using remote sensing imagery is also a hot research topic. First, compared to typical objects or buildings, water features exhibit more complex geometric shapes. Remote sensing imagery primarily includes lakes, large and small rivers, and other typical morphological types, encompassing diverse geometric features such as surfaces, blocks, and strips, as well as special shapes such as circles. Furthermore, water features in satellite imagery exhibit strong connectivity, necessitating the generation of water system vectors for large-format satellite imagery. Existing methods are unable to directly perform vector modeling for large-format imagery. For natural features such as water systems that require greater context, more effective utilization of the global contextual information contained in large-format satellite imagery can improve vector extraction in complex scenes while minimizing the problem of vector feature splicing between image tiles. Furthermore, bridges within a river system, which represent the presence of water bodies, are often not extracted by semantic segmentation methods, resulting in inaccurate river system vectors. Therefore, further consideration and completion of bridges within a river system is necessary to form a complete and connected river system vector. Summary of the Invention
[0005] The present invention mainly aims to solve the problems existing in existing technical solutions for extracting water elements from satellite images, such as the difficulty of adapting the model to large-scale water extraction scenarios, poor stability and universality of water element extraction, and the lack of method optimization for large-scale remote sensing images. However, existing technical solutions for generating water system vectors for satellite images have limitations such as the inability of the algorithm to adapt to water system vector generation tasks under complex scene conditions, the inability to process targets such as bridges across water bodies, and the inability to directly process large-scale satellite images. In response to the above problems and challenges, the present invention proposes a method and system for extracting water elements and generating water system vector elements from large-scale satellite images based on the integration of semantic segmentation and vector generation, which can achieve high-precision extraction of water elements and detection of targets across water bridges in large-scale satellite images, and comprehensively generate accurate water system vectors.
[0006] The technical solution adopted by the method of the present invention is: a method for extracting water body elements and generating water system vector elements from satellite images, which uses a multi-field adaptive fusion network to extract water body elements and obtain water body mask results; uses a bridge position detection network to detect bridges and obtain bridge position rectangular frames; based on the water body mask results, uses a contour point moving network to obtain water system contours; and combines the water body mask results, bridge position rectangular frames and water system contours to obtain vector extraction results of all water system elements.
[0007] As an advantage, the multi-field adaptive fusion network is composed of an image pyramid construction module and a feature adaptive fusion module. The image pyramid construction module is used to downsample the original large-format image to N 2 The image groups with the same size are cropped by times, N times and keeping the original resolution, and an image pyramid containing three fields of view is constructed, which are recorded as View1, View2 and View3; the feature adaptive fusion module is composed of a basic feature extraction network, a CBRCS module and an attention module.
[0008] The basic feature extraction network is a classic DeepLabv3+ network, which includes an Encoder and a Decoder for extracting basic features from images of three fields of view.
[0009] The CBRCS module consists of five network layers arranged in series, which refine the basic features extracted from the three fields of view to generate a water body probability map. The first layer is a convolution layer with a kernel size of 3 and a stride of 1; the second layer is a batch normalization layer; the third layer is a Relu activation layer; the fourth layer is a convolution layer with a kernel size of 3 and a stride of 1; and the fifth layer is a Sigmoid activation layer.
[0010] The attention module calculates a pixel-level weight map for the features output by the basic feature extraction network. The feature maps corresponding to the three fields of view are concatenated along the channel dimension. Feature dimensionality reduction is then performed using a convolution kernel of size 1, followed by a softmax activation operation to generate a pixel-level weight map. Finally, the water body probability maps from the three fields of view are multiplied and summed with the pixel-level weight map to produce the final adaptively fused water body prediction result.
[0011] As an advantage, the multi-field adaptive fusion network is a trained network; the loss function L used in the training process is composed of the cross entropy loss L CE and cross-window consistency constraint loss L BCC constitute;
[0012] L=L CE +λ BCC ·L BCC ;
[0013] Among them, λ BCC is the weight to bias the cross-window consistency loss.
[0014] For View1 and View2, only the cross entropy loss function is used to supervise the output water body probability map and the corresponding water body label;
[0015]
[0016] Among them, y i is the true value label of the category, x i is the probability value predicted by the corresponding layer of the multi-field adaptive fusion network, and N is the total number of pixels;
[0017] For View3, adjacent overlapping image tiles are defined as a four-tuple (X1, X2, X3, X4). The pixel-level consistency dependency between the overlapping areas is mined. Label prior information is introduced to constrain water and non-water areas, as well as difficult and easy samples, with different weights, so that the network focuses more on training in difficult water areas.
[0018]
[0019] in, The square of the Euclidean distance between the overlapping features of adjacent tiles is defined as x k with x l Represents the predicted probability value of the overlapping area between adjacent tiles; y k Represents the category label between overlapping areas, 1 represents water body and 0 represents non-water body; λ is the category weight factor; γ is another adjustment factor, which can make the network more biased towards the training of difficult samples; is the importance factor, which helps the network focus only on the importance differences of semantic category changes. is the predicted category value of the overlapping area between two adjacent tiles, 0.5 is the default category distinction threshold, and "1" is a common expression of the formula, which means that it takes 1 if the equation in the brackets is satisfied and takes 0 if it is not satisfied.
[0020] Preferably, the bridge position detection network adopts a conventional rotation target detection network and adopts a positive and negative sample sampling optimization strategy;
[0021] First, let the pixel points within the true value frame be the candidate sample points, assume that the jth true value frame is assigned to the i-th candidate sample point, and calculate the two-dimensional distance d from the sample point to the center of the corresponding true value frame ij ; According to the width and height w of the jth true value box j ,h j Assign it to the feature map of the corresponding scale, and press d on the feature map of this layer ij Sort the candidate sample points corresponding to the true value label box in descending order, take the top k samples according to the ratio as candidate positive samples; obtain a candidate positive sample p according to the category prediction branch k Semantic key point category score Pt_cls corresponding to the candidate prediction box k , get the overall category score Pre_cls of the candidate prediction boxk ;
[0022]
[0023] Among them, λ c is a balance parameter used to adjust the proportion of category scores; n is the number of semantic key points corresponding to the sample;
[0024] Then the candidate positive sample p is obtained from the positioning branch k The obtained candidate prediction box and the corresponding true value box intersection ratio are used to calculate the quality weight score w k ;
[0025] w k =IoU kj ×Pre_cls k ;
[0026] Among them, IoU kj The intersection-over-union ratio of the candidate prediction box obtained for the sample and the corresponding true value box j;
[0027] to w k Sort the samples and select the largest k′ positive samples as the positive samples for the final loss calculation. The remaining candidate positive samples are regarded as ignored samples, and the other samples are regarded as negative samples.
[0028] Preferably, the bridge position detection network is a trained network; the loss function used in the training process is:
[0029] L total =λ1L regress +λ2L class ;
[0030] Among them, L regress Represents regression loss, calculated using GIOU Loss, L class Represents the classification loss, calculated using FocalLoss, with coefficients λ1 and λ2 being weighted parameters.
[0031] Preferably, the contour point moving network as a whole is composed of a boundary tracking module and a point probability prediction module.
[0032] The boundary tracking module is used to obtain the rough contour points of the water system based on the binary raster image of the water body, and uses a boundary tracking method based on the nearest point;
[0033] The point probability prediction module consists of a basic feature extraction network and a CBR module. The basic feature extraction network adopts the classic HRNet structure. The CBR module includes three network layers arranged in series and two branches connected in parallel. The first layer is a convolution layer with a kernel size of 3 and a stride of 1; the second layer is a batch normalization layer; and the third layer is a Relu activation layer. The features then enter two branches: a mask branch and a probability branch. The mask branch consists of a convolution layer with a kernel size of 1 and the number of channels equal to the base feature dimension, connected in series with a Sigmoid activation layer. The probability branch consists of a convolution layer with a kernel size of 1 and the number of channels equal to the base feature dimension + 1, used to generate water body mask probability maps and contour probability maps.
[0034] Input image tiles and the water body segmentation results predicted by the multi-field adaptive fusion network. The boundary tracking module obtains the rough contour points of the water system based on the binary raster image of the water body. The image tile is obtained with the rough contour point as the center as the network input, and the feature information of the tile is obtained through the feature extraction module. The feature information is input into the CBR module to obtain the corresponding water body mask probability map on the tile image. The feature map and the water body probability map are spliced on the channel. The CBR module then outputs the contour point probability map. The coordinates of the top-one value in the point probability map are the precise contour points corresponding to the center of the image tile (i.e., the semantic segmentation rough contour point). At the same time, this value is also used to describe the accuracy of the network output result. For the label production used to calculate the loss, the precise contour points are selected in the label data based on the proximity principle according to the rough contour points. The water body mask information of the image tile and the image-level labels of the precise contour points are produced. The water body mask labels are directly cropped from the corresponding labels of the large-format water body image. For the image-level labels of the precise contour points, the values are assigned to the all-zero matrix according to the following formula.
[0035]
[0036] Where (X, Y) is the coordinate of the exact contour point, (x, y) is the coordinate of each point on the label image, and r is the kernel radius.
[0037] Preferably, the contour point moving network is a trained network; the loss function used in the training process is:
[0038] L=L CE (mask,gt_mask)+λ*MSE(fp(hm),fp(gt_hm));
[0039] Among them, mask is the water body probability map output by the network, gt_mask is the water body label, hm is the point probability map output by the network, gt_hm is the Gaussian kernel point label; fp(*) represents the flattening operation, that is, flattening the two-dimensional tensor into a one-dimensional tensor, L CE (*) is the cross entropy loss function, MSE(*) is the mean square error loss function; λ is the weighting parameter.
[0040] Preferably, the water body mask result, the bridge position rectangular frame and the water system contour are combined to obtain the vector extraction result of the whole water system element; the specific implementation process is: determine the points on the water body mask contour that need to be optimized: superimpose the water body mask and the bridge position, obtain the intersection with the water body contour line by enlarging the bridge rectangular frame, optimize the above intersections, input the image tiles centered on these points one by one into the contour point moving network, output the expected precise contour point and the probability that the point is a water body contour point, if this probability is less than the threshold, delete the point, otherwise use the contour point output by the network to replace the original semantic segmentation contour point; finally, connect the optimized intersections to realize the extraction of all water system elements.
[0041] The technical solution adopted by the system of the present invention is: a system for extracting water elements from satellite images and generating water system vector elements, comprising:
[0042] one or more processors;
[0043] A storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method for extracting water elements from satellite images and generating water system vector elements.
[0044] Compared with the existing water system vector generation method for satellite images, the present invention has the following advantages and positive effects:
[0045] (1) The present invention uses a water element extraction network based on multi-field adaptive fusion and cross-window consistency constraints to integrate information from multiple fields of view of large-scale satellite images and explore the topological continuity of water elements in large-scale satellite images, thereby improving the continuity and integrity of water elements and enhancing the accuracy of water element extraction. The water element extraction of large-scale satellite images can achieve high-precision water body identification;
[0046] (2) Based on the shape characteristics of bridges, this paper proposes a novel bridge detection method, incorporating the characteristics of rotating targets into the sampling strategy and loss function design, which is more suitable for bridges with extreme aspect ratios and makes the water system vectorization unaffected by interference from water targets such as bridges;
[0047] (3) The present invention designs a water body contour optimization method for directly processing large-scale satellite images. Without losing contour information, the positions of water system contour points are adjusted in a learnable manner, and the water system contours are vectorized by taking into account semantic and shape features. Accurate water system vector results are generated in combination with bridge detection results, effectively improving the accuracy of vectorization of water body elements in large-scale satellite images. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The technical solution of this invention is further illustrated below using embodiments and specific implementation methods. In addition, some drawings are used in the process of illustrating the technical solution. Those skilled in the art can also derive other drawings and the intent of the present invention based on these drawings without making any creative efforts.
[0049] Figure 1 : is an overall principle diagram of an embodiment of the present invention.
[0050] Figure 2 : is a flow chart of a method according to an embodiment of the present invention.
[0051] Figure 3 : This is a diagram of the multi-field adaptive fusion network structure of an embodiment of the present invention.
[0052] Figure 4 : A schematic diagram of the overlapping dependency relationship of large-format image quadruples in a multi-field adaptive fusion network according to an embodiment of the present invention.
[0053] Figure 5 : A schematic diagram explaining the principle of importance factors in a multi-field adaptive fusion network according to an embodiment of the present invention.
[0054] Figure 6 : This is a network structure diagram of bridge rotation detection based on sample sampling optimization strategy according to an embodiment of the present invention.
[0055] Figure 7 : This is a structural diagram of the contour point moving network according to an embodiment of the present invention.
[0056] Figure 8 : A schematic diagram of the water system vector connectivity results according to an embodiment of the present invention. DETAILED DESCRIPTION
[0057] In order to facilitate ordinary technicians in this field to understand and implement the present invention, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the implementation examples described herein are only used to illustrate and explain the present invention and are not used to limit the present invention.
[0058] Please see Figure 1 and Figure 2The present invention provides a method for extracting water body elements and generating water system vector elements from satellite images. The method extracts water body elements through a multi-field adaptive fusion network to obtain a water body mask result. The method detects bridges through a bridge position detection network to obtain a bridge position rectangular frame. Based on the water body mask result, the method obtains the water system contour through a contour point moving network. The method combines the water body mask result, the bridge position rectangular frame and the water system contour to obtain a vector extraction result of all water system elements.
[0059] In one embodiment, see Figure 3 The multi-field adaptive fusion network structure takes the original large-format satellite image data as input. It is a deep learning model with a pyramid structure and consists of two parts: the image pyramid construction module and the feature adaptive fusion module. The image pyramid construction module is used to downsample the original large-format image to N 2 The image groups with the same size are cropped by times, N times and keeping the original resolution, and an image pyramid containing three fields of view is constructed, which are recorded as View1, View2 and View3; the feature adaptive fusion module is composed of a basic feature extraction network, a CBRCS module and an attention module.
[0060] The basic feature extraction network is a classic DeepLabv3+ network, which includes an Encoder and a Decoder for extracting basic features from images of three fields of view.
[0061] The CBRCS module consists of five network layers arranged in series, which refine the basic features extracted from the three fields of view to generate a water body probability map. The first layer is a convolution layer with a kernel size of 3 and a stride of 1; the second layer is a batch normalization layer; the third layer is a Relu activation layer; the fourth layer is a convolution layer with a kernel size of 3 and a stride of 1; and the fifth layer is a Sigmoid activation layer.
[0062] The attention module calculates a pixel-level weight map for the features output by the basic feature extraction network. The feature maps corresponding to the three fields of view are concatenated along the channel dimension. Feature dimensionality reduction is then performed using a convolution kernel of size 1, followed by a softmax activation operation to generate a pixel-level weight map. Finally, the water body probability maps from the three fields of view are multiplied and summed with the pixel-level weight map to produce the final adaptively fused water body prediction result.
[0063] In one embodiment, the multi-field adaptive fusion network is a trained network; the loss function used in the training process is composed of cross entropy loss and cross-window consistency constraint loss, as shown in Formula 1.
[0064] L=LCE +λ BCC ·L BCC (Formula 1) Where, L CE is the cross entropy loss commonly used in semantic segmentation tasks, λ BCC and L BCC The weight and value of the bias cross-window consistency loss proposed in this patent.
[0065] For View1 and View2, only the cross entropy loss function is used to supervise the output water body probability map and the corresponding water body label, as shown in Formula 2.
[0066]
[0067] Among them, y i is the true value label of the category, x i It is the predicted probability value after the multi-field adaptive fusion network, and N is the total number of pixels.
[0068] For the network training phase of View3, adjacent overlapping image tiles are defined as a quadruple (X1, X2, X3, X4), such as Figure 4 As shown in Equation 3, the pixel-level consistency dependency between overlapping areas is mined; and label prior information is introduced to constrain water and non-water areas, and difficult and easy samples with different weights, so that the model pays more attention to the training of difficult water areas, as shown in Equation 3.
[0069]
[0070] Among them, l2 represents the square of the Euclidean distance of the overlapping area features of adjacent tiles, which can be defined as x k with x l Represents the predicted probability value of the overlapping area between adjacent tiles; y k Represents the category label between overlapping areas, 1 represents water body, 0 represents non-water body; λ is the category weight factor; γ is another adjustment factor, which can make the model more biased towards the training of difficult samples. Figure 5 As shown, the importance factor in Equation 3 is The helper model only focuses on the importance difference of semantic category changes, which is defined as shown in Formula 4.
[0071]
[0072] in, is the predicted category value of the overlapping area between two adjacent tiles, 0.5 is the default category distinction threshold, and "1" is a common expression of the formula, which means that if the equation in the brackets is satisfied, it is 1, and if it is not satisfied, it is 0. In one embodiment, the bridge position detection network can be found in Figure 6By optimizing the conventional positive and negative sample sampling method in the conventional rotation target detection network, higher quality samples are obtained to enhance the learning of the shape features of the bridge target.
[0073] The specific optimization strategy for positive and negative sample sampling is as follows: first, let the pixel points within the true value frame be the candidate sample points, let the jth true value frame be assigned to the ith candidate sample point, and calculate the two-dimensional distance d from the sample point to the center of the corresponding true value frame. ij . According to the width and height w of the jth true value box j ,h j Assign it to the feature map of the corresponding scale, and press d on the feature map of this layer ij Sort the candidate sample points corresponding to the true value frame in descending order, and take the top k samples according to the ratio as candidate positive samples. According to the category prediction branch, a candidate positive sample p is obtained. k Semantic key point category score Pt_cls corresponding to the candidate prediction box k , get the overall category score Pre_cls of the candidate prediction box k , calculated as shown in Formula 5.
[0074]
[0075] Among them, λ c is a balance parameter used to adjust the proportion of category scores; n is the number of semantic key points corresponding to the sample. Then the candidate positive sample p is obtained by the positioning branch k The obtained candidate prediction box and the corresponding true value box intersection ratio are used to calculate the quality weight score w k , as shown in formula 6.
[0076] w k =IoU kj ×Pre_cls k (Style Lu)
[0077] Among them, IoU kj Pre_cls is the intersection-over-union ratio of the candidate prediction box obtained for the sample and the corresponding true value box j; k is the overall category score obtained for formula Lu. k Sort the samples and select the largest k′ positive samples as the positive samples for the final loss calculation. The remaining candidate positive samples are regarded as ignored samples, and the other samples are regarded as negative samples.
[0078] In one embodiment, the bridge position detection network is a trained network; the loss function used in the training process is defined as shown in Formula 7.
[0079] L total =λ1L regress +λ2L class(Formula 7) Among them, L regress Represents regression loss, calculated using GIOU Loss, L class Represents classification loss, calculated using Focal Loss, with coefficients λ1 and λ2 being weighted parameters.
[0080] In one embodiment, the contour point moving network is composed of a boundary tracking module and a point probability prediction module.
[0081] The boundary tracking module is used to obtain the rough contour points of the water system based on the binary raster image of the water body, and uses a boundary tracking method based on the nearest point;
[0082] The point probability prediction module consists of a basic feature extraction network and a CBR module. The basic feature extraction network adopts the classic HRNet structure. The CBR module includes three network layers arranged in series and two branches connected in parallel. The first layer is a convolution layer with a kernel size of 3 and a stride of 1; the second layer is a batch normalization layer; and the third layer is a Relu activation layer. The features then enter two branches: a mask branch and a probability branch. The mask branch consists of a convolution layer with a kernel size of 1 and the number of channels equal to the base feature dimension, connected in series with a Sigmoid activation layer. The probability branch consists of a convolution layer with a kernel size of 1 and the number of channels equal to the base feature dimension + 1, used to generate water body mask probability maps and contour probability maps.
[0083] Input image tiles and the water body segmentation results predicted by the multi-field adaptive fusion network. The boundary tracking module obtains the rough contour points of the water system based on the binary raster image of the water body. The image tile is obtained with the rough contour point as the center as the network input, and the feature information of the tile is obtained through the feature extraction module. The feature information is input into the CBR module to obtain the corresponding water body mask probability map on the tile image. The feature map and the water body probability map are spliced on the channel. The CBR module then outputs the contour point probability map. The coordinates of the top-one value in the point probability map are the precise contour points corresponding to the center of the image tile (i.e., the semantic segmentation rough contour point). At the same time, this value is also used to describe the accuracy of the network output result. For the label production used to calculate the loss, the precise contour points are selected in the label data based on the proximity principle according to the rough contour points. The water body mask information of the image tile and the image-level labels of the precise contour points are produced. The water body mask labels are directly cropped from the corresponding labels of the large-format water body image. For the image-level labels of the precise contour points, the values are assigned to the all-zero matrix according to the following formula.
[0084]
[0085] Where (X, Y) is the coordinate of the precise contour point, (x, y) is the coordinate of each point on the label image, and r is the kernel radius, which defaults to 5. As can be seen from the above formula, the closer the point is to the precise contour point, the closer its value is to 1, and the farther away, the closer its value is to 0. Gaussian kernel point labeling can clearly locate the target point, which helps deep learning networks learn point information.
[0086] In one embodiment, the contour point moving network is a trained network; the loss function used in the training process is shown in Formula 9. At the test end, a top_one operation is performed on the heat map to find the point coordinates (x, y) with the highest probability value, and the probability value (probability) of whether the point is a water body contour point is output.
[0087] L=L CE (mask,gt_mask)+λ*MSE(fp(hm),fp(gt_hm)) (Formula 9)
[0088] Among them, mask is the water body probability map output by the network, gt_mask is the water body label, hm is the point probability map output by the network, and gt_hm is the Gaussian kernel point label. fp(*) represents the flattening operation, which is to flatten the two-dimensional tensor into a one-dimensional tensor. L CE (*) is the cross entropy loss function, MSE(*) is the mean square error loss function. λ is the weighting parameter.
[0089] In one embodiment, a water system vector post-processing algorithm is designed to integrate the bridge detection results, and the water body mask results, the bridge position rectangle and the water system contour are combined to obtain the vector extraction results of all water system elements. The specific implementation process is: first determine the points on the water body mask contour that need to be optimized: superimpose the water body mask and the bridge position, and obtain the intersection with the water body contour line by appropriately enlarging the bridge rectangle. When the water body contour boundary optimization network (PMnet) optimizes the water body contour line, it will only optimize the intersection and the contour points outside the adjacent intersections; use PMnet to optimize the above points, and input the image tiles centered on these points into the network one by one. The network will output the expected precise contour point and the probability that the point is a water body contour point. If this probability is less than the threshold, the point will be deleted, otherwise the contour point output by the network will replace the original semantic segmentation contour point; finally, the optimized intersections are connected to each other to achieve the extraction of all water system elements. The water system vector connectivity results of this embodiment are as follows: Figure 8 shown.
[0090] The method of the present invention is implemented based on optical remote sensing image data. It is aimed at large-format satellite images and proposes a large-format water body extraction algorithm with multi-field adaptive fusion and cross-window consistency constraints. Different from the semantic segmentation processing method of downsampling or cropping, the method of the present invention can process complete large-format satellite images, and the continuity and integrity of the extracted water body elements are greatly improved. The bridge rotation detection method based on the sample sampling optimization strategy pays more attention to the shape characteristics of the bridge target, and can accurately detect bridge targets with different aspect ratios, effectively solve the problems of missed detection and false alarm, and provide reliable support for the subsequent water system vector generation. The water system (water body + bridge) vector generation algorithm based on the contour point movement model that integrates bridge information comprehensively considers the cross-water bridge target, so that the water system vector generation result is more accurate, more consistent with the real water system boundary contour, and to a certain extent eliminates misjudgment in water body extraction. The present invention solves the problems of existing water system vector generation technology solutions for satellite images, such as the inability of algorithms to adapt to water system vector generation tasks under complex scene conditions, the inability to process targets such as bridges across water bodies, and the inability to directly process large-format satellite images, through a large-format water body extraction method with multi-field adaptive fusion and cross-window consistency constraints. It realizes high-precision extraction of water body elements and detection of cross-water bridge targets in large-format satellite images, effectively improving the accuracy of the generated water system vectors.
[0091] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of protection of the patent of the present invention. Under the guidance of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested by the present invention shall be based on the attached claims.
Claims
1. A method for extracting water elements from satellite images and generating water system vector elements, characterized by: Water body elements are extracted through a multi-field adaptive fusion network to obtain water body mask results. Bridge detection is performed through a bridge position detection network to obtain bridge position rectangles. Based on the water body mask results, the contour point movement network is used to obtain the water system contour. Combining the water body mask results, bridge position rectangles, and water system contours, the vector extraction results of all water system elements are obtained. The multi-field adaptive fusion network is composed of an image pyramid construction module and a feature adaptive fusion module. The image pyramid construction module is used to downsample the original large-format image to N 2 The image groups with the same size are cropped by multiplying the image by 1, N times, and keeping the original resolution, respectively, to construct an image pyramid containing three fields of view, which are recorded as View1, View2, and View3; the feature adaptive fusion module is composed of a basic feature extraction network, a CBRCS module, and an attention module; The basic feature extraction network is a DeepLabv3+ network, which includes an encoder and a decoder for extracting basic features from images of the three fields of view. The CBRCS module includes five network layers arranged in series, which are used to refine the basic features extracted from the three fields of view to obtain a water body probability map. The first layer is a convolutional layer, the second layer is a batch normalization layer, the third layer is a Relu activation layer, the fourth layer is a convolutional layer, and the fifth layer is a Sigmoid activation layer. The attention module is used to calculate the pixel-level weight map for the features output by the basic feature extraction network, concatenate the feature maps corresponding to the three fields of view in the channel dimension, then perform feature dimensionality reduction through the convolution kernel, and then perform a softmax activation operation to obtain a pixel-level weight map; finally, the water body probability maps from the three fields of view and the pixel-level weight map are multiplied and added together to obtain the final adaptive fusion water body prediction result; The bridge position detection network adopts a conventional rotation target detection network and adopts a positive and negative sample sampling optimization strategy; First, let the pixel points within the true value frame be the candidate sample points. The ground truth box is assigned to the candidate sample points, calculate the two-dimensional distance from the sample point to the center of the corresponding true value box According to the The width and height of the ground truth label box Assign it to the feature map of the corresponding scale, on the feature map of this layer Sort the candidate sample points corresponding to the true value label in descending order, according to the proportion Take the front samples as candidate positive samples; a candidate positive sample is obtained according to the category prediction branch Semantic key point category score corresponding to the candidate prediction box , get the overall category score of the candidate prediction box ; ; in, is a balance parameter used to adjust the proportion of category scores; is the number of semantic key points corresponding to the sample; Then the candidate positive samples are obtained from the positioning branch The quality weight score is calculated by the intersection-over-union ratio of the candidate prediction box and the corresponding true value box ; ; in, The candidate prediction box and the corresponding true value box obtained for the sample The intersection and union ratio of right Sort and select the largest positive samples are used as the positive samples for the final loss calculation, the remaining candidate positive samples are regarded as ignored samples, and the other samples are regarded as negative samples.
2. The method for extracting water elements from satellite images and generating water system vector elements according to claim 1, characterized in that: The multi-field adaptive fusion network is a trained network; the loss function used in the training process is By cross entropy loss and cross-window consistency constraint loss constitute; ; in, is the weight to bias the cross-window consistency loss. For View1 and View2, only the cross entropy loss function is used to supervise the output water body probability map and the corresponding water body label; ; in, is the true value label of the category, is the predicted probability value after the multi-field adaptive fusion network, and N is the total number of pixels; For View3, define adjacent overlapping image tiles as a quad , mining the pixel-level consistency dependency between overlapping areas, and introducing label prior information to constrain water and non-water areas, difficult and easy samples with different weights, so that the network pays more attention to the training of difficult water areas; ; in, The square of the Euclidean distance between the overlapping features of adjacent tiles is defined as ; and Respectively represent the predicted probability values of the overlapping areas between adjacent tiles; Indicates the category label between overlapping areas, 1 represents water body and 0 represents non-water body; is the category weight factor; is another adjustment factor, which can make the network more biased towards training difficult samples; is the importance factor, which helps the network focus only on the importance differences of semantic category changes. , is the predicted category value of the overlapping area between two adjacent tiles. 0.5 is the default category distinction threshold. "1" means that if the equation in the brackets is satisfied, it is 1, and if it is not satisfied, it is 0.
3. The method for extracting water elements from satellite images and generating water system vector elements according to claim 1, characterized in that: The bridge position detection network is a trained network; the loss function used in the training process is: ; in, Represents regression loss, calculated using GIOU Loss, Represents classification loss, calculated using Focal Loss, coefficient are weighting parameters respectively.
4. The method for extracting water elements from satellite images and generating water system vector elements according to claim 1, characterized in that: The contour point moving network is composed of a boundary tracking module and a point probability prediction module; The boundary tracking module is used to obtain the rough contour points of the water system based on the binary raster image of the water body, which uses a boundary tracking method based on the nearest point; The point probability prediction module is composed of a basic feature extraction network and a CBR module; the basic feature extraction network is an HRNet structure; the CBR module includes three network layers arranged in series and two branches connected in parallel; the three network layers arranged in series are a convolutional layer, a batch normalization layer, and a Relu activation layer; the features then enter two branches, namely a mask branch and a probability branch, the mask branch is composed of a convolutional layer and a Sigmoid activation layer in series; the probability branch is composed of a convolutional layer and a Sigmoid activation layer in series, and is used to obtain a water body mask probability map and a contour probability map; Input image tiles and the water body segmentation results predicted by the multi-field adaptive fusion network. The boundary tracking module obtains the rough contour points of the water system based on the binary raster image of the water body. The image tiles are obtained with the rough contour points as the center as the network input, and the feature information of the tiles is obtained through the feature extraction module. The feature information is input into the CBR module to obtain the corresponding water mask probability map on the tile image. The feature map and the water probability map are spliced on the channel. The CBR module then outputs the contour point probability map. The coordinates of the top-one value in the point probability map are the precise contour points corresponding to the center of the image tile. The water mask information of the image tile and the image-level labels of the precise contour points are generated. The water mask labels are directly cropped from the corresponding labels of the large-format water image. The image-level labels of the precise contour points are assigned to the all-zero matrix according to the following formula. ; in, are the coordinates of the exact contour points, is the coordinate of each point on the label image, is the nuclear radius.
5. The method for extracting water elements from satellite images and generating water system vector elements according to claim 4, characterized in that: The contour point moving network is a trained network; the loss function used in the training process is: ; in, is the water body probability map output by the network, It is a water body tag. is the point probability map output by the network, is the Gaussian kernel point label; Represents a flattening operation, which flattens a two-dimensional tensor into a one-dimensional tensor. is the cross entropy loss function, is the mean square error loss function; is the weighting parameter.
6. The method for extracting water elements from satellite images and generating water system vector elements according to any one of claims 1 to 5, characterized in that: The water body mask result, the bridge position rectangular frame and the water system outline are combined to obtain the vector extraction result of all the elements of the water system; the specific implementation process is: determine the points that need to be optimized on the water body mask outline: superimpose the water body mask and the bridge position, obtain the intersection with the water body outline by enlarging the bridge rectangular frame, optimize the above intersections, input the image tiles centered on these points one by one into the contour point moving network, output the expected precise contour point and the probability that the point is a water body contour point, if this probability is less than the threshold, delete the point, otherwise use the contour point output by the network to replace the original semantic segmentation contour point; finally, connect the optimized intersections to achieve the extraction of all the elements of the water system.
7. A system for extracting water elements from satellite images and generating water system vector elements, characterized by: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the method for extracting water elements from satellite images and generating water system vector elements as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Water system data processing method and device, electronic equipment and readable storage medium
CN112258539A
Remote sensing image change detection method based on image segmentation and twin neural network
CN113569815A