Method and device for determining water body change area
By performing multiple feature extraction and feature fusion on water images and using the spatiotemporal attention mechanism and image processing technology to determine the water body change area, the problems of noise interference and computational complexity in the existing technology are solved, and high-precision and lightweight water body change detection is achieved.
Patent Information
- Application Number
- CN202510748965.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-06-06
AI Technical Summary
Existing automatic detection technology for water changes is prone to misjudgment due to noise interference in complex environments, has low detection accuracy, and the network structure of deep learning algorithms is complex, making it difficult to meet the needs of lightweight and accurate real-time monitoring.
By performing multiple feature extraction on the water area images of the first period and the second period, obtaining the difference matrix and performing feature fusion, the spatiotemporal attention mechanism and attention mask matrix are used to enhance the features, and the water body change area is determined by combining the water area difference image.
It improves the detection accuracy and completeness of water change areas, enhances the robustness to complex scenes, reduces the computational complexity, and meets the needs of lightweight and real-time monitoring.
Smart Images

Figure CN120259897B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image analysis, and in particular relates to a method and device for determining a water body change area. Background Art
[0002] Water body change detection is a key research direction in the fields of hydrology, water conservancy engineering, and water resources management. Accurately detecting water body changes is of great significance for flood prevention and disaster reduction, water resources scheduling, and ecological protection.
[0003] In recent years, automatic water change detection technology based on image analysis has gained widespread application. This technology uses intelligent cameras to capture water level images and then combines them with image processing or deep learning algorithms to detect areas of water change. Image processing algorithms use threshold segmentation or edge detection techniques to locate water body boundaries and then determine areas of water change based on these boundaries. Deep learning algorithms use convolutional neural network models to extract complex water features and then determine areas of water change based on these complex features.
[0004] However, existing automatic detection technologies for water changes are not only prone to misjudgment due to noise interference in complex environments, resulting in low detection accuracy, but also difficult to meet the needs of lightweight and accurate real-time monitoring due to the complex network structure and low efficiency of deep learning algorithms. Summary of the Invention
[0005] In order to solve the above problems, the present invention discloses a method and device for determining a water body change area.
[0006] The present invention discloses a method for determining a water body change area, comprising the following steps:
[0007] Perform N feature extractions on the first water area image of the first time period and the second water area image of the second time period, respectively, to obtain N first shallow layer feature images corresponding to the first water area image and N second shallow layer feature images corresponding to the second water area image;
[0008] Differences are calculated between the first shallow feature image and the second shallow feature image corresponding to each feature extraction to obtain N difference matrices;
[0009] The first shallow feature image corresponding to each feature extraction is fused with the second shallow feature image to obtain N mixed water area images;
[0010] Perform enhancement processing on N mixed water images respectively to obtain N attention mask matrices;
[0011] A water body change area is determined according to the N difference matrices and the N attention mask matrices.
[0012] Preferably, N mixed water images are enhanced separately to obtain N attention mask matrices, specifically:
[0013] The spatial channel enhancement and temporal channel enhancement are performed on each mixed water image using the spatiotemporal attention mechanism to obtain spatially enhanced images and temporally enhanced images respectively.
[0014] The spatial enhancement image and the temporal enhancement image corresponding to each mixed water area image are fused to obtain N significant feature images;
[0015] Determine the spatiotemporal attention score of each pixel in each salient feature image using an activation function;
[0016] The attention mask matrix corresponding to each salient feature image is determined according to the spatiotemporal attention score of each pixel in each salient feature image.
[0017] Preferably, the water body change area is determined according to the N difference matrices and the N attention mask matrices, specifically:
[0018] Determine the water body change feature map corresponding to each feature extraction according to the difference matrix corresponding to each feature extraction and the attention mask matrix each time, and obtain N water body change feature maps;
[0019] The water body change area is determined according to the N water body change characteristic maps.
[0020] Preferably, the method for determining a water body change area further includes:
[0021] determining a water area difference image according to the first water area image and the second water area image;
[0022] Accordingly, the water body change area is determined according to the N water body change characteristic maps, specifically:
[0023] The water body change area is determined according to the water body differential image and the N water body change characteristic maps.
[0024] Preferably, the water body change feature map corresponding to each feature extraction is determined according to the difference matrix corresponding to each feature extraction and the attention mask matrix each time, and N water body change feature maps are obtained, specifically:
[0025] Determine the Nth fused image according to the difference matrix corresponding to the Nth feature extraction and the Nth attention mask matrix;
[0026] The Nth fused image is processed Upsampling is performed to obtain the Nth water body change characteristic map;
[0027] According to The difference matrix corresponding to the first feature extraction and the The attention mask matrix determines the Fusion of images;
[0028] Regarding the Fusion image Upsampling the first The water body change characteristic diagram is obtained by analogy, and the first water body change characteristic diagram is obtained.
[0029] Preferably, the Nth fused image is determined according to the difference matrix corresponding to the Nth feature extraction and the Nth attention mask matrix, specifically:
[0030] Determine the first Hadamard product according to the difference matrix corresponding to the Nth feature extraction and the Nth attention mask matrix;
[0031] Upsampling and depth-wise separable convolution are sequentially performed on the first Hadamard product to obtain an Nth fused image.
[0032] Preferably, the water body change area is determined according to the water body difference image and the N water body change characteristic maps, specifically:
[0033] Perform binary processing on each water body change characteristic map;
[0034] Sum N binary-processed water body change characteristic maps to obtain a binary matrix;
[0035] determining a second Hadamard product of the binarization matrix and the water area difference image;
[0036] The water body change area is determined according to the second Hadamard product.
[0037] The present invention also discloses a device for determining a water body change area, comprising:
[0038] A feature extraction module is used to perform N feature extractions on the first water area image of the first time period and the second water area image of the second time period, respectively, to obtain N first shallow layer feature images corresponding to the first water area image and N second shallow layer feature images corresponding to the second water area image;
[0039] A difference determination module is used to calculate the difference between the first shallow feature image and the second shallow feature image corresponding to each feature extraction to obtain N difference matrices;
[0040] A feature fusion module is used to fuse the first shallow feature image and the second shallow feature image corresponding to each feature extraction to obtain N mixed water area images;
[0041] The feature enhancement module is used to enhance N mixed water images separately to obtain N attention mask matrices;
[0042] A water body determination module is used to determine a water body change area based on the N difference matrices and the N attention mask matrices.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] (1) The present invention obtains the difference matrix between the first shallow feature image and the second shallow feature image, thereby reducing the amount of calculation and preliminarily eliminating a large amount of interference information in the first shallow feature image and the second shallow feature image. The attention mask matrix is used to weight the important features in the difference matrix, thereby improving the accuracy of determining the water body change area.
[0045] (2) The present invention fuses the water body change feature map with the water area differential image to achieve multi-scale feature complementarity. Specifically, the water area differential image extracts the coarse-grained information of the global change distribution of the water body, while the water body change feature map extracts the local details of the water body. After the two are superimposed, the edge details of the real change area are retained, and the robustness of the method of the present invention to complex scenes (such as waves and shadows) is enhanced through feature fusion, which significantly improves the integrity and accuracy of the detection of water body change areas. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is a flow chart of the method of the present invention;
[0047] Figure 2 1 is a diagram of an implementation process of the method of the present invention in a twin U-Net network in one embodiment;
[0048] Figure 3 It is a schematic structural diagram of the device of the present invention;
[0049] In the figure, 101 is a feature extraction module; 102 is a difference determination module; 103 is a feature fusion module; 104 is a feature enhancement module; and 105 is a water body determination module. DETAILED DESCRIPTION
[0050] In the following description, specific details such as particular system structures and techniques are provided for purposes of illustration, not limitation, to facilitate a thorough understanding of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present invention with unnecessary detail.
[0051] like Figure 1 As shown, the present invention discloses a method for determining a water body change area, comprising the following steps:
[0052] S1, performing N feature extractions on the first water area image in the first time period and the second water area image in the second time period, respectively, to obtain N first shallow feature images corresponding to the first water area image and N second shallow feature images corresponding to the second water area image;
[0053] It should be noted that each of the first shallow feature images from the second first shallow feature image to the Nth first shallow feature image is obtained by performing feature extraction again on the basis of the image obtained by the previous feature extraction.
[0054] In this embodiment, the value of N is set to 3. In other embodiments, the value of N can be set by those skilled in the art according to actual needs and scenarios.
[0055] Figure 2 This is a schematic diagram of the process of implementing the present invention using the Twin U-Net network. Step S1 is mainly performed in the Twin U-Net network, in a three-layer backbone network composed of EfficientNet units. Each layer of the backbone network is used to perform feature extraction on the first water area image and the second water area image a corresponding number of times:
[0056] First Taking feature extraction as an example, S1 is as follows:
[0057] ;
[0058] ;
[0059] Where, Indicates the The first shallow feature image obtained by secondary feature extraction; Indicates the A second shallow feature image obtained by secondary feature extraction; Indicates the The first shallow feature image obtained by the secondary feature extraction is subjected to convolution processing; Indicates the The second shallow feature image obtained by the secondary feature extraction is subjected to convolution processing; when When it is equal to 1, Indicates that convolution processing is performed on the first water area image. Indicates that convolution processing is performed on the second water area image.
[0060] Preferably, in order to reduce the number of parameters and calculations, the multi-layer backbone network Weights can be shared, that is, in a multi-layer backbone network, When used for convolution processing, the convolution kernel and bias parameters can be set to the same.
[0061] For ease of description, the following steps are The sub-feature extraction is used as an example to illustrate.
[0062] The shallow features in the first water area image and the second water area image include detailed features such as edges, textures, and colors, which are conducive to determining the subtle displacement of the water level line, the gradual pattern of the submerged area, and the turbidity change of the water body, thereby providing a basis for the spatiotemporal attention mechanism to enhance key features in a targeted manner. In addition, the computational cost of extracting shallow features is small, which can improve the accuracy without increasing too much computational burden.
[0063] S2, subtracting the first shallow feature image and the second shallow feature image corresponding to each feature extraction to obtain N difference matrices;
[0064] In this embodiment, each difference matrix is also obtained in the backbone network of the corresponding number of layers. The difference matrix corresponding to the secondary feature extraction The specific solution process is as follows:
[0065] ;
[0066] Where, Indicates the The difference matrix corresponding to the secondary feature extraction.
[0067] Difference Matrix The part with smaller elements or zero reflects the characteristics of the unchanged area of the water body, and the part with larger elements reflects the characteristics of the changed area of the water body or the characteristics of the interference factors.
[0068] According to the above method, the difference matrix corresponding to each feature extraction can be obtained in turn.
[0069] The present invention replaces the traditional feature matching method by obtaining a difference matrix. It only needs to perform a subtraction operation on the first shallow feature image and the second shallow feature image. There is no need to introduce complex operations such as convolution, iterative optimization or high-dimensional feature transformation, which significantly reduces the computational complexity.
[0070] S3, fusing the first shallow feature image and the second shallow feature image corresponding to each feature extraction to obtain N mixed water area images;
[0071] In this embodiment, the The first shallow feature image obtained by feature extraction and the second shallow feature image The specific process of fusion to obtain the corresponding mixed water area image is as follows:
[0072] ;
[0073] Where, Indicates the The mixed water image corresponding to the secondary feature extraction; Indicates the The first shallow feature image obtained by feature extraction Hedi The second shallow feature image obtained by secondary feature extraction Perform cascade splicing processing.
[0074] According to the above method, the mixed water area image corresponding to each feature extraction can be obtained in sequence.
[0075] The present invention fuses the first shallow feature image and the second shallow feature image of different phases while retaining the water body change characteristics in the spatial dimension and the temporal dimension, which helps to obtain the real changes of the water body and eliminate interference. For example, instantaneous reflection information and floating object displacement information may not appear at the same time in the first shallow feature image and the second shallow feature image. When the first shallow feature image and the second shallow feature image are fused, these inconsistent information will be eliminated; further, compared with independently processing the first shallow feature image and the second shallow feature image, processing the mixed water area image can reduce the subsequent parallel calculation amount, and through feature fusion, it can avoid repeated extraction of redundant information, further streamlining the calculation process.
[0076] S4, performing enhancement processing on the N mixed water images respectively to obtain N attention mask matrices;
[0077] Preferably, S4 is specifically:
[0078] S41. Use the spatiotemporal attention mechanism to perform spatial channel enhancement and temporal channel enhancement on each mixed water image, respectively, to obtain a spatially enhanced image and a temporally enhanced image;
[0079] In this embodiment, spatial channel enhancement and temporal channel enhancement are parallel processing processes. Spatial channel enhancement is used to enhance the spatial local features of water bodies in mixed water images, such as water body shape features; temporal channel enhancement is used to enhance the temporal dynamic change features in mixed water images, such as water flow direction, speed and other features.
[0080] Parallel processing can achieve comprehensive perception of the water state by fusing multi-dimensional features of mixed water images (i.e., the spatial local features and temporal dynamic change features of the water body). It can not only accurately depict static spatial structures such as water body boundaries and texture distribution, but also track the temporal evolution laws such as water flow speed and directional fluctuations in real time. This spatiotemporal coordination mechanism effectively improves the accuracy of the method of the present invention in locating water body change areas in complex scenarios.
[0081] In other embodiments, the spatial channel enhancement and the temporal channel enhancement can also be set as a serial processing process. The serial setting is conducive to more in-depth exploration of the intrinsic relationship between the spatial local feature evolution and the temporal dynamic change feature evolution of the water body in the mixed water image.
[0082] S42, fusing the spatially enhanced image and the temporally enhanced image corresponding to each mixed water area image to obtain N significant feature images;
[0083] Specifically, the fusion process is any one of addition, multiplication or splicing.
[0084] like Figure 2 As shown, in this embodiment, spatial channel enhancement, temporal channel enhancement and fusion processing are mainly performed in the attention module of the twin U-Net network. The specific processing process is as follows:
[0085] ;
[0086] Where, For the The salient feature image corresponding to the secondary feature extraction; Represents the normalization function used in mixed water images The mixed water image is independently processed on each feature channel of Perform normalization; represents the convolution operator, Represents mixed water images The number of channels, Representing salient feature images The number of channels, Indicates the number of group convolutions, and the depth of the convolution kernel is 2.
[0087] The present invention generates a significant feature image by fusing spatially enhanced images (extracting local spatial features of water bodies) and temporally enhanced images (extracting temporal dynamic change features of water bodies). This enables the method of the present invention to simultaneously possess the ability to discriminate between spatial details and temporal continuity, thereby improving the accuracy of determining water body change areas under complex interference.
[0088] S43, determining a spatiotemporal attention score for each pixel in each salient feature image using the first activation function;
[0089] S44. Determine an attention mask matrix corresponding to each salient feature image according to the spatiotemporal attention score of each pixel in each salient feature image.
[0090] Specifically, the matrix composed of the spatiotemporal attention scores of each pixel in each salient feature image is used as the attention mask matrix corresponding to each salient feature image.
[0091] This embodiment uses the first activation function based on the semantic relevance and continuity of water body change information on different significant feature images. Calculate the A salient feature image The spatiotemporal attention score of each pixel in , outputting the attention mask matrix , as follows:
[0092] ;
[0093] Preferably, the first activation function We select the parameterized rectified linear unit (PReLU) to improve the gradient vanishing problem through parameter learning. Specifically, PReLU can be expressed as:
[0094] ;
[0095] in, is a learnable parameter less than 1, Represents the salient feature image that undergoes activation processing.
[0096] In this embodiment, each feature extraction has a corresponding set of difference matrices and attention mask matrices.
[0097] S5. Determine the water body change area based on the N difference matrices and the N attention mask matrices. The present invention fuses the difference matrix with the attention mask matrix, retaining the global features in the difference matrix while weighting the key features in the difference matrix pixel by pixel through the attention mask matrix, eliminating noise interference, thereby balancing lightweight calculation and accurate detection.
[0098] Figure 2 The three-layer upsampling convolutional network and discriminator show the process of determining the water body change area based on N difference matrices and N attention mask matrices. Figure 2 As shown, S5 is specifically:
[0099] S51, determining a water body change feature map corresponding to each feature extraction according to a difference matrix corresponding to each feature extraction and an attention mask matrix each time, and obtaining N water body change feature maps; specifically, S51 includes:
[0100] S511, determining an Nth fused image according to the difference matrix corresponding to the Nth feature extraction and the Nth attention mask matrix; specifically, S511 includes:
[0101] S5111, determining a first Hadamard product according to the difference matrix corresponding to the Nth feature extraction and the Nth attention mask matrix;
[0102] S5112. Perform upsampling and depth-wise separable convolution on the first Hadamard product in sequence to obtain an Nth fused image.
[0103] First For example, the first feature extraction The specific process of determining the fused image is as follows:
[0104] ;
[0105] in, Indicates the Fused images, represents depth-wise separable convolution; Represents upsampling; difference matrix and the attention mask matrix The number of values contained in is the same; Represents the first Hadamard product.
[0106] S512, perform the Nth fusion image Upsampling is performed to obtain the Nth water body change characteristic map;
[0107] S513, according to The difference matrix corresponding to the first feature extraction and the The attention mask matrix determines the Fusion of images;
[0108] S514, for Fusion image Upsampling the first Water body change characteristic diagram, and so on, to obtain the first water body change characteristic diagram;
[0109] Specifically, The method for determining the fused image~the first fused image is the same as that for the Nth fused image.
[0110] S52. Determine a water body change area based on N water body change characteristic maps.
[0111] Preferably, S52 is specifically as follows: S521, determining a water area difference image based on the first water area image and the second water area image based on an inter-frame difference method,
[0112] ;
[0113] Where, 、 、 The first and second water area images represent the water area difference image, the first water area image and the second water area image respectively. In the channel Gray value of the pixel at the position; is the height of the first water area image or the second water area image, is the width of the first water area image or the second water area image, is the number of channels of the first water area image or the second water area image.
[0114] In this embodiment, the water area difference image may be determined according to the first water area image and the second water area image based on a background difference method or an optical flow method, which is not specifically limited in this embodiment.
[0115] S522. Determine the water body change area based on the water body differential image and the N water body change characteristic maps.
[0116] The present invention first uses the difference matrix and attention mask matrix corresponding to each feature extraction to gradually obtain multiple different water body change feature maps. This layered processing method can fully explore the correlation and differences between features in the water body change feature maps at different scales, effectively capturing the subtle and significant characteristics of water body changes. At the same time, the water body change area is determined by combining the water area difference image with multiple water body change feature maps. The water area difference image provides intuitive overall change information, while the water body change feature map further refines and strengthens the representation of the change characteristics. The two complement each other, making the final determined water body change area more accurate and comprehensive, and can better meet the accuracy requirements of water body change monitoring in practical applications.
[0117] Preferably, S522 is specifically:
[0118] S5221, using the second activation function to perform binarization processing on each water body change characteristic map;
[0119] S5222, summing N binary-processed water body change characteristic maps to obtain a binary matrix;
[0120] In this embodiment, S5221 to S5222 are specifically:
[0121] ;
[0122] Where, represents a binarized matrix; Indicates the number of channels , a convolution kernel of size 1×1; is the second activation function; Indicates summation; Indicates the Water body change characteristic map.
[0123] Preferably, the second activation function in this embodiment is selected as follows:
[0124] when When , the second activation function is PReLU, which can avoid gradient disappearance and information loss;
[0125] when When , the second activation function is Sigmoid.
[0126] In other embodiments, the second activation function of each layer may also be specified by those skilled in the art, and this embodiment does not limit this.
[0127] Furthermore, other threshold functions or logic functions may be used to perform binarization processing on each water body change characteristic map, which is not specifically limited in this embodiment.
[0128] S5223, determining a second Hadamard product of the binarization matrix and the water area difference image;
[0129] S5224. Determine the water body change area based on the second Hadamard product.
[0130] Specifically, calculate the binarization matrix Difference image with water area In the second Hadamard product, elements with a value of 0 represent non-changing pixels, and elements with a value of 1 represent changing pixels; the combination of all changed pixels is the water body change area.
[0131] The present invention clearly marks the changed pixels and the non-changed pixels through a binarization matrix, and uses the original difference values in the water area differential image to fine-tune the binarization matrix, suppressing the isolated noise interference caused by the misjudgment of the attention mask matrix, and at the same time enhancing the confidence of the real changed area in the water area differential image; finally, the water body change area is accurately output through the second Hadamard product, which significantly improves the anti-interference ability and boundary clarity of the detection results while ensuring lightweight calculation.
[0132] The present invention first obtains the difference matrix, quickly filters out non-changing redundant information to reduce the computational load, and at the same time strengthens the key change areas in the difference matrix through the attention mask matrix, thereby improving the extraction accuracy of the key change areas; further, the present invention fuses the water body change feature map with the water area differential image, uses the global features of the differential image to calibrate the local details of the water body change feature map, and at the same time uses the local details of the water body change feature map to weaken the interference noise in the differential image. The two complement each other, enhance the robustness of the present invention to complex interference, and ultimately accurately detect the water body change area.
[0133] To verify the performance of the water body change detection method proposed in the present invention, an embodiment also compares the present invention with other methods for determining water body change areas, as follows:
[0134] Recall rate (RC), precision rate (PR) and F1 are selected as performance evaluation indicators to comprehensively evaluate the performance of different detection algorithms. F1 is a value determined based on recall rate (RC) and precision rate (PR).
[0135] Specifically, the recall rate (RC), precision rate (PR) and F1 are determined as follows:
[0136] ;
[0137] Where TP is the number of pixels detected as changed but actually changed; FP is the number of pixels detected as changed but actually did not change; and FN is the number of pixels detected as not changed but actually did change.
[0138] The results of comparing the water body change area determination method proposed in the present invention with other water body change area determination methods are shown in Table 1. The comparison shows that the water body change area determination method proposed in the present invention effectively filters out false change points and reduces the proportion of false detection and missed detection.
[0139] Table 1 Comparison of water body change detection results (unit: %)
[0140]
[0141] like Figure 3 As shown, the present invention also discloses a device for determining a water body change area, comprising:
[0142] The feature extraction module 101 is configured to perform N feature extractions on the first water area image in the first time period and the second water area image in the second time period, respectively, to obtain N first shallow-layer feature images corresponding to the first water area image and N second shallow-layer feature images corresponding to the second water area image;
[0143] A difference determination module 102 is configured to calculate the difference between the first shallow feature image and the second shallow feature image corresponding to each feature extraction to obtain N difference matrices;
[0144] A feature fusion module 103 is configured to fuse the first shallow feature image and the second shallow feature image corresponding to each feature extraction to obtain N mixed water area images;
[0145] The feature enhancement module 104 is used to perform enhancement processing on the N mixed water images respectively to obtain N attention mask matrices;
[0146] The water body determination module 105 is used to determine the water body change area according to the N difference matrices and the N attention mask matrices.
[0147] In another embodiment, a custom dataset was created, comprising high-resolution remote sensing water images of a reservoir area at two time phases. Specifically, the high-resolution remote sensing water images were preprocessed using radiometric correction, image registration, and image enhancement. ArcGIS was used to label the high-resolution remote sensing water images at both time phases. After sample expansion and cropping, 7,120 pairs of 512×512 image pairs and labels were obtained. The custom dataset was then divided into a training set, a validation set, and a test set in a ratio of 7:1:2 for training, validation, and testing the water body change region determination device of the present invention.
[0148] Compared with the prior art, the present invention has the following beneficial effects:
[0149] (1) The present invention obtains the difference matrix between the first shallow feature image and the second shallow feature image, thereby reducing the amount of calculation and preliminarily eliminating a large amount of interference information in the first shallow feature image and the second shallow feature image. The attention mask matrix is used to weight the important features in the difference matrix, thereby improving the accuracy of determining the water body change area.
[0150] (2) The present invention fuses the water body change feature map with the water area differential image to achieve multi-scale feature complementarity. Specifically, the water area differential image extracts the coarse-grained information of the global change distribution of the water body, while the water body change feature map extracts the local details of the water body. After the two are superimposed, the edge details of the real change area are retained, and the robustness of the method of the present invention to complex scenes (such as waves and shadows) is enhanced through feature fusion, which significantly improves the integrity and accuracy of the detection of water body change areas.
[0151] The above descriptions are merely a few embodiments of the present application and do not constitute any form of limitation to the present application. Although the present application discloses the preferred embodiments as above, they are not intended to limit the present application. Any technical personnel familiar with the present profession, without departing from the scope of the technical solution of the present application, using the technical content disclosed above to make slight changes or modifications are equivalent to equivalent implementation cases and fall within the scope of the technical solution.
Claims
1. A method for determining a water body change area, characterized in that: The following steps are involved: Perform N feature extractions on the first water area image of the first time period and the second water area image of the second time period, respectively, to obtain N first shallow layer feature images corresponding to the first water area image and N second shallow layer feature images corresponding to the second water area image; Differences are calculated between the first shallow feature image and the second shallow feature image corresponding to each feature extraction to obtain N difference matrices; The first shallow feature image corresponding to each feature extraction is fused with the second shallow feature image to obtain N mixed water area images; Perform enhancement processing on N mixed water images respectively to obtain N attention mask matrices; The water body change feature map corresponding to each feature extraction is determined according to the difference matrix corresponding to each feature extraction and the attention mask matrix each time, and N water body change feature maps are obtained, specifically: Determine the Nth fused image according to the difference matrix corresponding to the Nth feature extraction and the Nth attention mask matrix; Upsampling the Nth fused image N-1 times to obtain an Nth water body change characteristic map; Determine the N-1th fused image based on the difference matrix corresponding to the N-1th feature extraction and the N-1th attention mask matrix; Performing N-2 upsampling on the N-1th fused image to obtain the N-1th water body change characteristic map, and so on to obtain the first water body change characteristic map; Determining a water body change area according to the N water body change characteristic maps includes: determining a water body difference image according to the first water body image and the second water body image, The water body change area is determined according to the water body difference image and the N water body change characteristic maps, specifically: Perform binary processing on each water body change characteristic map; Sum N binary-processed water body change characteristic maps to obtain a binary matrix; determining a second Hadamard product of the binarization matrix and the water area difference image; The water body change area is determined according to the second Hadamard product.
2. The method for determining a water body change area according to claim 1, wherein: N mixed water images are enhanced separately to obtain N attention mask matrices, specifically: The spatial channel enhancement and temporal channel enhancement are performed on each mixed water image using the spatiotemporal attention mechanism to obtain spatially enhanced images and temporally enhanced images respectively. The spatial enhancement image and the temporal enhancement image corresponding to each mixed water area image are fused to obtain N significant feature images; Determine the spatiotemporal attention score of each pixel in each salient feature image using an activation function; The attention mask matrix corresponding to each salient feature image is determined according to the spatiotemporal attention score of each pixel in each salient feature image.
3. The method for determining a water body change area according to claim 1, wherein: The Nth fused image is determined according to the difference matrix corresponding to the Nth feature extraction and the Nth attention mask matrix, specifically: Determine the first Hadamard product according to the difference matrix corresponding to the Nth feature extraction and the Nth attention mask matrix; Upsampling and depth-wise separable convolution are sequentially performed on the first Hadamard product to obtain an Nth fused image.
4. A device for determining a water body change area, characterized in that: include: A feature extraction module is used to perform N feature extractions on the first water area image of the first time period and the second water area image of the second time period, respectively, to obtain N first shallow layer feature images corresponding to the first water area image and N second shallow layer feature images corresponding to the second water area image; A difference determination module is used to calculate the difference between the first shallow feature image and the second shallow feature image corresponding to each feature extraction to obtain N difference matrices; A feature fusion module is used to fuse the first shallow feature image and the second shallow feature image corresponding to each feature extraction to obtain N mixed water area images; The feature enhancement module is used to enhance N mixed water images separately to obtain N attention mask matrices; The water body change feature map corresponding to each feature extraction is determined according to the difference matrix corresponding to each feature extraction and the attention mask matrix each time, and N water body change feature maps are obtained, specifically: Determine the Nth fused image according to the difference matrix corresponding to the Nth feature extraction and the Nth attention mask matrix; Upsampling the Nth fused image N-1 times to obtain an Nth water body change characteristic map; Determine the N-1th fused image based on the difference matrix corresponding to the N-1th feature extraction and the N-1th attention mask matrix; Performing N-2 upsampling on the N-1th fused image to obtain the N-1th water body change characteristic map, and so on to obtain the first water body change characteristic map; The water body determination module is configured to determine a water body change region based on the N difference matrices and the N attention mask matrices, including: determining a water body difference image based on the first water body image and the second water body image; and determining a water body change region based on the water body difference image and the N water body change feature maps, specifically: Perform binary processing on each water body change characteristic map; Sum N binary-processed water body change characteristic maps to obtain a binary matrix; determining a second Hadamard product of the binarization matrix and the water area difference image; The water body change area is determined according to the second Hadamard product.
Citation Information
Patent Citations
Data processing method, and deep learning model training method and device
CN117216715A
Remote sensing image change detection method and device, electronic equipment and storage medium
CN117789046A
Remote sensing change detection method, system and device and storage medium
CN117876877A