Plane graph semantic segmentation method based on attention-fused U-net network
By adopting the U-net network based on fusion attention-based method in plan view semantic segmentation, the problems of scarce data set resources, insufficient complex room processing, poor spatial context recognition capabilities, text annotation dependence and high model complexity are solved, and a more efficient and accurate plan semantic segmentation effect is achieved.
Patent Information
- Application Number
- CN202411854375.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-08
AI Technical Summary
In the semantic segmentation of the prior art, data set resources are scarce, insufficient processing of complex or irregular room shapes, poor spatial context relationship recognition ability, limitations of relying on text annotation, and high computational cost of model complexity.
The planar graph semantic segmentation method based on U-net network based on fusion attention is adopted, and the images are normalized, denoised and sized through preprocessing steps. Multi-scale features are extracted using encoder and decoder, and feature fusion and weighting are performed through attention mechanisms, and finally post-processing is performed to improve the segmentation result.
The generalization ability and segmentation accuracy of planar image semantic segmentation are improved, the processing ability of complex and irregular room shapes is enhanced, the recognition ability of spatial context relationships is improved, the dependence on text annotation is reduced, and the model's computing resource consumption is reduced.
Smart Images

Figure CN119785028A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of semantic segmentation, and in particular to a planar graph semantic segmentation method based on a U-net network fused with attention. Background Art
[0002] A semantic segmentation method based on a deep VGG Encoder-Decoder network has been proposed in the prior art. This multi-task neural network uses two separate VGG decoders to extract shared features from the input floor plan, improve feature learning and identify individual elements; and maximizes feature integration for room type prediction by building a spatial context module with a Room-Boundary-Guided attention mechanism.
[0003] There is also a new method in the prior art to identify floor plan elements and irregular rooms using a convolution kernel with direction-aware, learnable and additive features and a generative adversarial network (GAN). The kernel is applied to the context module and convolution block to identify common and irregular shaped elements and reduce noise in floor plan semantic segmentation. GAN has two discriminators to further improve the accuracy of identifying elements and reduce the noise of semantic segmentation, improving the efficiency and accuracy of image segmentation tasks.
[0004] An automated semantic segmentation framework based on multiple neural networks has also been proposed in the prior art. The framework uses the YOLOv4 model to detect the ROI detection module and clips it as the input of the next module; in the digital recognition module, YOLOv4 implements digital area detection and digital recognition. The framework uses the DeepLabv3+ network to identify various structural plan elements (walls, doors, windows, doors, etc.). In the line segment detection module, the framework uses FCN to obtain the pixel length of the line segment by detecting the endpoints.
[0005] However, the methods in the prior art have the following defects:
[0006] (1) Scarce dataset resources limit model training and generalization
[0007] Many existing studies lack high-quality, large-scale datasets dedicated to architectural floor plans, which leads to unstable performance of models in diverse room layouts and different architectural styles. Such models usually rely on a small number of manually annotated datasets, which makes it difficult to maintain good generalization capabilities in practical applications outside of training data, limiting the universality and stability of the models.
[0008] (2) Inadequate handling of complex or irregular room shapes
[0009] Although some studies have tried to handle irregular rooms and complex layouts, most models perform poorly when faced with polygonal or non-aligned structures. The rectangular or axis-aligned Manhattan assumption limits the performance of the model in dealing with free-form walls and irregular rooms, resulting in segmentation boundary errors and inaccurate region predictions.
[0010] (3) Poor ability to recognize spatial contextual relationships
[0011] Many methods only focus on pixel classification and lack the modeling of spatial relationships between rooms, making it difficult to fully understand room functions and regional relationships. Even with the introduction of the attention mechanism model, the detailed relationship between room areas and boundaries has not been fully resolved, especially in the multi-room segmentation task, the accuracy still needs to be improved.
[0012] (4) Room classification methods that rely on text annotations have limitations
[0013] While multi-task learning methods improve the accuracy of room segmentation, they still rely heavily on text labels and symbol information to mark room types. When images lack clear text or symbolic markings, the model has difficulty identifying room types. Existing OCR technology is not accurate enough in recognizing small scattered text in floor plans, which affects the integrity of semantic segmentation.
[0014] (5) Model complexity and computational cost are high
[0015] In order to achieve more accurate segmentation results, many methods use complex multi-module neural network structures, which significantly increases the consumption of computing resources. This, to a certain extent, limits the deployment and application of models in resource-constrained application scenarios and fails to meet the needs of efficient segmentation and resource optimization.
[0016] Therefore, there is an urgent need for a semantic segmentation method that can solve the above-mentioned problems in planar graph semantic segmentation. Summary of the invention
[0017] In order to solve the above problems, the present invention provides a planar image semantic segmentation method based on a U-net network with fused attention, comprising the following steps: S1. acquiring a planar image, and preprocessing the acquired planar image and inputting it into a U-net network; S2. performing feature extraction on the preprocessed planar image in the U-net network; S3. fusing the extracted multi-scale features; S4. outputting the fused result and performing post-processing.
[0018] Furthermore, the step S1 specifically includes the following sub-steps: S11. Acquire a planar image; S12. Map pixel values of the planar image to a uniform range; S13. Remove noise in the image by Gaussian filtering; S14. Scale the image.
[0019] Furthermore, the unified range in step S12 is specifically: [0, 1] or [-1, 1]; when the formula for mapping the pixel value to [0, 1] is: norm (x,y)=(I(x,y)-I min ) / (I max -I min ); When the formula for mapping pixel values to [-1,1] is: norm (x,y)=2(I(x,y)-I min ) / (I max -I min )-1; where the original pixel value range is: [I min ,I max ]; I(x,y) represents the pixel value of the image at position (x, y), I norm (x,y) represents the normalized pixel value.
[0020] Furthermore, the calculation formula for removing noise in the image by Gaussian filtering in step S13 is specifically: In the formula, I denoise (x, y) represents the pixel value of the denoised image at position (x, y); k represents the radius of the kernel, which is used to determine the size of the filter; G(i, j) represents the Gaussian function: Here, σ represents the standard deviation.
[0021] Furthermore, the S2 step specifically includes the following sub-steps: S21. Obtain a low-level feature map and a high-level feature map through an encoder and a decoder respectively; S22. Obtain the global semantic information of the low-level feature map by performing a global average pooling operation; S23. Perform a 1×1 convolution and batch normalization on the pooled result to capture the global context and semantic dependencies; S24. Normalize through a softmax activation function to generate attention weights for different channels; S25. Multiply each channel in the low-level feature map by the corresponding attention weight to obtain an enhanced attention feature map; S26. Add the attention feature map and the high-level feature map element by element to generate the final fused feature map.
[0022] Furthermore, the calculation formula of the global average pooling operation in step S22 is: In the formula, H and W represent the height and width of the feature map respectively, and F low represents a low-level feature map and c represents a channel.
[0023] Furthermore, the calculation formula in step S23 is: z=BN(Conv1×1(f)); wherein Conv1×1 represents 1×1 convolution, BN represents batch normalization, and z is a vector.
[0024] Furthermore, the weight α in step S24 is c The calculation formula is: In the formula, C represents the number of channels, c represents the channel, and z k 、z c Both represent the attention features extracted by global average pooling. They are used to convert the original eigenvalues z k 、z c Convert to non-linear form.
[0025] The present invention provides a planar graph semantic segmentation method based on a U-net network with fusion attention, which has the following beneficial effects:
[0026] The present invention introduces deep learning technology into the automatic semantic segmentation framework of floor plans, fully utilizes the spatial structural characteristics of building floor plans, and realizes efficient segmentation of various rooms and building elements through convolutional neural networks. The method identifies the complex relationships and interactions between different elements in the floor plan through a feature extraction module based on graph structure; learns the basic semantic representation of images on unlabeled data through self-supervised learning technology; improves the accuracy of semantic segmentation through multi-level feature fusion; improves the anti-interference ability of noise and fuzzy boundaries through dynamic threshold setting; and provides users with accurate semantic interpretation of building elements such as room outlines, walls, doors and windows through visual segmentation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0028] Figure 1 A flow chart of the method provided by the present invention;
[0029] Figure 2 The overall structure diagram of the U-net network that integrates the attention mechanism provided by the present invention. DETAILED DESCRIPTION
[0030] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0031] The following is a detailed description of the implementation method of the present invention in conjunction with the accompanying drawings. Only some embodiments are described, not all embodiments. For the purpose of clarity, representations and descriptions that are not related to the present invention are omitted in the drawings and descriptions.
[0032] In order to have a clearer understanding of the technical features, purposes and beneficial effects of the present invention, the technical solution of the present invention is now described in detail below. Obviously, the implementation cases described are part of the embodiments of the present invention, not all of the embodiments, and cannot be understood as limiting the scope of the implementation of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention.
[0033] like Figure 1 As shown, the present invention provides a planar image semantic segmentation method based on a U-net network with fused attention, comprising the following steps: S1. acquiring a planar image, and preprocessing the acquired planar image and inputting it into a U-net network; S2. extracting features of the preprocessed planar image in the U-net network; S3. fusing the extracted multi-scale features; S4. outputting the fused result and performing post-processing.
[0034] A series of processing is performed on the input building plane image to ensure the quality and consistency of the input data and improve the generalization ability and performance of the model. The present invention performs a normalization operation on the image to eliminate the influence of image brightness differences on the model and ensure the input consistency of subsequent network layers.
[0035] Step S1 specifically includes the following sub-steps: S11. Acquire a planar image; S12. Map pixel values of the planar image to a uniform range; S13. Remove noise in the image by Gaussian filtering; S14. Scale the image.
[0036] The unified range in step S12 is specifically: [0,1] or [-1,1]; when the formula for mapping the pixel value to [0,1] is: norm (x,y)=(I(x,y)-I min ) / (I max -I min ); When the formula for mapping pixel values to [-1,1] is: norm (x,y)=2(I(x,y)-I min ) / (I max -I min )-1; where the original pixel value range is: [I min ,I max ]; I(x,y) represents the pixel value of the image at position (x, y), I norm (x,y) represents the normalized pixel value.
[0037] The specific calculation formula for removing noise in the image by Gaussian filtering in step S13 is: In the formula, I denoise (x, y) represents the pixel value of the denoised image at position (x, y); k represents the radius of the kernel, which is used to determine the size of the filter; G(i, j) represents the Gaussian function: Here, σ represents the standard deviation.
[0038] By selecting a suitable σ value, the detailed features of the image can be retained as much as possible while removing the image noise, and the denoised image will be used in the subsequent feature extraction stage. In order to meet the input requirements of the model, the present invention performs a size scaling operation on the image and unifies the input size of the image so that the model has a consistent input format when processing in small batches. At the same time, preprocessing also includes data enhancement - rotation, flipping, cropping, etc., to increase the diversity of data and the robustness of the model, and improve the performance of the model in practical applications. The final processed image is input into the U-net network for further feature extraction.
[0039] The overall structure of the U-net network with integrated attention mechanism proposed in this invention is divided into three main parts: encoder module, decoder module and spatial attention mechanism module. The specific structure is as follows: Figure 2 shown.
[0040] Encoder module:
[0041] The encoder extracts features from the planar image and obtains compact feature representations at multiple levels. The method introduces ResNeXt blocks in the encoder to achieve deeper feature extraction without affecting network performance. The ResNeXt block introduces "cardinality" as an important dimension in addition to depth and width by repeatedly aggregating a set of transformation operations with the same topological structure, thereby improving the diversity of feature expression. The encoder uses a 2×2 maximum pooling operation for downsampling, and each downsampling operation reduces the image size and doubles the number of feature channels. Between each ResNeXt block in the encoder, the present invention applies a spatial attention mechanism to focus on important information areas in the feature map. The spatial attention mechanism generates two spatial descriptors by performing average pooling and maximum pooling operations along the channel axis. and The two descriptors are then concatenated to form a single feature descriptor, and a convolution layer and sigmoid activation function are applied to the concatenated feature descriptor to generate a spatial attention map. The spatial attention map is combined with the input feature map by element-wise multiplication to generate a new feature map focused on spatial features, thereby effectively enhancing the recognition of objects such as rooms and icons during feature transfer.
[0042] The specific calculation of the module is as follows: Where F is the input feature map, and is a spatial descriptor generated by applying average pooling and max pooling operations to the input feature map, f conv represents a convolution operation with a filter size of 4×4, and σ represents the activation function.
[0043] Decoder module:
[0044] The decoder module of the present invention is used to gradually upsample the feature map extracted by the encoder to generate a high-precision segmented image. In a specific implementation, the decoder adopts a multi-layer structure to restore the spatial resolution of the feature map step by step, and achieves upsampling by a bilinear interpolation method. Each layer in the decoder fuses the feature map from the corresponding layer of the encoder, and uses a jump connection to directly transfer the downsampled encoder features to the upsampling stage to enhance the transmission of semantic information and edge details. The feature map in the jump connection is weighted by the channel attention mechanism to achieve adaptive enhancement of the information of each channel in the feature map, ensuring the effective contribution of different channels to the segmentation result. The spatial attention mechanism distributes weights on the spatial dimension of the feature map to highlight the feature response of the key area. The upsampling layer in the decoder is followed by a fusion attention module (composed of channel attention and spatial attention), which automatically adjusts the weight distribution according to the content of the input feature map to further improve the segmentation accuracy. Each layer of the decoder finally realizes pixel-level classification prediction through a 1×1 convolutional layer Conv(1×1, C), where c is the number of categories), and obtains a segmentation map with semantic annotations. To ensure the effectiveness of the decoder in restoring image details, the present invention is structurally symmetrical with the encoder, and upsampling and jump connections are set up layer by layer, so that the spatial relationship of features can be fully preserved during the upsampling process. At the same time, the channel attention and spatial attention modules are combined to achieve efficient filtering and focusing of feature information through multiple applications in the feature extraction and upsampling process, thereby obtaining a segmentation mask output with clear boundaries and accurate classification.
[0045] Step S2 specifically includes the following sub-steps: First, the low-level feature map F low Through the global average pooling operation, its global semantic information is obtained. For the feature map of each channel c, the pooling operation is calculated as:
[0046]
[0047] Among them, H and W are the height and width of the feature map respectively; the global context information is converted into an attention vector that encodes the semantic dependencies, and the pooled result f is passed through 1×1 convolution and batch normalization to capture the global context and semantic dependencies. This operation can be expressed as: z = BN(Conv1x1(f)).
[0048] Among them, Conv1x1 represents 1×1 convolution, and BN represents batch normalization, which helps to emphasize key features and filter background information to further capture semantic dependencies. The present invention uses softmax as an activation function to normalize the vector, normalizes the z vector through the softmax activation function, and generates an attention vector α to represent the weight distribution of different channels: z k 、z c Both represent the attention features extracted by global average pooling. In the spatial attention module, the input value z k is an attention-related feature extracted through global context information (such as global average pooling or global maximum pooling), which represents the importance score of that specific channel or spatial position. They are used to convert the original eigenvalues z k 、z c is converted to a nonlinear form while maintaining positive values. Thus, for larger z k will be magnified, the smaller the z k will be further suppressed, thereby enhancing the influence of high-weight features on the attention map.
[0049] Where c represents the number of channels; the low-level feature map is multiplied by the attentive vector to generate the attentive feature map, and the low-level feature map F low Each channel in is multiplied by the corresponding attention weight α c , get the enhanced attention feature map F attentive :F attentive (i, j, c) = α c ·F low (i, j, c).
[0050] Finally, the attention feature map F attentive With the high-level feature map F high Add element by element to generate the final fusion feature map F output :F output =F attentive +F high .
[0051] S3. Multi-scale feature fusion: In the building plan, structures such as walls, doors, windows, and furniture may appear in various sizes. Therefore, the present invention adopts a multi-scale feature fusion method to ensure that the model can effectively identify targets of different scales. Through multi-scale feature extraction in the U-net network, the present invention fuses the feature maps of each layer and integrates information of different scales into the final segmentation result. In the encoder, the feature maps of the lower layers usually contain high-resolution detail information, while the high-level feature maps have stronger semantic information. Through cross-layer connections, low-level and high-level features can be fused at multi-scale in the decoder, so that the model can simultaneously identify large-scale room layouts and small-scale detail features, such as doors, windows, and corners, when performing semantic segmentation, thereby improving the overall accuracy of the segmentation results and the restoration of local details.
[0052] S4. Output and post-processing: After obtaining the semantic segmentation results through the decoder, the present invention also performs a series of post-processing steps to improve the visual effect and accuracy of the segmentation results. The post-processing stage includes morphological operations (such as dilation, erosion, etc.) to smooth the segmentation boundaries, remove noise, and improve the coherence of the edge areas. In addition, in order to ensure the integrity and consistency of the semantic area, the segmented area is also screened (such as small area removal, shape smoothing, etc.) to make the final segmentation result more consistent with the actual situation of the building floor plan.
[0053] Example 1: Standard U-net structure combined with channel attention mechanism
[0054] In this embodiment, the U-net network structure is combined with the channel attention mechanism to improve the model's attention to important feature channels. The U-net structure consists of a set of encoder-decoder symmetric modules, which realizes feature extraction through multi-layer convolution and pooling, and then gradually restores spatial information through upsampling. The classic U-net network treats all feature channels equally and fails to adaptively distinguish the most important feature channels. Therefore, the present invention introduces a channel attention mechanism to perform channel weighting after feature extraction at each layer.
[0055] The channel attention mechanism adaptively assigns weights to each feature channel, allowing the model to focus on the channels that play a key role in the semantic segmentation task. Specifically, assuming the feature map is Where C, H, and W represent the number of channels, height, and width, respectively. First, perform global average pooling and global maximum pooling on the feature map F to generate a global feature descriptor: F avg =GlobalAvgPool(F); F max =GlobalMaxPool(F).
[0056] Among them, F avg , Next, the two descriptors are passed through a shared fully connected layer to generate channel weights: W = σ (W 1 (F avg +F max )).
[0057] in σ represents the Sigmoid activation function, W 1 is the weight matrix of the shared fully connected layer. The generated weight matrix W is multiplied by the original feature map F to obtain the weighted feature map F′: F′=F⊙W.
[0058] where ⊙ denotes channel-by-channel multiplication.
[0059] By applying the channel attention mechanism after the encoder module and decoder module of each layer of U-net, the model can more effectively focus on semantically significant feature channels during semantic segmentation and improve segmentation accuracy, especially in complex areas of building floor plans.
[0060] Example 2: Standard U-net structure combined with spatial attention mechanism
[0061] In this embodiment, the U-net network introduces a spatial attention mechanism to strengthen the model's attention to the target spatial position. The spatial attention mechanism is particularly suitable for fine segmentation of boundaries and detail areas in building plans, and can dynamically weight the spatial position of the image. The traditional U-net network gradually restores spatial information in the decoder stage, but because there is no weight allocation to distinguish different spatial positions, the segmentation boundaries may be unclear. The spatial attention mechanism can effectively improve the attention to boundaries and details during the decoding process.
[0062] Let the feature map be First, perform global maximum pooling and global average pooling operations on the channel dimension to compress it into a single channel feature map and
[0063] Then the two pooling results are spliced by channel to generate fusion features
[0064] Next, a convolutional layer is applied to the fused features to generate a spatial attention map M sp =σ(Conv2D(F sp )).
[0065] Where σ represents the Sigmoid activation function. The attention map is then element-wise multiplied with the original feature map to generate a spatially weighted feature map F′: F′=F⊙M sp .
[0066] Adding spatial attention modules to each layer of the U-net decoder enables the model to highlight the boundary areas in the building plan during segmentation, effectively distinguish the spatial positions of walls, doors, windows, furniture, etc., and help improve the segmentation accuracy of the building plan.
[0067] Example 3: Fusion of Hybrid Attention Mechanism
[0068] This embodiment combines the channel attention mechanism and the spatial attention mechanism to achieve more detailed feature extraction and boundary recognition capabilities. The hybrid attention mechanism enhances the model's ability to distinguish the semantic information of building floor plans by adaptively adjusting the weights of feature channels and spatial positions, and is suitable for floor plan segmentation tasks with complex layouts and rich details.
[0069] The U-net encoder extracts features from the input image X layer by layer, and each layer outputs a feature map After the output of each layer encoder, the channel attention mechanism is applied to weight the channels:
[0070] 1. Calculate the global average pooling and maximum pooling descriptors F of F avg ,
[0071] 2. Generate channel weights through the fully connected layer And multiply it with F to get the weighted feature map F CAM .
[0072] After channel weighting, the feature map F CAM The spatial attention mechanism is introduced to further highlight the spatial location information of the key area. The single channel feature map is obtained by channel pooling. Fusion into spatial features And apply convolution to get the spatial weight map M sp . The feature map F after channel and space weighting SAM Expressed as: F SAM =F CAM ⊙M sp .
[0073] This method enables the model to use both channel information and spatial information to efficiently segment complex areas in the floor plan, especially those with multiple structural elements. The hybrid attention mechanism further enhances U-net's ability to recognize details of the building floor plan and improves the accuracy and robustness of segmentation.
[0074] The present invention introduces deep learning technology into the automatic semantic segmentation framework of floor plans, fully utilizes the spatial structural characteristics of building floor plans, and realizes efficient segmentation of various rooms and building elements through convolutional neural networks. The method identifies the complex relationships and interactions between different elements in the floor plan through a feature extraction module based on graph structure; learns the basic semantic representation of images on unlabeled data through self-supervised learning technology; improves the accuracy of semantic segmentation through multi-level feature fusion; improves the anti-interference ability of noise and fuzzy boundaries through dynamic threshold setting; and provides users with accurate semantic interpretation of building elements such as room outlines, walls, doors and windows through visual segmentation results.
[0075] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art do not deviate from the spirit and scope of the present invention, and should be within the scope of protection of the claims attached to the present invention.
Claims
1. A planar graph semantic segmentation method based on a U-net network with fusion attention, characterized in that: The following steps are involved: S1. Obtain a plane image, pre-process the obtained plane image and input it into the U-net network; S2. Extract features from the preprocessed planar image in the U-net network; S3. Fusing the extracted multi-scale features; S4. Output the fused result and perform post-processing.
2. The planar graph semantic segmentation method based on the U-net network with fusion attention according to claim 1 is characterized in that: The S1 step specifically includes the following sub-steps: S11. Acquire a planar image; S12. Mapping the pixel values of the planar image to a uniform range; S13. Remove noise from the image by Gaussian filtering; S14. Scale the image.
3. The planar graph semantic segmentation method based on the U-net network with fusion attention according to claim 2 is characterized in that: The unified range in step S12 is specifically: [0, 1] or [-1, 1]; when the formula for mapping the pixel value to [0, 1] is: norm (x,y)=(I(x,y)-I min ) / (I max -I min ); When the formula for mapping pixel values to [-1,1] is: norm (x,y)=2(I(x,y)-I min ) / (I max -I min )-1; where the original pixel value range is: [I min ,I max ]; I(x,y) represents the pixel value of the image at position (x, y), I norm (x,y) represents the normalized pixel value.
4. The planar graph semantic segmentation method based on the U-net network with fusion attention according to claim 2, characterized in that: The specific calculation formula for removing noise in the image by Gaussian filtering in step S13 is: In the formula, I denoise (x, y) represents the pixel value of the denoised image at position (x, y); k represents the radius of the kernel, which is used to determine the size of the filter; G(i, j) represents the Gaussian function: Here, σ represents the standard deviation.
5. The planar graph semantic segmentation method based on the U-net network with fusion attention according to claim 1, characterized in that: The S2 step specifically includes the following sub-steps: S21. Obtain low-level feature maps and high-level feature maps through the encoder and decoder respectively; S22. Perform a global average pooling operation on the low-level feature map to obtain its global semantic information; S23. The pooled result is passed through 1×1 convolution and batch normalization to capture global context and semantic dependencies; S24. Normalize through softmax activation function to generate attention weights of different channels; S25. Multiply each channel in the low-level feature map by the corresponding attention weight to obtain an enhanced attention feature map; S26. Add the attention feature map and the high-level feature map element by element to generate the final fused feature map.
6. The planar graph semantic segmentation method based on the U-net network with fusion attention according to claim 5, characterized in that: The calculation formula of the global average pooling operation in step S22 is: c = In the formula, H and W represent the height and width of the feature map respectively, and F low represents a low-level feature map and c represents a channel.
7. The planar graph semantic segmentation method based on the U-net network with fusion attention according to claim 5, characterized in that: The calculation formula in step S23 is: z=BN(Conv1×1(f)); wherein Conv1×1 represents 1×1 convolution, BN represents batch normalization, and z is a vector.
8. The planar graph semantic segmentation method based on the U-net network with fusion attention according to claim 5, characterized in that: The weight α in step S24 c The calculation formula is: In the formula, C represents the number of channels, c represents the channel, and z k 、z c Both represent the attention features extracted by global average pooling. They are used to convert the original eigenvalues z k 、z c Convert to non-linear form.
Citation Information
Cited By
Remote sensing image semantic segmentation method based on deep learning
CN120451530A
Method for quickly and automatically modeling macroscopic evacuation network model based on semantic segmentation
CN120510246A