Building change detection method and system based on double-branch fusion network

By constructing a method based on a dual-branch fusion network, combining local enhancement modules and self-attention model, the problems of local perceptual deviation and insufficient global feature extraction of building change detection in SAR images are solved, and high-precision results of building change detection are achieved.

CN120375036APending Publication Date: 2025-07-25HANGZHOU DIANZI UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510326653.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing SAR image building change detection method based on deep learning has problems such as local perceptual bias and insufficient global feature extraction capabilities. Especially in SAR images, the building geometry is blurred and the boundaries are difficult to recognize, resulting in low detection accuracy.

Method used

A building change detection method based on a dual-branch fusion network is constructed, combined with local enhancement modules and self-attention model, local and global information of SAR images are extracted, and the model is trained through feature similarity loss function to achieve effective fusion of feature information.

Benefits of technology

It improves the accuracy and accuracy of building change detection, enhances the model's ability to capture local information, and improves the detection accuracy of building edges.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120375036A_ABST
    Figure CN120375036A_ABST
Patent Text Reader

Abstract

The invention discloses a building change detection method and system based on a double-branch fusion network, and the method comprises the following steps: S1, obtaining a double-time-phase SAR image of a building in a target region, carrying out the preprocessing of the double-time-phase SAR image, marking a region where the front and rear adjacent time phases of the double-time-phase SAR image change, and obtaining a data set; s2, classifying the data set in the step S1 by combining a difference generation operator and a clustering algorithm to obtain a training sample set and a test sample set; s3, constructing a double-branch fusion network based on a local enhancement module and a self-attention module, and training the double-branch fusion network by using the training sample set in the step S2; and S4, detecting the test sample set in the step S2 by using the trained double-branch fusion network to obtain a building change detection result of the target area. According to the invention, the building edge detection precision can be improved, and the building change condition can be accurately detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of synthetic aperture radar (SAR) image detection and target recognition, and specifically proposes a building change detection method and system based on a dual-branch fusion network. Background Art

[0002] Synthetic Aperture Radar (SAR) is not easily affected by illumination and climate conditions, and can provide high-resolution images all day and all weather. In the field of remote sensing, compared with optical images, SAR can solve the problem that it is difficult to penetrate clouds to obtain effective images under extremely complex and harsh weather conditions. Therefore, it is of great significance to use dual-temporal SAR images to monitor and evaluate building changes.

[0003] In deep learning, the Transformer model with a self-attention module as the core can capture the global feature information of an image by modeling the dense relationships of the image context information, and has achieved good results in tasks such as SAR image change detection and ground object classification. However, the non-local self-attention mechanism makes the Transformer have a local perception bias and a weak ability to extract local features. In addition, compared with the relatively clear outlines of buildings in optical images, SAR images have problems such as blurred geometric shapes and difficult-to-identify boundaries due to their imaging mechanism. Currently, building change detection in SAR images based on deep learning still poses great challenges. Based on this, the present invention constructs a dual-branch fusion network for building change detection, comprehensively utilizes the local features and global information of SAR images, and improves the local perception ability of the model. Based on the Transformer framework, during the construction of global information, a local enhancement module is introduced at the same time. Through dual-branch feature fusion, the detection accuracy of building changes can be improved with less information loss. Summary of the Invention

[0004] Based on the above deficiencies existing in the prior art, the present invention provides a building change detection method and system based on a dual-branch fusion network. The present invention uses a local enhancement module and a self-attention model to extract the local and global information of SAR images, can effectively fuse feature information of different dimensions, and constructs a joint loss function based on feature similarity loss to train the model.

[0005] To achieve the above invention object, the present invention adopts the following technical solutions:

[0006] A building change detection method based on a dual-branch fusion network, comprising the following steps:

[0007] S1. Obtain dual-temporal SAR images of buildings in the target area, preprocess the dual-temporal SAR images, and label the areas that have changed between the adjacent temporal phases before and after the dual-temporal SAR images to obtain a dataset.

[0008] S2. Classify the dataset in step S1 by combining a difference generation operator and a clustering algorithm to obtain a training sample set and a test sample set; preferably, the ratio of the two is 7:3.

[0009] S3. Construct a dual-branch fusion network based on a local enhancement module and a self-attention module, and train the dual-branch fusion network using the training sample set in step S2.

[0010] S4. Use the trained dual-branch fusion network to predict the test sample set in step S2 to obtain the detection result of the building change situation in the target area.

[0011] As a preferred solution, in step S1, the dual-temporal SAR images are two scenes of SAR images covering the same area at different times, that is, including two scenes of SAR images within the same area.

[0012] As a preferred solution, in step S1, the preprocessing includes, in sequence, study area cropping, multi-look processing, image registration, speckle filtering, geocoding, and radiometric calibration.

[0013] As a preferred solution, step S2 specifically includes:

[0014] S21. Perform relevant operations on the preprocessed dual-temporal single-polarization SAR images using a logarithmic ratio difference generation operator to generate a difference map; S22. Perform dimensional fusion on the difference map and the dual-temporal single-polarization SAR images to obtain a three-dimensional difference expression map;

[0015] S23. Divide the three-dimensional difference expression map into a training sample set and a test sample set through a hierarchical FCM clustering algorithm.

[0016] As a preferred solution, in step S21, the difference map generation operator uses a logarithmic ratio difference generation operator.

[0017] As a preferred solution, in step S21, the difference map feature D LR (p) is:

[0018]

[0019] where I1 and I2 respectively represent the pre- and post-temporal images, and p represents the position of the pixel in the image.

[0020] As a preferred solution, in step S22, the three-dimensional difference expression map D(p) is:

[0021]

[0022] Among them, 1, 2, and 3 represent the serial numbers of each dimension; D LR is an array representing the difference features obtained by operating on the dual-temporal images, D T1 (p), D T2 (p) respectively represent the SAR image features at times T1 and T2.

[0023] As an optimal solution, in step S23, the clustering algorithm adopts the hierarchical FCM clustering algorithm.

[0024] As an optimal solution, the implementation process of the hierarchical FCM clustering algorithm in step S23 is as follows:

[0025] (1) Input the differential expression map D(p) after dimension fusion;

[0026] (2) Divide the difference map into a changed class and an unchanged class by the FCM algorithm. The number of pixels of is T 1 The upper limit of the true changed class is defined as Among them, the value of σ is set to 1.20;

[0027] (3) Arrange the difference map obtained in step S22 in descending order of the cluster centers by the FCM algorithm as a total of 5 classes, the value of the cluster center of is the largest, the value of the cluster center of the class is the smallest, and the smaller the value of the cluster center, the smaller the probability that the pixels in this class change. The number of pixels in each class is respectively

[0028] (4) Take the pixels of as the changed class Ω c , the changed class Ω c The number is where m is from 2 to 5, and it is necessary to satisfy Otherwise (that is, ), take the pixels of the remaining cluster centers as the unchanged class Ω u . Obtain a pre-classified change map with labels {Ω c , Ω i , Ω u}, and use the changed class and the unchanged class {Ω c , Ω u} as training samples, and the class to be determined Ω i as a test sample.

[0029] As an optimal solution, in step S3, it specifically includes:

[0030] S31. Construct a local enhancement module to extract local features from the classified SAR image;

[0031] S32. Input the local features and the global features extracted by the Vision Transformer model into a dual-branch fusion network for feature fusion, then perform pixel prediction and output the result;

[0032] S33. Construct a feature similarity loss function based on the feature maps of the local enhancement module and the dual-branch feature fusion, and form a joint loss function with the binary cross-entropy loss;

[0033] S34. Through the backpropagation algorithm and the gradient descent algorithm, transfer the joint loss function to the constructed network model to update the network parameters until the training stops.

[0034] As a preferred solution, in step S31, the feature F l extracted by the local enhancement module is:

[0035] F l = Concat(f sc (x), f ca (x)),

[0036] where Concat represents the concatenation of features in the channel dimension, x represents the training samples after classification, f sc (x) and f ca (x) respectively represent spatial feature enhancement and channel feature enhancement, specifically:

[0037] f sc (x) = f se (sum(f iso (x)))·x,

[0038] f ca (x) = σ(f fc2 (δ(f fc1 (f avg (x)))))

[0039] where σ is the sigmoid function, δ is the ReLU activation function, f fc1 and f fc2 are fully connected layers, f avg is the average pooling layer, f iso represents the isotropic Sobel operator (an isotropic Sobel operator, which is a weighted average operator), and f se represents SENet (Squeeze-and-Excitation Networks).

[0040] As a preferred solution, in step S32, the local features and the global features extracted by the Vision Transformer model (the core module of Vision Transformer is the self-attention module, and the local enhancement module constitutes a branch for extracting local features, and the branch composed of the self-attention module forms a dual-branch network. Abbreviated as ViT, it can be called a visual self-attention model) are input into the dual-branch fusion network for feature fusion, and then pixel prediction is performed to output the result; the dual-branch fusion feature F is:

[0041] F = Concat(F inf , F g ),

[0042] where F g and F inf respectively represent the global features extracted by the self-attention module and the features obtained by the cross-attention mechanism, specifically:

[0043]

[0044] Q g , K g , V g = f proj (f pe (F g ))

[0045] Q l , K l , V l = f proj (f pe (F l ))

[0046] where Linear Att represents the linear attention module, represents the Hadamard product, DepthwiseConv represents the depthwise convolutional layer, f pe is the Patch Embedding layer (tile embedding layer), f proj is the linear projection layer, and Q, K, V are the serialized features obtained through linear projection. Q g , K g , V g are the global features extracted by the self-attention module obtained through linear projection, representing the three feature vectors of query, key, and value respectively. Q l , K l , V l are the local features extracted by the local enhancement module obtained through linear projection, representing the three feature vectors of query, key, and value respectively; g represents the global feature, and l represents the local feature.

[0047] As a preferred solution, in step S33, the feature similarity loss function Loss fs is:

[0048]

[0049] where n represents the number of feature vectors corresponding to feature F, b represents the batch size, and u i represents the feature vector corresponding to feature F c and v i represents the feature vector corresponding to feature F inf ||·||2 represents the L2 norm, that is, the Euclidean length of the vector.

[0050] Therefore, the combined loss function Loss is obtained as:

[0051] Loss = Loss bce + Loss fs ,

[0052] where Loss bce represents the binary cross-entropy loss.

[0053] As a preferred solution, in step S34, through the backpropagation algorithm and the gradient descent algorithm (the backpropagation algorithm and the gradient descent algorithm are common ways to train neural networks, where the gradient descent algorithm is to minimize the combined loss function to update network parameters, and the classical Adam optimization algorithm is adopted. The core of training the network is the following network parameter update process), the combined loss function is passed to the built network model to update network parameters, and the training is stopped when the training loss value does not change or the change range is less than the set value during the iteration process; the network parameter update process is:

[0054]

[0055] where W t i and are the parameters of the i-th layer of the deep neural network at the t-th iteration and the (t + 1)-th iteration respectively, and η is the learning rate at the t-th iteration. Loss represents the combined loss function, is the partial derivative symbol, represents the partial derivative of the combined loss function Loss with respect to the parameter W t i of the i-th layer of the deep neural network at the t-th iteration.

[0056] The present invention also provides a building change detection system based on a double-branch fusion network for executing the above method, including the following modules:

[0057] An image preprocessing module, which is used to obtain dual-temporal SAR images of buildings in the target area and preprocess the dual-temporal images;

[0058] A labeling module, which is used to label the changed areas in the dual-temporal SAR images of the target area to obtain an initial data set;

[0059] A pre-classification module, which is used to classify the data set by combining a difference generation operator and a clustering algorithm to generate a high-quality training sample set and a test sample set;

[0060] A model construction and training module, which is used to construct a dual-branch fusion network based on a local enhancement module and a self-attention module, and use the training samples to train the model to obtain a trained model;

[0061] A change detection module, which is used to detect the test sample set using the trained network model to obtain the detection result of the building change situation in the target area.

[0062] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0063] (1) In the present invention, the local enhancement module fully extracts the local features of the dual-temporal SAR images, enhances the model's ability to capture local information, and thus improves the detection accuracy.

[0064] (2) The effective fusion of local and global information based on the dual-branch fusion network and the joint loss function based on feature similarity loss improve the detection accuracy of the model while accurately locating and identifying the building edges. Description of the Drawings

[0065] Figure 1 is a flowchart of a building change detection method based on a dual-branch fusion network according to a preferred embodiment of the present invention;

[0066] Figure 2 is a framework diagram of a building change detection system based on a dual-branch fusion network according to a preferred embodiment of the present invention.

[0067] Figure 3 is an architecture diagram of the local enhancement module according to a preferred embodiment of the present invention.

[0068] Figure 4 is an architecture diagram of the self-attention module according to a preferred embodiment of the present invention. Detailed Embodiments

[0069] To more clearly illustrate the embodiments of the present invention, the specific implementation manners of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings, and other implementation manners can also be obtained.

[0070] The building change detection method based on a dual-branch fusion network of the present invention can be summarized as follows: Obtain dual-temporal single-polarization SAR images, and successively perform preprocessing on the SAR images, such as study area cropping, multi-look processing, image registration, multi-temporal filtering, geocoding, and radiometric calibration, and label the real changes to form a data set; then construct a dual-branch fusion network based on a local enhancement module and a self-attention module and train the model; finally, use the trained model to predict the building change situation in the target area and obtain the corresponding detection results.

[0071] As Figure 1 shown, a building change detection method based on a dual-branch fusion network in this embodiment includes the following steps:

[0072] Step 1: Obtain dual-temporal single-polarization SAR images of buildings in the target area, and successively perform preprocessing on the SAR images, such as study area cropping, multi-look processing, image registration, speckle filtering, geocoding, and radiometric calibration. Crop the SAR images to a size of 256×256 pixels and label the real changed buildings between adjacent time phases before and after the images to obtain a data set.

[0073] Among them, the dual-temporal SAR images include SAR images with HH polarization in the same area with an interval of about one year.

[0074] Step 2: Classify the data set by combining a difference generation operator and a clustering algorithm to obtain a training sample set and a test sample set.

[0075] Specifically, step 2 includes the following steps:

[0076] (1) Use a logarithmic ratio difference generation operator to extract difference features from the dual-temporal single-polarization images, and the obtained difference map feature D LR (p) is:

[0077]

[0078] where I1 and I2 respectively represent the images of the previous and subsequent time phases, and p represents the position of the pixel in the image;

[0079] (2) Perform dimensionality fusion on the difference map and the dual-temporal single-polarization images to obtain a three-dimensional difference expression map D(p) as:

[0080]

[0081] Among them, D T1 (p), D T2 (p) represent the SAR image features at times T1 and T2 respectively.

[0082] (3) Classify the three-dimensional differential expression map using the hierarchical FCM clustering algorithm to obtain the training sample set and the test sample set. The specific steps of this step are as follows:

[0083] 1) Input the differential expression map D(p) after dimensional fusion;

[0084] 2) Divide the difference map into a changed class and an unchanged class two categories; The number of pixels of is T 1 , and the upper limit of the true changed class is defined as Among them, σ is the value setting;

[0085] 3) Arrange the difference map in descending order of the cluster centers as a total of 5 categories, The value of the cluster center of is the largest, The value of the cluster center of the class is the smallest; the number of pixels in each category is respectively

[0086] 4) Take the pixels of as the changed class Ω c , and the number of the changed class Ω c is where m is from 2 to 5 and satisfies Otherwise, take the pixels of the remaining cluster centers as the unchanged class Ω u ; obtain the pre-classified change map with labels {Ω c , Ω i , Ω u}, and use the data with labels {Ω c , Ω u} as the training samples and the data with labels {Ω i} as the test samples.

[0087] Step 3: Construct a dual-branch fusion network based on the local enhancement module and the self-attention module, and train the dual-branch fusion network using the training sample set in Step S2.

[0088] Specifically, Step 3 includes the following steps:

[0089] (1) It is constructed by introducing the isotropic Sobel operator in the edge detection operator. The local enhancement module can be divided into two parts: spatial and channel-wise, and processes the input data simultaneously. Specifically: 1) Spatial part: It consists of an isotropic Sobel operator, a summation function, a Squeeze-and-Excitation network, and a residual connection in sequence; 2) Channel-wise part: It consists of an average pooling layer, two fully connected layers, a ReLU activation function, and a sigmoid function.

[0090] The local enhancement module performs local feature extraction on the classified SAR image; the process of extracting feature F l is as follows:

[0091] F l = Concat(f sc (x), f ca (x)),

[0092] where Concat represents the concatenation of features in the channel dimension, x represents the training sample after pre-classification, and f sc (x) and f ca (x) represent spatial feature enhancement and channel feature enhancement respectively:

[0093] f sc (x) = f se (sum(f iso (x)))·x,

[0094] f ca (x) = σ(f fc2 (δ(f fc1 (f avg (x))))),

[0095] where σ is the sigmoid function, δ is the ReLU activation function, f fc1 and f fc2 are fully connected layers, f avg is the average pooling layer, f iso represents the isotropic Sobel operator, and f se represents SENet.

[0096] (2) Extract global features based on the Vision Transformer model with the self-attention module as the core. The process of extracting feature F g is as follows: F g = f ff (f at (f pe (x))). Where f pe represents the Patch Embedding layer, and f atDenote the self-attention module as f ff Denote the feed-forward network. Input the global features and the local features extracted by the local enhancement module into the dual-branch fusion network for feature fusion. The dual-branch feature fusion process is as follows:

[0097] F = Concat(F inf , F g ),

[0098] where F g and F inf respectively represent the global features extracted by the self-attention module and the features obtained by the cross-attention mechanism, specifically:

[0099]

[0100] Q g , K g , V g = f proj (f pe (F g ))

[0101] Q l , K l , V l = f proj (f pe (F l ))

[0102] where Linear Att represents the linear attention module, represents the Hadamard product, DepthwiseConv represents the depthwise convolutional layer, f pe is the Patch Embedding layer, f proj is the linear projection layer, and Q, K, V are the serialized features obtained through linear projection.

[0103] (3) After the feature map passes through the dual-branch fusion network, decode the fused features, and obtain the final prediction result through flattening, convolution, and fully connected operations.

[0104] (4) According to the feature map extracted by the local enhancement module and the feature map of the dual-branch feature fusion, construct the feature similarity loss function Loss fs :

[0105]

[0106] where b represents the batch size, which is set to 128 in this embodiment, and u i represents the feature vector corresponding to the feature F c , and v i represents the feature Finf The corresponding eigenvector, ||·||2 represents the L2 norm, that is, the Euclidean length of the vector.

[0107] Combine Loss fs Combine the binary cross-entropy loss Loss bce , and obtain the combined loss function Loss:

[0108] Loss = Loss bce + Loss fs

[0109] (5) During the training process, by solving the gradients of the combined loss function with respect to the parameters of each layer of the network, using the backpropagation algorithm and the gradient descent algorithm, the combined loss function is passed to the deep neural network to update the network parameters. The network parameter update process can be expressed by the following formula:

[0110]

[0111] where, W t i and are the parameters of the i-th layer of the deep neural network at the t-th iteration and the (t + 1)-th iteration respectively, η is the learning rate at the t-th iteration. In this embodiment, the initial learning rate is set to 3×10 -5 , and the learning rate during the iteration is reduced by a fixed-step decay method. In this embodiment, all datasets are iterated 15 times to obtain the final building change detection model.

[0112] Step 4: Use the trained model to predict the test samples, obtain the change situation of the target area, and compare with the real change map to obtain the detection result and the visualized change map.

[0113] The method of the present invention is experimentally tested on the publicly available Yellow River dataset. The results are shown in the following table. Compared with the other five methods, the technology of the present invention has achieved remarkable technical effects in the change detection task.

[0114]

[0115]

[0116] As Figure 2 shown, this embodiment discloses a building change detection system based on a dual-branch fusion network, including an image preprocessing module, an annotation module, a classification module, a model construction and training module, and a change detection module.

[0117] The image preprocessing module of this embodiment is used to obtain the dual-temporal SAR images of the buildings in the target area and preprocess the dual-temporal single-polarization SAR images;

[0118] The annotation module of this embodiment is used to annotate the building change areas in the image range to obtain a data set;

[0119] The pre-classification module of this embodiment is used to pre-classify the data set based on the logarithmic ratio difference generation operator and the hierarchical FCM clustering algorithm to obtain a high-quality training sample set and a test sample set;

[0120] The model construction and training module of this embodiment is used to construct a dual-branch fusion network model based on the local enhancement module and the self-attention module, and use the training sample set to train the network to obtain a trained model;

[0121] The change prediction module of this embodiment is used to predict the building change result of the target area by using the trained dual-branch fusion network model.

[0122] Other contents of this embodiment can refer to the above method embodiment.

[0123] In summary, the present invention constructs a dual-branch fusion network based on local feature enhancement and self-attention, comprehensively utilizes the local features and global information of dual-temporal single-polarization SAR images, and can improve the accuracy of building edge detection by enhancing the local perception ability, and finally realizes the accurate detection of building change situations.

[0124] The above is only a detailed description of the preferred embodiments and principles of the present invention. For those of ordinary skill in the art, according to the idea provided by the present invention, there will be changes in the specific implementation manners, and these changes should also be regarded as the protection scope of the present invention.

Claims

1. A building change detection method based on a dual-branch fusion network, characterized in that, It includes the following steps: S1. Obtain the dual-temporal SAR images of the buildings in the target area, preprocess the dual-temporal SAR images, and label the areas that change between the adjacent temporal phases before and after the dual-temporal SAR images to obtain a dataset; S2. Classify the dataset in step S1 by combining a difference generation operator and a clustering algorithm to obtain a training sample set and a test sample set; S3. Construct a dual-branch fusion network based on a local enhancement module and a self-attention module, and train the dual-branch fusion network using the training sample set in step S2; S4. Use the trained dual-branch fusion network to detect the test sample set in step S2 to obtain the building change detection results in the target area.

2. The building change detection method based on the dual-branch fusion network according to claim 1, wherein, In step S1, the dual-temporal SAR images are two scenes of SAR images covering the same area at different times.

3. The building change detection method based on the dual-branch fusion network according to claim 1, wherein In step S1, the preprocessing includes regional cropping, multi-look processing, image registration, speckle filtering, geocoding, and radiometric calibration.

4. The method for detecting building changes based on the dual-branch fusion network according to claim 1, characterized in that, Step S2 specifically includes: S21. Use the logarithmic ratio difference generation operator to operate on the preprocessed dual-temporal SAR images to generate a difference map, and the feature D of the difference map LR (p) is: where I1 and I2 respectively represent the images of the previous and subsequent temporal phases, and p represents the position of the pixel in the image; S22. Perform dimensional fusion on the difference map and the dual-temporal SAR images to obtain a three-dimensional difference expression map. The three-dimensional difference expression map D(p) is: Among them, 1, 2, and 3 represent the serial numbers of each dimension; D LR is an array representing the difference features obtained by operating on the dual-temporal images, D T1 (p), D T2 (p) represent the SAR image features at times T1 and T2 respectively; S23. Divide the three-dimensional difference expression map obtained in step S22 into a training sample set and a test sample set through a hierarchical FCM clustering algorithm.

5. The method for detecting building changes based on a dual-branch fusion network according to claim 4, wherein, Step S23 is specifically as follows: (1) Input the difference expression map D(p) after dimensional fusion; (2) Divide the difference map into a changed class and an unchanged class ; The number of pixels of 1 is T where σ is a value setting; (3) Arrange the three-dimensional differential expression map obtained in step S22 in descending order of the cluster centers as There are a total of 5 categories, The value of the cluster center of is the largest, The value of the cluster center of the category is the smallest; the number of pixels in each category is respectively (4) Take 's pixels as the variation class Ω c , and the number of variation classes Ω c is where m is from 2 to 5 and satisfies If Take the pixels of the remaining cluster centers as the non-variation class Ω u ; Obtain a pre-classified change map with labels {Ω c , Ω i , Ω u}, and use the variation class and non-variation class {Ω c , Ω u} as training samples, and the to-be-determined class Ω i as a test sample.

6. The building change detection method based on the dual-branch fusion network according to claim 1, characterized in that Step S3 specifically includes: S31. The local enhancement module extracts local features from the classified SAR image, and the feature F extracted by the local enhancement module is: l as follows: F l = Concat(f sc (x), f ca (x)), Among them, Concat represents the concatenation of features in the channel dimension, x represents the training samples after classification, and f sc (x) and f ca (x) represent spatial feature enhancement and channel feature enhancement respectively, specifically: f sc (x) = f se (sum(f iso (x)))·x, f ca (x) = σ(f fc2 (δ(f fc1 (f avg (x))))), Among them, σ is the sigmoid function, δ is the ReLU activation function, and f fc1 and f fc2 are fully connected layers, f avg is the average pooling layer, f iso represents the isotropic Sobel operator, and f se represents SENet; S32. Input the local features and the global features extracted by the Vision Transformer model into the dual-branch fusion network for feature fusion, then perform pixel prediction and output the results. The dual-branch fusion feature F is: F = Concat(F inf , F g ), Among them, F g and F inf respectively represent the global features extracted by the self-attention module and the features obtained by the cross-attention mechanism, specifically: Q g ,K g ,V g =f proj (f pe (F g )) Q l ,K l ,V l =f proj (f pe (F l )), Among them, Linear Att represents the linear attention module, represents the Hadamard product, DepthwiseConv represents the depthwise convolutional layer, f pe is the Patch Embedding layer, f proj is the linear projection layer, Q g , K g , V g are obtained by linearly projecting the global features extracted by the self-attention module, representing the three feature vectors of query, key, and value respectively, Q l , K l , V l are obtained by linearly projecting the local features extracted by the local enhancement module, representing the three feature vectors of query, key, and value respectively; g represents the global feature, and l represents the local feature; S33. Construct a feature similarity loss function based on the obtained feature map, and form a combined loss function with the binary cross-entropy loss; the feature similarity loss function Loss fs is as follows: Among them, n represents the number of feature vectors corresponding to feature F, b represents the batch size, and u i represents feature F l corresponding feature vector, v i represents feature F inf corresponding feature vector, ||·||2 represents the L2 norm; Obtain the joint loss function Loss as: Loss=Loss bce +Loss fs , Among them, Loss bce represents binary cross-entropy loss; S34. Through the backpropagation algorithm and the gradient descent algorithm, transfer the joint loss function to the constructed network model to update the network parameters. Stop training when the training loss value does not change or the change amplitude is less than the set value during the iteration process. The update process of the network parameters is: Among them, W t i and are the parameters of the i-th layer of the deep neural network at the t-th iteration and the (t + 1)-th iteration respectively, and η is the learning rate at the t-th iteration; Loss represents the joint loss function, is the symbol of the partial derivative, represents the partial derivative of the joint loss function Loss with respect to the parameter W t i of the i-th layer of the deep neural network at the t-th iteration.

7. A building change detection system based on a dual-branch fusion network for performing the method according to any one of claims 1-6, characterized in that, It includes the following modules: An image preprocessing module, which is used to obtain the dual-temporal SAR images of the buildings in the target area and preprocess the dual-temporal SAR images; A labeling module, which is used to label the areas that change in the dual-temporal SAR images of the target area to obtain a dataset; A classification module, which is used to classify the dataset by combining a difference generation operator and a clustering algorithm to generate a training sample set and a test sample set; A model construction and training module, which is used to construct a dual-branch fusion network based on a local enhancement module and a self-attention module, and train the dual-branch fusion network using the training samples; A change detection module, which uses the trained dual-branch fusion network to detect the test sample set to obtain the building change detection results in the target area.

Citation Information

Cited By

  • SAR image filtering method based on structural strength joint consistency

    CN121788360A

  • A SAR image filtering method based on structural strength joint consistency

    CN121788360B