Building image segmentation method and device based on wide-focus multi-attention mechanism

By designing the wide-focus multi-attention neural network model CPFU-Net based on U-Net in building image segmentation, combined with the channel and position attention modules, the problem of insufficient multi-scale information extraction and edge detail retention in the existing technology is solved. , achieving higher segmentation accuracy and precision.

CN118657943APending Publication Date: 2024-09-17HENAN UNIVERSITY
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410845006.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

Existing building image segmentation methods have deficiencies in extracting multi-scale information of images and retaining edge details, and are prone to missing small target buildings and blurring the edges of segmented targets.

Method used

A wide focus multi-attention neural network model CPFU-Net based on the U-Net structure is designed. By integrating the SE module into the channel attention module, combining the position attention module and the wide focus module, the jump connection of the U-Net network is embedded. , extract features to improve the accuracy of building segmentation.

Benefits of technology

It effectively utilizes the low-level and high-level semantic information of the image to improve the loss of details, improve the accuracy and precision of building segmentation, and overcome the blurring of the edges of segmented buildings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657943A
    Figure CN118657943A
Patent Text Reader

Abstract

The invention discloses a building image segmentation method and device based on a wide-focus multi-attention mechanism, and the method comprises the steps: constructing an improved encoder-decoder model CPFU-Net based on a U-Net network, and enabling the CPFU-Net model to be used for the segmentation of a building in a remote sensing image; the CPFU-Net comprises an encoder, a connection path and a decoder; a channel attention module, a position attention module and a wide focusing module are embedded in the connection path in a cascade mode; and the building in the remote sensing image is segmented based on the trained CPFU-Net. The CPFU-Net network model provided by the invention can make full use of low-level and high-level semantic information of the image, and obtains a relatively advanced level in accuracy and precision of building segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of remote sensing image processing, and in particular to a method and device for building image segmentation based on a wide-focus multi-attention mechanism. Background Art

[0002] Remote sensing image segmentation plays an important role in land use, urban planning, and land-sea separation. Segmenting buildings from high-resolution remote sensing images can provide basic data support for estimating the area of ​​buildings and urban planning and construction. Therefore, building segmentation is one of the hot research issues that scientific researchers are concerned about.

[0003] With the continuous development of deep learning technology, convolutional neural networks have shown excellent performance in the field of image segmentation and have been widely used. The full convolutional neural network proposed by Long et al. [Long J, Shelhamer E, Darrell T. Fully convolutional networks for semantic segmentation [C] / / Proceedings of the IEEE conference on computer vision and pattern recognition. 2015: 3431-3440.] uses convolutional layers instead of fully connected layers to learn pixel-to-pixel mapping, and performs reasoning after extracting image features, but ignores the connection between pixels. In order to solve this problem, various FCN network structures have been proposed. For example, the PSPNet proposed by Zhao et al. [Zhao H, Shi J, Qi X, et al. Pyramid scene parsing network [C] / / Proceedings of the IEEE conference on computer vision and pattern recognition. 2017: 2881-2890.] introduces more context information through global average pooling operations and feature fusion on the basis of FCN, thereby avoiding missegmentation to a certain extent. The SegNet proposed by Badrinarayanan et al. [Badrinarayanan V, Kendall A, Cipolla R. Segnet: A deep convolutional encoder-decoder architecture for image segmentation [J]. IEEE transactions on pattern analysis and machine intelligence, 2017, 39 (12): 2481-2495.] consists of an encoder-decoder and a softmax classification layer. The softmax layer calculates each pixel and uses relatively less memory utilization to achieve efficient computing.

[0004] Although the above-mentioned building image segmentation method has achieved relatively good segmentation effects, it still has some shortcomings, such as the failure to extract the multi-scale information of the image, the easy omission of small target buildings and the blurred edges of the segmented targets. Summary of the invention

[0005] In view of the above problems, the present invention proposes a method and device for building image segmentation based on a wide focus multi-attention mechanism, and specifically designs a new wide focus multi-attention neural network model CPFU-Net based on the U-Net structure. The present invention first integrates the SE module into the channel attention module to better capture the dependencies between channels; secondly, the wide focus module WFM is proposed and combined with the position attention module PACM and the channel attention module CACM in a cascade manner to extract features, effectively retaining the edge details of the building; then the WFM module, PACM module and CACM module are embedded in the jump connection of the U-Net network to further improve the accuracy of building segmentation; experimental results show that the proposed CPFU-Net network model can make full use of the low-level and high-level semantic information of the image, and has achieved a relatively advanced level in the accuracy and precision of building segmentation.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] On the one hand, the present invention proposes a building image segmentation method based on a wide focus multi-attention mechanism, comprising:

[0008] An improved encoder-decoder model CPFU-Net is constructed based on the U-Net network for building segmentation in remote sensing images; the CPFU-Net includes an encoder, a connection path and a decoder; the connection path is embedded in a channel attention module, a position attention module and a wide focus module in a cascade manner;

[0009] Buildings in remote sensing images are segmented based on the trained CPFU-Net.

[0010] Furthermore, the encoder includes multiple convolutional layers, each convolutional layer includes 3×3 convolution, batch normalization, ReLU activation function and maximum pooling operation.

[0011] Furthermore, the decoder adopts bilinear interpolation as an upsampling technique, each step of the decoding path includes upsampling of the feature map and a cascade operation with the corresponding cropped feature map, and the last layer of the decoder adopts a 1×1 convolutional layer to map the features into pixel-level class labels to achieve segmentation of building targets.

[0012] Furthermore, the channel attention module is composed of a feature processing module and a SE module. The feature processing module includes a feature extraction unit and a feature optimization unit. The SE module is located between the feature extraction unit and the feature optimization unit. The feature extraction unit and the feature optimization unit are both composed of a 3×3 convolutional layer, a batch normalization layer, and a ReLU activation function.

[0013] Furthermore, in the position attention module, a convolution layer is first applied to obtain dimension reduction features, and three convolution operations are performed to form three feature maps A, B, and D of sizes H×W×C; then A is transformed into an N×C feature map A' by shaping and transposing, N=H×W, and B is transformed into a C×N feature map B' by shaping, and matrix multiplication and Softmax operations are performed on A' and B' to obtain an attention weight map of size N×N; then the shape of D is transformed into C×N by shaping, and matrix multiplication is performed with the obtained attention weight map to obtain an optimized feature map; finally, the original feature map and the optimized feature map are matrix added and the result is merged into the original input.

[0014] Furthermore, the wide focus module consists of two parts, namely: a hybrid dilated convolution layer and a feature optimization layer; the hybrid dilated convolution layer uses different expansion rates to extract features of different scales; the feature optimization layer includes 3×3 convolution, BN normalization and ReLU activation function; the hybrid dilated convolution layer and the feature optimization layer are connected in a cascade manner.

[0015] Furthermore, the CPFU-Net uses binary cross entropy as the loss function.

[0016] Another aspect of the present invention provides a building image segmentation device based on a wide focus multi-attention mechanism, comprising:

[0017] A model building unit, which builds an improved encoder-decoder model CPFU-Net based on a U-Net network for building segmentation in remote sensing images; the CPFU-Net includes an encoder, a connection path and a decoder; the connection path is embedded in a channel attention module, a position attention module and a wide focus module in a cascade manner;

[0018] The building image segmentation unit is used to segment buildings in remote sensing images based on the trained CPFU-Net.

[0019] Compared with the prior art, the present invention has the following beneficial effects:

[0020] The present invention firstly integrates the SE module into the channel attention module to better capture the dependencies between channels; secondly, proposes a wide focus module WFM and combines it with the position attention module PACM and the channel attention module CACM in a cascade manner to extract features, effectively retaining the edge details of the building; then embeds the WFM module, the PACM module and the CACM module into the jump connection of the U-Net network to further improve the accuracy of building segmentation; experimental results show that the proposed CPFU-Net network model can make full use of the low-level and high-level semantic information of the image and improve the detail loss phenomenon. While focusing on the domain of interest, the model also retains the edge detail information of the building segmentation, and has achieved a relatively advanced level in the accuracy and precision of building segmentation, effectively overcoming the phenomenon of blurred edges of segmented buildings. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic diagram of the CPFU-Net network model architecture constructed for an embodiment of the present invention;

[0022] Figure 2 A schematic diagram of the structure of a channel attention module constructed for an embodiment of the present invention;

[0023] Figure 3 A schematic diagram of the structure of a position attention module constructed for an embodiment of the present invention;

[0024] Figure 4 A schematic diagram of the structure of a wide focus module constructed for an embodiment of the present invention;

[0025] Figure 5 Comparison of building segmentation results of the Satellite dataset provided by the embodiment of the present invention;

[0026] Figure 6 Comparison of building segmentation results in Massachusetts provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:

[0028] On the one hand, the present invention proposes a building image segmentation method based on a wide focus multi-attention mechanism, comprising:

[0029] An improved encoder-decoder model CPFU-Net is constructed based on the U-Net network for building segmentation in remote sensing images; the CPFU-Net includes an encoder, a connection path and a decoder; the connection path is embedded in a channel attention module, a position attention module and a wide focus module in a cascade manner;

[0030] Buildings in remote sensing images are segmented based on the trained CPFU-Net.

[0031] Specifically, in order to improve the segmentation effect at the edge details of buildings, the present invention constructs an improved encoder-decoder model CPFU-Net based on the U-Net network for building segmentation in remote sensing images. The model as a whole consists of an encoder, a connection path and a decoder, such as Figure 1 As shown in the figure. In the encoding stage, each convolution layer includes the following operations: 3×3 convolution, batch normalization, ReLU activation function and maximum pooling. In each downsampling, the number of feature channels is doubled, so that the features of the image are effectively extracted. The connection path embeds the position attention module, channel attention module and wide focus module in a cascade manner, which can obtain the weight information of the image in position and channel and the pixel-level optimized feature map, so as to integrate the low-level and high-level semantic information of the image and effectively retain the detail information of the building. In the decoding stage, by adopting bilinear interpolation as the upsampling technique, each step of the decoding path includes the upsampling of the feature map and the cascade operation with the corresponding cropped feature map. The last layer of the decoding stage uses a 1×1 convolution layer to map the features to pixel-level class labels, so as to achieve accurate segmentation of building targets.

[0032] (1) Channel Attention Convolution Module (CACM)

[0033] Depend on Figure 2 As shown, the channel attention module consists of a 3×3 convolutional layer, batch normalization, ReLU activation function, and SE module, each of which is integrated into the convolutional kernel layer.

[0034] Specifically, CACM consists of two parts: a feature processing module and a SE module. The feature processing module is divided into a feature extraction unit and a feature optimization unit. Both the feature extraction unit and the feature optimization unit consist of a 3×3 convolutional layer, a batch normalization layer, and a ReLU activation function. This design helps to extract local features of the data. Adding a batch normalization layer ensures the stability and training speed of the model, and the ReLU activation function is used to reduce the information loss in the feature extraction stage. Next, in the SE module, a global average pooling operation is used to compress the feature map with local H×W×C in the feature extraction stage. The feature map of H×W×C is compressed into a single number of 1×1×C. Then, the feature map with channel attention is learned through a fully connected layer, and the dimension of the feature map is still 1×1×C. Then, an excitation operation is performed using a sigmoid activation. The feature map with channel attention of 1×1×C and the original input H×W×C are multiplied by the weight coefficient one by one, and the feature map of channel attention is output. Finally, after the feature extraction unit and the SE module operations, the feature optimization unit is performed to further enhance the model's understanding in the channel dimension. The purpose of this design is to integrate information from different channels to better learn the complex features in the input data channels, enabling the model to learn channel correlations between feature maps at different levels.

[0035] CACM mainly ensures that the network can improve its sensitivity to channel information features so that they can be utilized by subsequent transformations. In order to exploit channel dependencies, the weights of each channel in the output features are considered. This is achieved by explicitly modeling channel interdependence, which is divided into two steps: compression and excitation. The compression and excitation modules can be flexibly applied directly to standard convolutions. To illustrate this, the SE (Squeeze-and-Excitation) module is integrated into the designed channel attention module.

[0036] The compression is implemented by using global average pooling as a squeeze operator to compress the H×W×C features into 1×1×C, that is, compressing each channel into a number, where H, W, and C represent the height, width, and number of channels, respectively. Specifically, by using the global average pooling operation, the statistics are generated The cth element of z is calculated by the following formula (see Hu J, Shen L, Sun G. Squeeze-and-excitation networks [C] / / Proceedings of the IEEE conference on computer vision and pattern recognition. 2018: 7132-7141.):

[0037]

[0038] In order to use the information gathered in the squeeze operation, a second operation is performed after it, with the goal of fully capturing channel dependencies. To achieve this relationship, the function must be flexible because it needs to be able to learn nonlinear interactions between channels. At the same time, it needs to satisfy a non-mutually exclusive relationship because it needs to ensure that multiple channels are allowed to be emphasized instead of activated at once. To meet these criteria, we choose to use S-shaped activation (see Hu J, Shen L, Sun G. Squeeze-and-excitation networks [C] / / Proceedings of the IEEE conference on computer vision and pattern recognition. 2018: 7132-7141.):

[0039] s=F ex (z,W)=σ(g(z,W))=o(W2δ(W1z))#(2)

[0040] Where δ refers to the ReLU function, In the proposed model, R is set to 3, which is the best parameter obtained through experiments.

[0041] The Excitation operation uses the Sigmoid activation function as the excitation operator. Its purpose is to obtain the weight of each channel and finally apply the obtained weight to the corresponding channel. SE assigns weights to each feature channel. The algorithm can automatically obtain the importance of each feature channel and choose to enhance or suppress each feature channel.

[0042] (2) Position Attention Convolution Module (PACM)

[0043] Figure 3The design diagram of the position attention module is given. In the PACM module, the convolution layer is first applied to obtain the reduced-dimensional features, and three convolution operations are performed to form three feature maps A, B, and D of sizes H×W×C. Then the shape of A is changed to N×C (N=H×W) by shaping and transposing to obtain the feature map A', and the size of B is changed to C×N by shaping to obtain the feature map B'. Matrix multiplication and Softmax operations are performed on A' and B' to obtain the attention weight map of size N×N. Then the shape of D is changed to C×N by shaping, and matrix multiplication is performed with the attention weight map obtained in the previous step to obtain the optimized feature map. Finally, the original feature map and the optimized feature map are matrix-added and the result is merged into the original input. In CPFU-Net, the kernel size of the convolution operation is set to 3×3. Through the PACM module, the network can automatically learn the position weights. Since each learned filter operates with a local receptive field, each unit in the network cannot utilize contextual information outside the area. To alleviate this problem, spatial information is cascaded with channel information.

[0044] (3) Wide Focus Module (WFM)

[0045] Since traditional convolution is performed under a fixed-size convolution kernel, the model cannot make good use of context information when processing images, resulting in the loss of a large amount of data features. Therefore, by introducing dilated convolution, the receptive field can be increased without increasing parameters and computational complexity, thereby improving the understanding of the global structure of the data. Figure 4 As shown, the wide focus module consists of two parts: a hybrid dilated convolution layer and a feature optimization layer; these two parts are connected together in a cascade manner. The hybrid dilated convolution layer uses different dilation rates to extract features of different scales, thereby expanding the receptive field and making full use of image information, so as to better capture a wider range of contextual information when processing images. In the present invention, the dilation rates are set to r=1, 2, and 3, respectively. A feature optimization layer including 3×3 convolution, BN normalization, and ReLU activation function is used to optimize the extracted features. Through the cascade strategy, the 3×3 convolution can reduce the impact of local block effects, the BN normalization can prevent the model from overfitting, and the ReLU activation function can reactivate smaller values ​​to reduce the loss of relatively weak feature information. Therefore, WFM can make full use of the contextual information of the image in order to retain more edge details and smaller target information.

[0046] (4) Loss Function

[0047] In the CPFU-Net model, the goal is to segment the input image into two categories (buildings and background areas), so binary cross entropy is used as the loss function of the model. Given a pair of images and labels (p, q), the output of the model is denoted as q i , then the sample p i The binary cross entropy loss can be expressed as:

[0048] Loss(p,q)=-q i logp i -(1-q i )log(1-p i )#(3)

[0049] The learning goal of the network will be to minimize the Loss value, that is:

[0050]

[0051] On the basis of the above embodiments, the present invention further proposes a building image segmentation device based on a wide focus multi-attention mechanism, comprising:

[0052] A model building unit, which builds an improved encoder-decoder model CPFU-Net based on a U-Net network for building segmentation in remote sensing images; the CPFU-Net includes an encoder, a connection path and a decoder; the connection path is embedded in a channel attention module, a position attention module and a wide focus module in a cascade manner;

[0053] The building image segmentation unit is used to segment buildings in remote sensing images based on the trained CPFU-Net.

[0054] In order to verify the effect of the present invention, the following experiments and analyses were performed:

[0055] 1 Dataset

[0056] In order to verify the effectiveness and practicality of the model CPFU-Net constructed in the present invention in the building segmentation task, experiments were carried out on Satellite dataset I (global cities) and Massachusetts Building dataset.

[0057] Satellite dataset I (global cities) was released in 2019. It is one of the typical datasets for building extraction in the field of remote sensing. Each image has a pixel size of 512×512 and contains 204 images. In this dataset, in order to prevent overfitting, this dataset uses data enhancement strategies such as 90° rotation, random horizontal flipping, transposition and translation to expand the database. This allows the network to learn deformation invariance. Since this strategy used randomly adjusts the image, these transformations are not seen in the image database.

[0058] The Massachusetts Building dataset covers about 340 square kilometers. It consists of 151 aerial images of the Boston area, each image is 1500×1500 pixels. Since the size of the dataset is too large to be conducive to model training, the dataset is split. Each image is cut into 256×256 pixels, which is consistent with the pixels of the first dataset.

[0059] The input of the network is a three-channel (red, green, and blue) remote sensing image of buildings. In order to better identify the areas of buildings and non-buildings, the images are uniformly processed in grayscale, and finally a binary image of the same size as the input image is output, in which white pixels are segmented buildings and black pixels are background.

[0060] The present invention is experimented based on the Pytorch framework on a computer with an 11th Gen Intel(R) Core(TM) i7-11700@2.50GHz and 64GB memory. The GPU type used in this computer is NVIDIAGeForce RTX 3080 with 10GB GPU video memory. Due to the limitation of GPU memory, the training batch size is set to 2 during training and validation, and the Adam optimizer is used to train our model, the learning rate is set to 0.0001, and the training epoch is set to 500.

[0061] 2 Evaluation Metrics

[0062] The effectiveness of the CPFU-Net model is mainly evaluated using IoU and F1-Score, which helps to verify the effectiveness of segmentation and boundary delineation. In addition, precision and recall indicators are used to ensure a comprehensive evaluation. It is expressed as follows:

[0063]

[0064] TP, TN, FP, and FN are the total number of true positive, true negative, false positive, and false negative pixels, respectively, and precision represents the accuracy. The higher the four indicators, the better the performance.

[0065] 3 Experimental results and analysis

[0066] 3.1 Satellite dataset I (global cities) test results and analysis

[0067] In order to prove the effectiveness of the CPFU-Net model, this section mainly tests it on the dataset "Satellite dataset I (global cities)" and compares it with seven currently popular building segmentation methods on Satellite dataset I (global cities). The results are shown in the figure. Figure 5 To ensure the consistency of experimental conditions, these comparison models were compared with CPFU-Net under the same environment. The red boxes in the figure show the segmentation details, and the blue boxes show the misclassification. Figure 5 As can be seen, compared with other networks, the size of the building has less impact on this model, and CPFU-Net has a lower probability of misclassification and missed classification. At the same time, it is easier to classify regularly arranged buildings at the pixel level, and the edge segmentation is relatively complete. From the segmentation results in the first row, it can be seen that compared with other networks, for buildings with unclear contrast, other networks have the problem of not being able to recognize them and processing blurred edges, while CPFU-Net does not have the above defects. Since the resolution of images varies, for images with relatively low resolution, other models have the problem of blurred segmentation, but the CPFU-Net model can accurately and completely segment the buildings, such as Figure 5 Second and third lines.

[0068] It is easy to see from Table 1 that CPFU-Net outperforms other methods in OA, F1 Score, and Recall of building segmentation. The specific index values ​​of the comparison methods DANet, Deeplabv3, Deeplabv3+, FCN, segformer, U-Net, and swin (i.e., swintransformer) are shown in Table 1.

[0069] Table 1 Experimental results of Satellite dataset I (global cities)

[0070]

[0071] 3.2 Massachusetts Building dataset test results and analysis

[0072] Figure 6The segmentation results of the Massachusetts Building dataset on the CPFU-Net model and the currently popular network architecture are shown. Figure 6 As can be seen from the figure, CPFU-Net surpasses other networks to a certain extent. In the red border of the first row, some other models do not accurately identify buildings, and some recognize buildings but do not segment the edges of each building in a very standardized way. However, the segmentation results of CPFU-Net are obvious, achieving accurate recognition and clear contours. Similarly, this problem still occurs in the segmentation results of the second row. In the segmentation results of the fourth row, it can be seen that the basic model U-Net cannot recognize the building at all. After reflection, there are two possibilities. One is that the resolution of the image itself is reduced after cutting; the other is that the model has misclassification. When the building is not very easy to identify, there is a situation where the foreground is divided into the background. However, other models can recognize buildings in the segmentation, but there is a phenomenon of blurred recognition. Therefore, this further illustrates that CPFU-Net can accurately identify both small and large buildings, and can achieve a higher level of segmentation.

[0073] It is easy to see from Table 2 that the proposed CPFU-Net outperforms other methods in OA, F1 Score, and Recall of building segmentation. The specific index values ​​of the comparison methods DANet, Deeplabv3, Deeplabv3+, FCN, segformer, U-Net, and swin are shown in the table. It is worth noting that the OA and Recall values ​​are about 10% and 9% higher than the swin model with the highest segmentation accuracy, which shows the excellent ability of the CPFU-Net model to accurately segment. Although the IoU index of CPFU-Net is slightly inferior to other models, it is still excellent in segmenting buildings overall.

[0074] Table 2 Experimental results of Massachusetts Building dataset

[0075]

[0076] 3.3 Ablation Experiment

[0077] Since CPFU-Net uses multiple modules to obtain context information, it is necessary to conduct ablation experiments to detect the impact of each module on the entire network. The effectiveness of CACM, PACM, and WFM modules are discussed in Satellite dataset I and MassachusettsBuilding datasets respectively. The results are shown in Table 3. It can be seen that in the Satellite dataset, the added CACM, PACM, and WFM modules increase the IoU by 5.14% compared with the basic model, the OA index increases by 1.91%, the F1-score index increases by 3.85%, and the Recall index increases by 4.71%. In the Massachusetts dataset, the OA index increases by 0.68%, the F1-score index increases by 2.78%, and the Recall index increases by 2.85%. It can be seen that each added module has a certain improvement to a certain extent, which further proves that CPFU-Net can effectively integrate image features at different levels to obtain more accurate building segmentation.

[0078] Table 3 Ablation experiment results on Satellite dataset I (global cities) and Massachusetts Building dataset

[0079]

[0080]

[0081] In summary, the present invention proposes a deep convolutional neural network CPFU-Net suitable for building segmentation. The low-level semantics and high-level semantic information of the image are integrated, the position and channel attention modules are used to improve the detail loss phenomenon, and the wide focus module is designed to increase the receptive field, so that the model focuses on the domain of interest while retaining the edge detail information of the building segmentation. Through verification on Satellite dataset I and Massachusetts Buildingdataset, from the results of OA, Recall, IoU and F1-Score evaluation indicators, the CPFU-Net segmentation results are more accurate than the currently popular classic segmentation networks, and effectively overcome the phenomenon of blurred edges of segmented buildings. At the same time, CPFU-Net supports training in an environment with low hardware requirements, so CPFU-Net can be widely used in the segmentation tasks of multi-scale remote sensing image buildings.

[0082] The above is only a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A building image segmentation method based on wide focus multi-attention mechanism, characterized in that: include: An improved encoder-decoder model CPFU-Net is constructed based on the U-Net network for building segmentation in remote sensing images; The CPFU-Net includes an encoder, a connection path and a decoder; the connection path is embedded in a channel attention module, a position attention module and a wide focus module in a cascade manner; Buildings in remote sensing images are segmented based on the trained CPFU-Net.

2. The building image segmentation method based on wide focus multi-attention mechanism according to claim 1, characterized in that: The encoder includes multiple convolutional layers, each of which includes a 3×3 convolution, batch normalization, a ReLU activation function, and a maximum pooling operation.

3. The building image segmentation method based on wide focus multi-attention mechanism according to claim 1, characterized in that: The decoder adopts bilinear interpolation as the upsampling technique. Each step of the decoding path includes upsampling of the feature map and cascading operations with the corresponding cropped feature map. The last layer of the decoder adopts a 1×1 convolutional layer to map the features into pixel-level class labels to achieve segmentation of building targets.

4. The building image segmentation method based on wide focus multi-attention mechanism according to claim 1, characterized in that: The channel attention module consists of a feature processing module and a SE module. The feature processing module includes a feature extraction unit and a feature optimization unit. The SE module is located between the feature extraction unit and the feature optimization unit. The feature extraction unit and the feature optimization unit are both composed of a 3×3 convolutional layer, a batch normalization layer, and a ReLU activation function.

5. The building image segmentation method based on wide focus multi-attention mechanism according to claim 1, characterized in that: In the position attention module, a convolution layer is first applied to obtain dimensionality reduction features, and three convolution operations are performed to form three feature maps A, B, and D of size H×W×C; then A is transformed into an N×C feature map A' by shaping and transposing, N=H×W, and B is transformed into a C×N feature map B' by shaping, and matrix multiplication and Softmax operations are performed on A' and B' to obtain an attention weight map of size N×N; then the shape of D is transformed into C×N by shaping, and matrix multiplication is performed with the obtained attention weight map to obtain an optimized feature map; finally, the original feature map and the optimized feature map are matrix added and the result is merged into the original input.

6. The building image segmentation method based on wide focus multi-attention mechanism according to claim 1, characterized in that: The wide focus module consists of two parts: a hybrid dilated convolution layer and a feature optimization layer; the hybrid dilated convolution layer uses different dilation rates to extract features of different scales; The feature optimization layer contains 3×3 convolution, BN normalization and ReLU activation function; the hybrid dilated convolution layer and the feature optimization layer are connected in a cascade manner.

7. The building image segmentation method based on wide focus multi-attention mechanism according to claim 1, characterized in that: The CPFU-Net uses binary cross entropy as the loss function.

8. A building image segmentation device based on a wide focus multi-attention mechanism, characterized in that: include: Model building unit, which builds an improved encoder-decoder model CPFU-Net based on the U-Net network for building segmentation in remote sensing images; The CPFU-Net includes an encoder, a connection path and a decoder; the connection path is embedded in a channel attention module, a position attention module and a wide focus module in a cascade manner; The building image segmentation unit is used to segment buildings in remote sensing images based on the trained CPFU-Net.

Citation Information

Cited By

  • Target identification method and system, electronic equipment and storage medium

    CN119785007A