Method and device for determining water body change area
By performing multiple feature extraction and difference matrix fusion on the water area image, combined with attention mask matrix processing, the misjudgment problem of water change detection is solved, and lightweight and high-precision water change area detection is achieved.
Patent Information
- Application Number
- CN202510748965.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-06-06
AI Technical Summary
The existing automatic detection technology for water changes is prone to misjudgment due to noise interference in complex environments, with 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 extractions on the water images of the first and second periods, the difference matrix is obtained and fused, the space-time attention mechanism is used for enhanced processing, and the attention mask matrix is generated, and finally the water body change region is determined by combining the difference matrix and the attention mask matrix.
It significantly reduces the calculation complexity, improves the detection accuracy and robustness of water body changes, and can accurately identify water body changes in complex scenarios.
Smart Images

Figure CN120259897A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image analysis, and particularly 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 projects, and water resource management. Accurately detecting water body changes is of great significance for flood control and disaster reduction, water resource scheduling, and ecological protection.
[0003] In recent years, the automatic detection technology of water body changes based on image analysis has been widely used. This technology uses intelligent cameras to capture water level images, and then combines image processing algorithms or deep learning algorithms to detect water body change areas. Among them, the image processing algorithm uses threshold segmentation technology or edge detection technology to locate the water body boundary, and then determines the water body change area according to the water body boundary; the deep learning algorithm trains a convolutional neural network model to extract complex water area features, and then determines the water body change area according to the complex water area features.
[0004] However, the existing automatic detection technology of water body changes is not only prone to misjudgment due to noise interference in complex environments, resulting in low detection accuracy, but also has low efficiency due to the complex network structure of the deep learning algorithm, and it is difficult to meet the requirements of lightweight and accurate real-time monitoring. Summary of the Invention
[0005] 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, including the following steps:
[0007] Performing N times of feature extraction on the first water area image in the first period and the second water area image in the second 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;
[0008] Subtracting the first shallow feature image and the second shallow feature image corresponding to each feature extraction to obtain N difference matrices;
[0009] Fusing the first shallow feature image and the second shallow feature image corresponding to each feature extraction to obtain N mixed water area images;
[0010] Performing enhancement processing on the N mixed water area images respectively to obtain N attention mask matrices;
[0011] Determining the water body change area according to the N difference matrices and the N attention mask matrices.
[0012] Preferably, enhance each of the N mixed water area images to obtain N attention mask matrices, specifically:
[0013] Use the spatio-temporal attention mechanism to perform spatial channel enhancement and temporal channel enhancement on each mixed water area image respectively to obtain a spatially enhanced image and a temporally enhanced image;
[0014] Fuse the spatially enhanced image and the temporally enhanced image corresponding to each mixed water area image to obtain N significant feature images;
[0015] Use an activation function to determine the spatio-temporal attention scores of each pixel in each significant feature image;
[0016] Determine the attention mask matrix corresponding to each significant feature image according to the spatio-temporal attention scores of each pixel in each significant feature image.
[0017] Preferably, determine the water body change area 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 for each time, and obtain N water body change feature maps;
[0019] Determine the water body change area according to the N water body change feature maps.
[0020] Preferably, the method for determining the water body change area further includes:
[0021] Determine the water area difference image according to the first water area image and the second water area image;
[0022] Correspondingly, determine the water body change area according to the N water body change feature maps, specifically:
[0023] Determine the water body change area according to the water area difference image and the N water body change feature maps.
[0024] Preferably, 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 for each time, and obtain N water body change feature maps, specifically:
[0025] Determine the Nth fusion image according to the difference matrix corresponding to the Nth feature extraction and the Nth attention mask matrix;
[0026] Perform times of upsampling on the Nth fusion image to obtain the Nth water body change feature map;
[0027] According to the The difference matrix corresponding to the secondary feature extraction and the attention mask matrix of the secondary time are used to determine the fusion image;
[0028] For the fusion image, perform secondary upsampling to obtain the water body change feature map, and so on, to obtain the first water body change feature map.
[0029] Preferably, the Nth fusion image is determined according to the difference matrix corresponding to the Nth feature extraction and the attention mask matrix of the Nth time, specifically:
[0030] Determine the first Hadamard product according to the difference matrix corresponding to the Nth feature extraction and the attention mask matrix of the Nth time;
[0031] Perform upsampling and depthwise separable convolution on the first Hadamard product in sequence to obtain the Nth fusion image.
[0032] Preferably, the water body change area is determined according to the water area difference image and the N water body change feature maps, specifically:
[0033] Perform binarization processing on each water body change feature map;
[0034] Sum the N binarized water body change feature maps to obtain a binarization matrix;
[0035] Determine the second Hadamard product of the binarization matrix and the water area difference image;
[0036] Determine the water body change area according to the second Hadamard product.
[0037] The present invention also discloses a device for determining a water body change area, including:
[0038] A feature extraction module, configured to perform N times of feature extraction 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;
[0039] A difference determination module, configured to subtract 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, 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;
[0041] A feature enhancement module, configured to perform enhancement processing on the N mixed water area images respectively to obtain N attention mask matrices;
[0042] A water body determination module, configured to determine a water body change region according to 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) By obtaining the difference matrix between the first shallow feature image and the second shallow feature image, the present invention reduces the calculation amount while initially excluding a large amount of interference information in the first shallow feature image and the second shallow feature image, and weights the important features in the difference matrix by using the attention mask matrix, thereby improving the determination accuracy of the water body change region.
[0045] (2) The present invention fuses the water body change feature map with the water area difference image, which can realize multi-scale feature complementarity. Specifically, the water area difference 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, both the edge details of the real change region 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, significantly improving the integrity and accuracy of the detection of the water body change region. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 is a flowchart of the method of the present invention;
[0047] Figure 2 is a diagram showing the implementation process of the method of the present invention in a Siamese U-Net network in an embodiment;
[0048] Figure 3 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; 105 is a water body determination module. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0050] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present invention. However, those skilled in the art should clearly understand that the present invention can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present invention.
[0051] As Figure 1 shown, the present invention discloses a method for determining a water body change region, including the following steps:
[0052] S1. Perform N times of feature extraction 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 to the Nth first shallow feature images is obtained by performing feature extraction again on the image obtained from 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 FIG. is a schematic diagram of the process of implementing the present invention using a Siamese U-Net network. Step S1 is mainly performed in the three-layer backbone network composed of EfficientNet units in the Siamese U-Net network. Each layer of the backbone network is used to perform corresponding times of feature extraction on the first water area image and the second water area image:
[0056] Taking the th feature extraction as an example, S1 is specifically as follows:
[0057] ;
[0058] ;
[0059] In the formula, represents the first shallow feature image obtained from the th feature extraction; represents the second shallow feature image obtained from the th feature extraction; represents the convolution processing of the first shallow feature image obtained from the th feature extraction; represents the convolution processing of the second shallow feature image obtained from the th feature extraction; When is equal to 1, represents the convolution processing of the first water area image, represents the convolution processing of the second water area image.
[0060] Preferably, to reduce the number of parameters and the amount of calculation, in the multi-layer backbone network can share weights, that is, in the multi-layer backbone network, when used for convolution processing, the convolution kernel and bias parameters can be set to be the same.
[0061] For ease of description, the subsequent steps are all based on the Take the secondary feature extraction as an example for illustration.
[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 beneficial for determining the subtle displacement of the water level line, the gradual change pattern of the flooded area, and the change in water turbidity, thereby providing a basis for the spatio-temporal attention mechanism to enhance key features directionally. Moreover, the calculation amount for extracting shallow features is small, and the accuracy can be improved without adding too much computational burden.
[0063] S2. Subtract 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 layer. The solution process of the difference matrix corresponding to the secondary feature extraction is specifically as follows:
[0065] ;
[0066] In the formula, represents the difference matrix corresponding to the
[0067] secondary feature extraction. In the difference matrix
[0068] , the part where the elements are smaller or zero reflects the characteristics of the unchanged area of the water body, and the part where the elements are larger reflects the characteristics of the changed area of the water body or the characteristics of interference factors.
[0069] The present invention replaces the traditional feature matching method by obtaining the difference matrix, and only needs to perform subtraction operations on the first shallow feature image and the second shallow feature image, without introducing complex operations such as convolution, iterative optimization, or high-dimensional feature transformation, significantly reducing the computational complexity.
[0070] S3. Fuse 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 process of fusing the first shallow feature image and the second shallow feature image obtained from the secondary feature extraction to obtain the corresponding mixed water area image is specifically as follows:
[0072] ;
[0073] In the formula, represents the The mixed water area image corresponding to the secondary feature extraction; Indicating the first shallow feature image obtained from the secondary feature extraction and the second shallow feature image obtained from the secondary feature extraction are subjected to cascade splicing processing.
[0074] According to the above method, the mixed water area images corresponding to each feature extraction can be obtained in sequence.
[0075] In the present invention, by fusing the first shallow feature images and the second shallow feature images of different time phases, the water body change features in both the spatial dimension and the time dimension are retained, which helps to obtain the real changes of the water body and exclude interference. For example, instantaneous specular reflection information and floating object displacement information may not appear simultaneously 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 excluded; 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 computing amount, and through feature fusion, redundant information extraction can be avoided, further streamlining the computing process.
[0076] S4. Perform enhancement processing on N mixed water area images respectively to obtain N attention mask matrices;
[0077] Preferably, S4 is specifically:
[0078] S41. Use the spatio-temporal attention mechanism to perform spatial channel enhancement and temporal channel enhancement on each mixed water area image respectively to obtain a spatial enhancement image and a temporal enhancement image;
[0079] In this embodiment, the spatial channel enhancement and the temporal channel enhancement are parallel processing processes. The spatial channel enhancement is used to enhance the spatial local features of the water body in the mixed water area image, such as the water body shape features; the temporal channel enhancement is used to enhance the temporal dynamic change features in the mixed water area image, such as the water flow movement direction, speed and other features.
[0080] Parallel processing can realize the comprehensive perception of the water body state by performing multi-dimensional feature fusion on the mixed water area image (that is, the spatial local features and the temporal dynamic change features of the water body), which can not only accurately depict the static spatial structures such as the water body boundary and texture distribution, but also track the temporal evolution laws such as the water flow speed and direction fluctuations in real time. This spatio-temporal coordination mechanism effectively improves the accuracy of the method of the present invention in locating the water body change area in complex scenarios.
[0081] In other embodiments, the spatial channel enhancement and the temporal channel enhancement can also be set as a serial processing procedure, and the serial setting is beneficial to more deeply explore the internal correlation between the evolution of the spatial local features of the water body and the evolution of the temporal dynamic change features in the mixed water area image.
[0082] S42. Fuse the spatial enhancement image and the temporal enhancement image corresponding to each mixed water area image to obtain N significant feature images;
[0083] Specifically, the fusion processing is any one of addition, multiplication or splicing.
[0084] As Figure 2 shown, in this embodiment, the spatial channel enhancement, the temporal channel enhancement and the fusion processing are mainly carried out in the attention module of the Siamese U-Net network, and the specific processing procedure is as follows:
[0085] ;
[0086] In the formula, is the significant feature image corresponding to the th feature extraction; represents the normalization function, which is used to independently normalize the mixed water area image on each feature channel of the mixed water area image ; represents the convolution operator, represents the number of channels of the mixed water area image , represents the number of channels of the significant feature image , represents the number of group convolutions, and the depth of the convolution kernel is 2.
[0087] The present invention generates significant feature images by fusing the spatial enhancement image (extracting the spatial local features of the water body) and the temporal enhancement image (extracting the temporal dynamic change features of the water body), so that the method of the present invention simultaneously has the discriminant ability of spatial detail resolution and temporal continuity, thereby improving the determination accuracy of the water body change area under complex interference.
[0088] S43. Use the first activation function to determine the spatio-temporal attention score of each pixel in each significant feature image;
[0089] S44. Determine the attention mask matrix corresponding to each significant feature image according to the spatio-temporal attention score of each pixel in each significant feature image.
[0090] Specifically, the matrix composed of the spatio-temporal attention scores of each pixel in each significant feature image is used as the attention mask matrix corresponding to each significant feature image.
[0091] Based on the semantic correlation and continuity of water body change information on different significant feature images, this embodiment uses a first activation function to calculate the spatio-temporal attention scores of each pixel in the n-th significant feature image, and outputs an attention mask matrix , specifically as follows:
[0092] ;
[0093] Preferably, the first activation function selects the parametric rectified linear unit PReLU to improve the problem of gradient disappearance through parameter learning. Specifically, PReLU can be expressed as:
[0094] ;
[0095] where is a learnable parameter less than 1, represents the significant feature image for activation processing.
[0096] In this embodiment, each feature extraction has a corresponding difference matrix and attention mask matrix.
[0097] S5. Determine the water body change area according to the N difference matrices and N attention mask matrices. The present invention fuses the difference matrix and the attention mask matrix, which not only retains the global features in the difference matrix but also weights the key features in the difference matrix pixel by pixel through the attention mask matrix, excluding noise interference, thereby taking into account the lightweight calculation and precise detection of the present invention.
[0098] Figure 2 The three-layer upsampling convolutional network and discriminator of Figure 2 show the process of determining the water body change area according to the N difference matrices and N attention mask matrices. As
[0099] shown, S5 is specifically as follows:
[0100] S51. 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; specifically, S51 includes:
[0101] S511. Determine the N-th fusion image according to the difference matrix corresponding to the N-th feature extraction and the N-th attention mask matrix; specifically, S511 includes:
[0101] S5111. Determine the first Hadamard product according to the difference matrix corresponding to the N-th feature extraction and the N-th attention mask matrix;
[0102] S5112. Upsample and perform depthwise separable convolution on the first Hadamard product in sequence to obtain the Nth fused image.
[0103] Taking the th feature extraction as an example, the determination process of the th fused image is specifically as follows:
[0104] ;
[0105] Among them, represents the th fused image, represents depthwise separable convolution; represents upsampling; the difference matrix and the attention mask matrix contain the same number of numerical values; represents the first Hadamard product.
[0106] S512. Perform times of upsampling on the Nth fused image to obtain the Nth water body change feature map;
[0107] S513. Determine the th fused image according to the difference matrix corresponding to the th feature extraction and the attention mask matrix of the th time;
[0108] S514. Perform times of upsampling on the th fused image to obtain the th water body change feature map, and so on, to obtain the first water body change feature map;
[0109] Specifically, the determination methods of the th fused image to the first fused image are the same as those of the Nth fused image.
[0110] S52. Determine the water body change area according to the N water body change feature maps.
[0111] Preferably, S52 is specifically: S521. Based on the inter-frame difference method, determine the water area difference image according to the first water area image and the second water area image,
[0112] ;
[0113] In the formula, , , respectively represent the gray values of the pixel points at the th channel of the water area difference image, the first water area image, and the second water area image 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 can also be determined based on the background difference method or the optical flow method according to the first water area image and the second water area image, and this embodiment does not make specific limitations on this.
[0115] S522. Determine the water body change area according to the above water area difference image and N water body change feature maps.
[0116] The present invention first uses the difference matrix and the attention mask matrix corresponding to each feature extraction to gradually obtain multiple different water body change feature maps. This hierarchical processing method can fully explore the associations and differences between features in the water body change feature maps at different scales, and effectively capture the subtle and significant features of water body changes. At the same time, by combining the water area difference image with multiple water body change feature maps to determine the water body change area, the water area difference image provides intuitive overall change information, while the water body change feature maps further refine and strengthen the representation of change features. The two complement each other, making the finally determined water body change area more accurate and comprehensive, and better meeting the accuracy requirements for water body change monitoring in practical applications.
[0117] Preferably, S522 is specifically:
[0118] S5221. Perform binarization processing on each water body change feature map using the second activation function;
[0119] S5222. Sum the N binarized water body change feature maps to obtain a binarized matrix;
[0120] In this embodiment, S5221~S5222 are specifically:
[0121] ;
[0122] In the formula, represents the binarized matrix; represents a convolution kernel with a channel number of and a size of 1×1; is the second activation function; represents summation; represents the water body change feature map.
[0123] Preferably, the selection method of the second activation function in this embodiment is:
[0124] When When it is [a certain situation], the second activation function is PReLU, which can avoid gradient disappearance and information loss;
[0125] When it is [another certain situation], the second activation function is Sigmoid.
[0126] In other embodiments, the second activation function of each layer can also be specified by those skilled in the art, and this embodiment does not limit this.
[0127] Furthermore, other threshold functions or logical functions can also be used to perform binarization processing on each water body change feature map, and this embodiment does not make specific limitations on this.
[0128] S5223. Determine the second Hadamard product of the binarized matrix and the water area difference image;
[0129] S5224. Determine the water body change area according to the second Hadamard product.
[0130] Specifically, calculate the second Hadamard product of the binarized matrix and the water area difference image . 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 changing pixels is the water body change area.
[0131] The present invention clearly marks changing pixels and non-changing pixels through the binarized matrix, and uses the original difference value in the water area difference image to refine and calibrate the binarized matrix, suppressing the isolated noise interference caused by misjudgment of the attention mask matrix, while enhancing the confidence of the true change area in the water area difference image; finally, the water body change area is accurately output through the second Hadamard product, significantly improving the anti-interference ability and boundary clarity of the detection result while ensuring lightweight calculation.
[0132] The present invention first obtains the difference matrix, quickly filters out non-changing redundant information to reduce the calculation load, and at the same time enhances the key change areas in the difference matrix through the attention mask matrix, improving the extraction accuracy of the key change areas; further, the present invention fuses the water body change feature map and the water area difference image, uses the global features of the difference 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 difference image, and the two complement each other, enhancing the robustness of the present invention to complex interference, and finally accurately detecting the water body change area.
[0133] To verify the performance of the water body change detection method proposed by the present invention, in one embodiment, the present invention is also compared with other methods for determining the water body change area, as follows:
[0134] The 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 the recall rate (RC) and precision rate (PR).
[0135] Specifically, the determination methods of the recall rate (RC), precision rate (PR), and F1 are as follows:
[0136] ;
[0137] In the formula, TP represents the number of pixels detected as changed pixels but actually being changed pixels; FP represents the number of pixels detected as changed pixels but actually being non-changed pixels; FN represents the number of pixels detected as non-changed pixels but actually being changed pixels.
[0138] The results of comparing the method for determining the water body change area proposed by the present invention with other methods for determining the water body change area are shown in Table 1. It can be seen from the comparison that the method for determining the water body change area proposed by the present invention effectively filters out false change points and reduces the false detection and missed detection ratios.
[0139] Table 1 Comparison of water body change detection results (unit: %)
[0140]
[0141] As Figure 3 shown, the present invention also discloses a device for determining the water body change area, including:
[0142] A feature extraction module 101, configured to perform N times of feature extraction 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;
[0143] A difference determination module 102, configured to subtract 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, 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] A feature enhancement module 104, configured to perform enhancement processing on the N mixed water area images respectively to obtain N attention mask matrices;
[0146] A water body determination module 105, configured to determine the water body change area according to the N difference matrices and the N attention mask matrices.
[0147] In another embodiment, a self-made dataset is also established. The self-made dataset includes high-resolution remote sensing water body images of a certain reservoir area at two time phases. Specifically, the high-resolution remote sensing water body images have been preprocessed such as radiometric correction, image registration, and image enhancement. And ArcGIS is used to label the high-resolution remote sensing water body images at two time phases respectively. After sample augmentation and cropping, 7,120 pairs of 512×512 image pairs and labels are obtained. The self-made dataset is divided into a training set, a validation set, and a test set according to the ratio of 7∶1∶2, which are used to train, validate, and test the water body change area determination device of the present invention.
[0148] Compared with the prior art, the present invention has the following beneficial effects:
[0149] (1) By obtaining the difference matrix between the first shallow feature image and the second shallow feature image, the present invention reduces the amount of calculation and preliminarily eliminates a large amount of interference information in the first shallow feature image and the second shallow feature image, and uses the attention mask matrix to weight the important features in the difference matrix, thereby improving the determination accuracy of the water body change area;
[0150] (2) The present invention fuses the water body change feature map with the water area difference image, which can achieve multi-scale feature complementarity. Specifically, the water area difference 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, both 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, significantly improving the integrity and accuracy of the water body change area detection.
[0151] The above are only several embodiments of the present application, and do not impose any form of limitation on the present application. Although the present application is disclosed as above with preferred embodiments, it is not intended to limit the present application. Any person skilled in the art, without departing from the scope of the technical solution of the present application, makes some changes or modifications using the disclosed technical content, which are equivalent to equivalent implementation cases and all fall within the scope of the technical solution.
Claims
1. A method for determining a water body change area, characterized in that It includes the following steps: Perform N times of feature extraction 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; Subtract the first shallow feature image and the second shallow feature image corresponding to each feature extraction to obtain N difference matrices; Fuse the first shallow feature image and the second shallow feature image corresponding to each feature extraction to obtain N mixed water area images; Perform enhancement processing on the N mixed water area images respectively to obtain N attention mask matrices; Determine the water body change area according to the N difference matrices and the N attention mask matrices.
2. The method for determining the water body change area according to claim 1, characterized in that Perform enhancement processing on the N mixed water area images respectively to obtain N attention mask matrices, specifically: Use the spatio-temporal attention mechanism to perform spatial channel enhancement and temporal channel enhancement on each mixed water area image respectively, to obtain a spatial enhancement image and a temporal enhancement image respectively; Fuse the spatial enhancement image and the temporal enhancement image corresponding to each mixed water area image to obtain N significant feature images; Use the activation function to determine the spatio-temporal attention score of each pixel in each significant feature image; Determine the attention mask matrix corresponding to each significant feature image according to the spatio-temporal attention score of each pixel in each significant feature image.
3. The method for determining the water body change area according to claim 1, wherein Determine the water body change area according to the N difference matrices and the N attention mask matrices, specifically: 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 of each time, to obtain N water body change feature maps; Determine the water body change area according to the N water body change feature maps.
4. The method for determining the water body change area according to claim 3, characterized in that, It also includes: Determine the water area difference image according to the first water area image and the second water area image; Correspondingly, determine the water body change area according to the N water body change feature maps, specifically: Determine the water body change area according to the water area difference image and the N water body change feature maps.
5. The method for determining the water body change area according to claim 4, wherein 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 of each time, to obtain N water body change feature maps, specifically: Determine the Nth fusion image according to the difference matrix corresponding to the Nth feature extraction and the Nth attention mask matrix; Perform N - 1 times of upsampling on the Nth fusion image to obtain the Nth water body change feature map; Determine the (N - 1)th fusion image according to the difference matrix corresponding to the (N - 1)th feature extraction and the (N - 1)th attention mask matrix; Perform N - 2 times of upsampling on the (N - 1)th fusion image to obtain the (N - 1)th water body change feature map, and so on, to obtain the first water body change feature map.
6. The method for determining the water body change area according to claim 5, characterized in that, Determine the Nth fusion image 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; Perform upsampling and depthwise separable convolution on the first Hadamard product in sequence to obtain the Nth fusion image.
7. The method for determining the water body change area according to claim 6, characterized in that Determine the water body change area according to the water area difference image and the N water body change feature maps, specifically: Perform binarization processing on each water body change feature map; Sum the N binarized water body change feature maps to obtain a binarization matrix; Determine the second Hadamard product of the binarization matrix and the water area difference image; Determine the water body change area according to the second Hadamard product.
8. An apparatus for determining a water body change area, characterized in that, Including: A feature extraction module, configured to perform N times of feature extraction on the first water area image in the first period and the second water area image in the second 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; A difference determination module, configured to subtract 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, 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; A feature enhancement module, configured to perform enhancement processing on the N mixed water area images respectively to obtain N attention mask matrices; A water body determination module, configured to determine the water body change area according to the N difference matrices and the N attention mask matrices.
Citation Information
Patent Citations
Image difference detection method, model training method, system, equipment and medium
CN116030036A
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
Image recognition method and device
CN118038356A
Cited By
Distributed water pollution tracing method and system
CN121027455A