A remote sensing image change detection method and device based on improved DANet algorithm
Through DANet's improved algorithm's remote sensing image change detection method, combined with the position and channel attention mechanism, the detection accuracy and anti-interference ability problems in remote sensing image change detection are solved, and efficient and accurate change detection is achieved.
Patent Information
- Application Number
- CN202211597382.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-12
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-12-12
AI Technical Summary
The existing remote sensing image change detection methods have low detection accuracy, poor anti-interference ability, and error accumulation problems.
The remote sensing image change detection method based on DANet improved algorithm is adopted. By preprocessing, stitching and recombining the input images, downsampling feature extraction is used using the resnet50 network, and feature fusion is performed in combination with the position attention mechanism and the channel attention mechanism to calculate the loss value to optimize the detection results.
Effectively reduce the impact of noise, improve detection accuracy and network robustness, solve the problems of gradient vanishing and gradient explosion, and improve detection efficiency.
Smart Images

Figure CN115797774B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a remote sensing image change detection method and device based on an improved DANet algorithm. Background Art
[0002] In recent years, space sensor technology and aerospace technology have been greatly improved. Terabytes of image data are received daily on Earth. Using this image data to quickly, accurately, and efficiently detect changes in land features has become a pressing issue in the field of remote sensing image processing. Among the existing mainstream methods for remote sensing image change detection, the pixel-oriented method's detection results are overly dependent on the selection of classification thresholds and are subject to high levels of noise. Object-oriented methods extract features from clustered objects when extracting texture, shape, and contour features. The accuracy of clustering greatly affects the accuracy of change detection, resulting in a serious error accumulation problem. Feature-oriented methods can address basic error accumulation issues, but traditional feature extraction loses a lot of subtle feature information, so detection accuracy still falls short. Consequently, existing remote sensing image change detection methods are unable to meet the application requirements for image data. Summary of the Invention
[0003] To overcome the above-mentioned deficiencies of the prior art, the present invention provides a remote sensing image change detection method based on an improved DANet algorithm to solve the problems of low detection accuracy and poor anti-interference ability of the existing change detection methods.
[0004] In a first aspect, the present invention provides a remote sensing image change detection method based on an improved DANet algorithm, comprising the following steps:
[0005] S1: First, the image to be detected is preprocessed, and then the preprocessed two-phase remote sensing images are spliced and reassembled as the input image;
[0006] S2: Based on the DANet network, downsample the input image and extract its features; use the resnet50 network to extract the downsampled features of the input image; the resnet50 network contains 4 residual blocks, each of which contains 3, 4, 6, and 3 convolution blocks respectively. Each convolution block has three layers of convolution, and the convolution kernel sizes are 1*1, 3*3, and 1*1 respectively; use ASPP to apply the dilated convolution method to the resnet50 network, and perform spatial pyramid pooling on the middle 3*3 layer of the residual block for the third and fourth residual blocks. In the third residual block, the dilated convolution coefficient rate is 2; in the fourth residual block, the dilated convolution coefficient rate is 4;
[0007] Then, two parallel position attention mechanism modules and channel attention mechanism modules are processed, and finally the output results of the position attention mechanism module and the channel attention mechanism module are fused to obtain the prediction result; S3: Calculate the loss value Loss based on the difference between the prediction result and the true value;
[0008] Loss = real_loss + w*aux_loss
[0009] Where real_loss = α·L var +β·L dist +γ·L reg (1)
[0010]
[0011] Among them, real_loss is the loss obtained by the Discriminative Loss function; aux_loss is the additional loss; w is the coefficient of the additional loss function; α, β, and γ are all constants; C represents the number of categories in the real label; x i Represents the embedding vector of a pixel; μ c Represents the center of the embedding vector corresponding to all pixels of a certain category in the true class label in the mapping space; N c represents the number of pixels in each category; δ v and δ d are the thresholds for the pull term and the push term, respectively;
[0012] The additional loss aux_loss is based on the overall output result, and constrains the position attention mechanism module and the channel attention mechanism module respectively, so that the output results of the position attention mechanism module and the channel attention mechanism module are closer to the label. Its calculation formula is:
[0013] aux_loss=w*(loss p +loss c ) (5)
[0014]
[0015] Where: N is the number of prediction samples; x represents the sample; y p is the prediction result output of the position attention mechanism module; y c is the prediction result output of the channel attention mechanism module; a is the actual change detection label.
[0016] Furthermore, in the remote sensing image change detection method based on the improved DANet algorithm of the present invention, step S1 specifically includes:
[0017] S11: Preprocessing the image to be detected, performing data enhancement operations on the two remote sensing images at different time phases to be detected, including flipping, rotating, and zooming in and out;
[0018] S12: stitching and reorganizing the pre-processed remote sensing images of the two temporal phases, stitching the pre-processed remote sensing images of the two different temporal phases to form a 6-channel or 8-channel input image; wherein the 6-channel is a three-channel image of the two temporal phases, and the 8-channel is a four-channel image of the two temporal phases;
[0019] S13: Randomly select a common channel of two remote sensing images of different phases, add a channel with the same width and height and all zeros, and stitch them into a new 3-channel image with the same width and height, and use it as the input image.
[0020] Furthermore, in the remote sensing image change detection method based on the improved DANet algorithm of the present invention, step S2 specifically includes:
[0021] S21: Input the downsampled features into the position attention mechanism module and channel attention mechanism module of DANet respectively, and obtain the output results of the position attention mechanism module and the channel attention mechanism module respectively; wherein, the position attention mechanism module fuses the position information of each feature point; and the channel attention mechanism module fuses the information between each channel of the input image;
[0022] S22: The output results of the position attention mechanism module and the channel attention mechanism module are fused, and the superposition results are obtained by element-by-element superposition. Then, the superposition results are input into a 3*3 convolution layer to perform convolution on the superposition results to achieve feature fusion and finally obtain the prediction results.
[0023] Furthermore, in the remote sensing image change detection method based on the improved DANet algorithm described in the present invention, the position attention mechanism module in step S21 fuses the position information of each feature point specifically including: first convolving the down-sampled feature map and copying it 3 times to divide it into 3-way features, then resizing the 3-way features, and the new size is the product of the number of channels of the original feature map * height and width, transposing the resized 1st-way feature matrix and multiplying it with the 2nd-way feature matrix, performing a softmax operation on the result, and then multiplying the 3rd-way feature matrix with the softmax result and resizing it to the same size as the feature map obtained by the original downsampling, and finally fusing this feature result with the original feature map to obtain the output result of the position attention mechanism module.
[0024] Furthermore, in the remote sensing image change detection method based on the improved DANet algorithm described in the present invention, the channel attention mechanism module described in step S21 fuses the information between each channel of the input image specifically including: first convolving the feature map obtained by downsampling and copying 3 copies into 3 paths, then resizing the 3-path features, and the new size is the product of the number of channels of the original feature map * height and width, transposing the resized 3-path feature matrix and multiplying it with the 2-path feature matrix, performing a softmax operation on the result, and then multiplying the 1-path feature matrix with the result after softmax and resizing it to the same size as the feature map obtained by the original downsampling, and finally fusing this feature result with the original feature map to obtain the output of the channel attention mechanism module.
[0025] In a second aspect, the present invention provides a remote sensing image change detection system based on an improved DANet algorithm, which is used to implement the remote sensing image change detection method based on the improved DANet algorithm described in the first aspect, including an image preprocessing module, a fusion processing module, and a loss value calculation module;
[0026] The image preprocessing module is used to preprocess the image to be detected, and then splice and reassemble the preprocessed two-phase remote sensing images as input images;
[0027] The fusion processing module is based on the DANet network, which performs downsampling feature extraction on the input image, and then performs two parallel processing modules, the position attention mechanism module and the channel attention mechanism module, and finally fuses the output results of the position attention mechanism module and the channel attention mechanism module to obtain the prediction result;
[0028] The loss value calculation module is used to calculate the loss value Loss according to the difference between the prediction result and the true value; Loss=real_loss+w*aux_loss.
[0029] Furthermore, in the remote sensing image change detection system based on the improved DANet algorithm of the present invention, the image preprocessing module preprocesses the image to be detected, including the following process:
[0030] The image to be detected is preprocessed, and data enhancement operations are performed on the two remote sensing images at different phases. The enhancement includes flipping, rotating, zooming in and out.
[0031] The pre-processed two-phase remote sensing images are stitched and reassembled to form a 6-channel or 8-channel input image; the 6-channel is a three-channel image of two phases, and the 8-channel is a four-channel image of two phases;
[0032] Randomly select a common channel of two remote sensing images of different phases, add a channel of all zeros with the same width and height, and splice them into a new 3-channel image with the same width and height, and use it as the input image.
[0033] In a third aspect, the present invention provides a remote sensing image change detection device based on the improved DANet algorithm, comprising a processor and a memory electrically connected to each other; the memory is used to store a computer program; when the processor executes the aforementioned computer program, it can implement the remote sensing image change detection method based on the improved DANet algorithm described in the first aspect.
[0034] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon; when the computer program is executed, the remote sensing image change detection method based on the improved DANet algorithm described in the first aspect can be implemented.
[0035] The technical effects of the present invention include:
[0036] (1) The remote sensing image change detection method based on the improved DANet algorithm provided by the present invention can effectively reduce the influence of noise in the change detection results;
[0037] (2) The method provided by the present invention is end-to-end, and the change detection results are only related to the extracted deep features, so there is no error accumulation problem;
[0038] (3) The change detection method provided by the present invention not only considers the deep feature factors of the change area, but also extracts features from the connections between different positions and channels of the input image through the channel attention mechanism and the position attention mechanism, which can effectively improve the network detection accuracy and enhance the network robustness;
[0039] (4) The present invention applies the semantic segmentation network structure to the field of remote sensing image change detection. The introduction of the residual learning mechanism can accelerate network convergence, increase the number of network layers, speed up feature extraction, and solve the problems of gradient vanishing and gradient exploding.
[0040] (5) Improved use of ASPP to enhance the network's ability to perceive image features, while ensuring algorithm accuracy, and more efficient than other deep learning methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a diagram showing the overall structure of the DANet network described in an embodiment of the present invention;
[0042] Figure 2 This is a structural diagram of the position attention mechanism module according to an embodiment of the present invention;
[0043] Figure 3This is a structural diagram of the channel attention mechanism module according to an embodiment of the present invention;
[0044] Figure 4 This is a diagram showing the size change process of the feature map of the position attention mechanism module according to an embodiment of the present invention;
[0045] Figure 5 This is a schematic diagram of the structure of a remote sensing image change detection system based on the improved DANet algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The remote sensing image change detection method and device based on the improved DANet algorithm of the present invention are described in detail below with reference to the accompanying drawings and embodiments.
[0047] Example 1
[0048] The present disclosure discloses a remote sensing image change detection method based on an improved DANet (Dual Attention Mechanism Network) algorithm. Figure 1 As shown, the following steps are included:
[0049] Step S1: First, the image to be detected is preprocessed, and then the preprocessed two-phase remote sensing images are spliced and reassembled as the input image; Step S1 includes the following specific steps:
[0050] S11: preprocessing the image to be detected;
[0051] Perform data enhancement operations on the two remote sensing images of different time phases to be detected, including flipping, rotation, zooming in and out;
[0052] S12: stitching and recombining the pre-processed two-temporal remote sensing images;
[0053] The two remote sensing images of different time phases after preprocessing are stitched together to form a 6-channel or 8-channel input image; wherein the 6-channel is a three-channel image of two time phases, and the 8-channel is a four-channel image of two time phases; S13: randomly select a common channel of the two remote sensing images of different time phases, add an all-0 channel of the same width and height, stitch them into a new 3-channel image of the same width and height, and use it as the input image.
[0054] Directly using the multi-channel image obtained after splicing as the input image cannot well reflect the feature differences of different images in the feature extraction process. In the feature extraction process, RGB three-channel remote sensing images are often used as input. In the present invention, a certain same channel of the two spliced images is randomly selected, and a full 0 channel of the same width and height is added to splice into a new 3-channel image of the same width and height, and used as the input image. For example, the three bands of the first image are recorded as RGB, and the three bands of the second image are recorded as R'G'B'. Then the number of channels of the 6-band image after integration is RGBR'G'B', and the input image finally spliced out is one of the three combinations of RR'0, GG'0 or BB'0. This channel combination method takes into account that the spectral distribution of the same channel is approximate, and adopts the method of combining the same channels of the two images as the network input. In the feature extraction process, the feature differences of different remote sensing images on the same channel can be reflected, so it is more suitable for remote sensing image change detection tasks.
[0055] Step S2: Based on the DANet network, downsample the input image to extract features, then perform two parallel processing of the position attention mechanism module and the channel attention mechanism module, and finally fuse the output results of the position attention mechanism module and the channel attention mechanism module to obtain the prediction result; Step S2 includes the following specific steps:
[0056] S21: Use resnet50 network to perform downsampling feature extraction on the input image;
[0057] refer to Figure 1 The backbone network module of resnet50 network contains 4 residual blocks, each residual block contains 3, 4, 6, and 3 convolution blocks respectively. Each convolution block has three layers of convolution, and the convolution kernel sizes are 1*1, 3*3, and 1*1 respectively.
[0058] The improved DANet network uses resnet50 as the backbone network to extract features, and uses ASPP to apply dilated convolution to the resnet50 network. For the third and fourth residual blocks, spatial pyramid pooling operations are performed on the middle 3*3 layer of the residual block. In addition, in the third residual block, the dilated convolution coefficient rate is 2; in the fourth residual block, the dilated convolution coefficient rate is 4; in order to expand the receptive field and solve the problem of loss of detail information in downsampling.
[0059] The coefficient of the dilated convolution determines the size of the receptive field. The larger the coefficient, the larger the receptive field. However, a too large receptive field will cause the feature map to introduce irrelevant features, reduce the quality of feature extraction, and lead to poor model convergence. A too small receptive field will not be able to fully extract relevant features, which will also lead to reduced feature quality and thus convergence of the image network model. In the present invention, the dilated convolution coefficients are set to 2 and 4 respectively, that is, in the third convolution module, a dilated convolution structure with a dilated convolution coefficient of 2 is adopted to expand the original convolution kernel 3*3 to 7*7, effectively increasing the receptive field of related features. In the fourth convolution module, a dilated convolution structure with a dilated convolution coefficient of 4 is adopted to expand the original 3*3 convolution kernel to 15*15, and further expand the receptive field. This is because in the resnet50 feature extraction module, the features extracted by the shallow convolution operation are all shallow basic features, such as texture, color, shape, etc. The subsequent convolution operations extract more deep advanced features, which are more difficult to interpret. However, the more feature information contained, the more complex the correlation, and it is suitable for large-scale convolution operations.
[0060] S22: Input the downsampled features into the position attention mechanism module and channel attention mechanism module of DANet respectively, and obtain the output results of the position attention mechanism module and the channel attention mechanism module respectively; wherein the position attention mechanism module fuses the position information of each feature point; and the channel attention mechanism module fuses the information between each channel of the input image;
[0061] S23: Fuse the output results of the position attention mechanism module and the channel attention mechanism module. Superimpose the output results of the position attention mechanism module and the output results of the channel attention mechanism module element by element to obtain a superposition result, and then input it into a 3*3 convolution layer to convolve the superposition result to achieve feature fusion and finally obtain the prediction result.
[0062] The position attention mechanism module mainly integrates the position information of each feature point. The specific operation process is as follows: Figure 2 As shown in the figure, the downsampled feature map A is first convolved and the convolution result is copied 3 times, recorded as B, C, and D respectively. Then, B, C, and D are resized respectively. If the size of A is C*H*W, the new size is C*N (N=H*W). The resized B feature matrix is transposed and multiplied with the resized C feature matrix to obtain an N*N feature matrix. Then, a softmax operation is performed on the obtained N*N matrix, which integrates the position information of each feature matrix point. Then, the resized D feature matrix is multiplied with the softmax result and resized to the same size as A, C*H*W. The feature result after the product is fused with the original feature map A to obtain the output result of the position attention mechanism module.
[0063] The function of the channel attention module is to fuse the information between each channel of the input image. The specific operation process is as follows: Figure 3 As shown, the downsampled feature map A is first convolved and the convolution result is copied 3 times, recorded as B, C, and D respectively. Then, B, C, and D are resized respectively. If the size of A is C*H*W, the new size is C*N (N=H*W). The resized D feature matrix is transposed and multiplied with the resized C feature matrix to obtain the C*C feature matrix. Then, the obtained C*C matrix is subjected to a softmax operation, thereby integrating the channel information of each feature map. The resized B feature matrix is then multiplied with the softmax result and resized to the same size as A, C*H*W. The feature result after the product is fused with the original feature map A to obtain the output result of the channel attention mechanism module.
[0064] like Figure 4 As shown, it shows the size change process between feature maps between different operations of the position attention mechanism. Figure 2 The operation is consistent with .
[0065] According to the visual attention mechanism, the output results of the position attention mechanism module and the channel attention mechanism module are fused to output the change detection result map.
[0066] In this disclosed embodiment, the outputs of the two are first element-by-element superimposed to obtain a superposition result, which is then fed into a 3x3 convolutional layer for convolution to achieve feature fusion and ultimately obtain a prediction result. This prediction result is an image with a 0-1-2 label to indicate the state of change (including unchanged, increased, and decreased) in the remote sensing image to be detected, thus completing the change detection of remote sensing images.
[0067] Step S3: Calculate the loss value Loss based on the difference between the predicted result and the true value; Loss = real_loss + w*aux_loss
[0068] Wherein, real_loss is the loss obtained by the Discriminative Loss function, aux_loss is the additional loss, and w is the coefficient of the additional loss function. In the embodiment of the present disclosure, the value w=0.2;
[0069] Where real_loss = α·L var +β·L dist +γ·L reg (1)
[0070] The loss of Discriminative Loss consists of three items. The first item is to make the embedding vectors belonging to the same category as close as possible, the second item is to make the embedding vectors belonging to different categories as far as possible, and the third item is a constraint item.
[0071] The specific calculation formula is:
[0072]
[0073] In the embodiment of the present disclosure, α=β=1, γ=0.001; where C represents the number of categories in the true label, x i Represents the embedding vector of a pixel, μ c Represents the center of the embedding vector corresponding to all pixels of a certain category in the true class label in the mapping space; N c represents the number of pixels in each category; δ v and δ d are the thresholds for the pull term and the push term, respectively;
[0074] Formula (4) is a constraint that can prevent the mapping center of each category from being too far from the origin.
[0075] The additional loss aux_loss is based on the overall output result, and constrains the position attention mechanism module and the channel attention mechanism module respectively, so that the output results of the position attention mechanism module and the channel attention mechanism module are closer to the label. Its calculation formula is:
[0076] aux_loss=w l *(loss p +loss c ) (5)
[0077]
[0078] Where: N is the number of predicted samples, x represents the sample; loss p is the predicted output result of the position attention mechanism module, loss c is the predicted output result of the channel attention mechanism module, y p is the prediction result output of the position attention mechanism module, y c is the prediction result output of the channel attention mechanism module, and a is the actual change detection label.
[0079] In the above formula (5), w l Loss weights for the predicted outputs of the position and channel attention modules;
[0080] In the disclosed embodiment, an additional loss function adds loss function options for two attention modules, constraining the predicted outputs of the two attention modules to be as similar as possible to the label image. Through such effective constraints, the effect evaluation of the two attention modules can be effectively enhanced, providing a basis for the overall parameter optimization of the network, and effectively improving network performance.
[0081] The remote sensing image change detection method based on the improved DANet algorithm described in the embodiments of the present disclosure applies the semantic segmentation-oriented network structure to the field of remote sensing image change detection. The introduction of a residual learning mechanism can accelerate network convergence, deepen the number of network layers, speed up feature extraction, and solve the problems of gradient vanishing and gradient explosion. At the same time, the improved use of ASPP strengthens the network's perception of image features. While ensuring algorithm accuracy, it is more efficient than other deep learning methods. This allows the algorithm to maintain a high level of accuracy and efficiency, while having high precision and strong robustness. It is suitable for the field of remote sensing image change detection and can also be extended to other fields, which is of great significance.
[0082] Example 2
[0083] The present disclosure discloses a remote sensing image change detection system based on an improved DANet algorithm. Figure 5 As shown, it includes an image preprocessing module, a fusion processing module and a loss value calculation module;
[0084] The image preprocessing module is used to preprocess the image to be detected, and then splice and reassemble the preprocessed two-phase remote sensing images as input images;
[0085] The fusion processing module is based on the DANet network, which performs downsampling feature extraction on the input image, and then performs two parallel processing modules, the position attention mechanism module and the channel attention mechanism module, and finally fuses the output results of the position attention mechanism module and the channel attention mechanism module to obtain the prediction result;
[0086] The loss value calculation module is used to calculate the loss value Loss based on the difference between the predicted result and the true value; the calculation formula is: Loss = real_loss + w*aux_loss; the specific calculation and derivation process is the same as the calculation process of the loss value Loss described in the aforementioned embodiment 1, and will not be repeated here.
[0087] In the embodiment of the present disclosure, the image preprocessing module preprocesses the image to be detected, including the following process:
[0088] The image to be detected is preprocessed, and data enhancement operations are performed on the two remote sensing images at different phases. The enhancement includes flipping, rotating, zooming in and out.
[0089] The pre-processed two-phase remote sensing images are stitched and reassembled to form a 6-channel or 8-channel input image; the 6-channel is a three-channel image of two phases, and the 8-channel is a four-channel image of two phases;
[0090] Randomly select a common channel of two remote sensing images of different phases, add a channel of all zeros with the same width and height, and splice them into a new 3-channel image with the same width and height, and use it as the input image.
[0091] Example 3
[0092] The presently disclosed embodiment discloses a remote sensing image change detection device based on an improved DANet algorithm, comprising a processor and a memory electrically connected to each other; the memory is used to store a computer program; when the processor executes the aforementioned computer program, the remote sensing image change detection method based on the improved DANet algorithm described in the aforementioned embodiment 1 can be implemented. The specific detection method is the same as the remote sensing image change detection method based on the improved DANet algorithm described in the embodiment 1, and will not be repeated here.
[0093] Example 4
[0094] The presently disclosed embodiment discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed, the remote sensing image change detection method based on the improved DANet algorithm described in the aforementioned embodiment 1 can be implemented. The specific detection method is the same as the remote sensing image change detection method based on the improved DANet algorithm described in the embodiment 1, and will not be repeated here.
[0095] The computer described in the embodiment of the present application can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. The computer-readable storage medium can be any available medium that a computer can read or a data storage device such as a server, a data center, etc. that includes one or more available media integrations. The available medium can be a magnetic medium, (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital versatile disc (DVD)) or a semiconductor medium (for example, a solid-state drive (SSD)), etc. The software formed by the computer storage code can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, or the like.
[0096] The functional modules in the various embodiments of the present application can be integrated into a processing unit or module, or each module can exist physically separately, or two or more modules can be integrated into a unit or module. In the above embodiments, they can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part.
[0097] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A remote sensing image change detection method based on the improved DANet algorithm, characterized in that The following steps are involved: S1: First, the image to be detected is preprocessed, and then the preprocessed two-phase remote sensing images are spliced and reassembled as the input image; S2: Based on the DANet network, downsample the input image and extract its features; use the resnet50 network to extract the downsampled features of the input image; the resnet50 network contains 4 residual blocks, each of which contains 3, 4, 6, and 3 convolution blocks respectively. Each convolution block has three layers of convolution, and the convolution kernel sizes are 1*1, 3*3, and 1*1 respectively; use ASPP to apply the dilated convolution method to the resnet50 network, and perform spatial pyramid pooling on the middle 3*3 layer of the residual block for the third and fourth residual blocks. In the third residual block, the dilated convolution coefficient rate is 2; in the fourth residual block, the dilated convolution coefficient rate is 4; Then, two parallel position attention mechanism modules and channel attention mechanism modules are processed, and finally the output results of the position attention mechanism module and the channel attention mechanism module are fused to obtain the prediction result; S3: Calculate the loss value Loss based on the difference between the predicted result and the true value; Loss = real_loss + w*aux_loss Where, real_loss = α·L var +β·L dist +γ·L reg (1) Among them, real_loss is the loss obtained by the Discriminative Loss function; aux_loss is the additional loss; w is the coefficient of the additional loss function; α, β, and γ are all constants; C represents the number of categories in the real label; x i Represents the embedding vector of a pixel; μ c Represents the center of the embedding vector corresponding to all pixels of a certain category in the true class label in the mapping space; N c represents the number of pixels in each category; δ v and δ d are the thresholds for the pull term and the push term, respectively; The additional loss aux_loss is based on the overall output result, and constrains the position attention mechanism module and the channel attention mechanism module respectively, so that the output results of the position attention mechanism module and the channel attention mechanism module are closer to the label. Its calculation formula is: aux_loss=w*(loss p +loss c ) (5) Where: N is the number of prediction samples; x represents the sample; y p is the prediction result output of the position attention mechanism module; y c is the prediction result output of the channel attention mechanism module; a is the actual change detection label.
2. The remote sensing image change detection method based on the improved DANet algorithm according to claim 1 is characterized in that The step S1 specifically includes: S11: Preprocessing the image to be detected, performing data enhancement operations on the two remote sensing images at different time phases to be detected, including flipping, rotating, and zooming in and out; S12: stitching and reorganizing the pre-processed remote sensing images of the two temporal phases, stitching the pre-processed remote sensing images of the two different temporal phases to form a 6-channel or 8-channel input image; wherein the 6-channel is a three-channel image of the two temporal phases, and the 8-channel is a four-channel image of the two temporal phases; S13: Randomly select a common channel of two remote sensing images of different phases, add a channel with the same width and height and all zeros, and stitch them into a new 3-channel image with the same width and height, and use it as the input image.
3. The remote sensing image change detection method based on the improved DANet algorithm according to claim 2 is characterized in that The step S2 specifically includes: S21: Input the downsampled features into the position attention mechanism module and channel attention mechanism module of DANet respectively, and obtain the output results of the position attention mechanism module and the channel attention mechanism module respectively; wherein, the position attention mechanism module fuses the position information of each feature point; and the channel attention mechanism module fuses the information between each channel of the input image; S22: The output results of the position attention mechanism module and the channel attention mechanism module are fused, and the superposition results are obtained by element-by-element superposition. Then, the superposition results are input into a 3*3 convolution layer to perform convolution on the superposition results to achieve feature fusion and finally obtain the prediction results.
4. The remote sensing image change detection method based on the improved DANet algorithm according to claim 3 is characterized by: In step S21, the position attention mechanism module fuses the position information of each feature point, specifically including: first convolving the down-sampled feature map and copying it 3 times to divide it into 3-way features, then resizing the 3-way features, and the new size is the number of channels of the original feature map * the product of the height and width, transposing the resized 1st-way feature matrix and multiplying it with the 2nd-way feature matrix, performing a softmax operation on the result, and then multiplying the 3rd-way feature matrix with the softmax result and resizing it to the same size as the feature map obtained by the original downsampling, and finally fusing this feature result with the original feature map to obtain the output result of the position attention mechanism module.
5. The remote sensing image change detection method based on the improved DANet algorithm according to claim 3 is characterized by: In step S21, the channel attention mechanism module fuses the information between each channel of the input image, specifically including: first convolving the feature map obtained by downsampling and copying 3 copies into 3 paths, then resizing the 3-path features, and the new size is the number of channels of the original feature map * the product of the height and width, transposing the resized 3-path feature matrix and multiplying it with the 2-path feature matrix, performing a softmax operation on the result, and then multiplying the 1-path feature matrix with the result after softmax and resizing it to the same size as the feature map obtained by the original downsampling, and finally fusing this feature result with the original feature map to obtain the output of the channel attention mechanism module.
6. A remote sensing image change detection system based on an improved DANet algorithm, used to implement the remote sensing image change detection method based on an improved DANet algorithm according to claim 1, characterized in that: It includes image preprocessing module, fusion processing module and loss value calculation module; The image preprocessing module is used to preprocess the image to be detected, and then splice and reassemble the preprocessed two-phase remote sensing images as input images; The fusion processing module is based on the DANet network, which performs downsampling feature extraction on the input image, and then performs two parallel processing modules, the position attention mechanism module and the channel attention mechanism module, and finally fuses the output results of the position attention mechanism module and the channel attention mechanism module to obtain the prediction result; The loss value calculation module is used to calculate the loss value Loss according to the difference between the prediction result and the true value; Loss=real_loss+w*aux_loss.
7. The remote sensing image change detection system based on the improved DANet algorithm according to claim 6 is characterized in that: The image preprocessing module preprocesses the image to be detected, including the following process: The image to be detected is preprocessed, and data enhancement operations are performed on the two remote sensing images at different phases. The enhancement includes flipping, rotating, zooming in and out. The pre-processed two-phase remote sensing images are stitched and reassembled to form a 6-channel or 8-channel input image; the 6-channel is a three-channel image of two phases, and the 8-channel is a four-channel image of two phases; Randomly select a common channel of two remote sensing images of different phases, add a channel of all zeros with the same width and height, and splice them into a new 3-channel image with the same width and height, and use it as the input image.
8. A remote sensing image change detection device based on an improved DANet algorithm, comprising a processor and a memory electrically connected to each other; the memory is used to store a computer program; and characterized in that: When the processor executes the aforementioned computer program, it can implement the remote sensing image change detection method based on the improved DANet algorithm as described in any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program; When the computer program is executed, the remote sensing image change detection method based on the improved DANet algorithm as described in any one of claims 1 to 5 can be implemented.
Citation Information
Patent Citations
Remote sensing image semantic segmentation method based on region description self-attention mechanism
CN111932553A
Deep learning-based face feature point detection method
WO2022151535A1