Real-time semantic segmentation method based on continuous attention three-branch network

By adopting the method of continuous attention interaction and three-branch detail attention fusion module in semantic segmentation, the problem of semantic gaps and loss of detail information between feature maps of different resolutions is solved, efficient real-time semantic segmentation is achieved, and model performance and Split effect.

CN118710902APending Publication Date: 2024-09-27HENAN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Traditional semantic segmentation methods are ineffective when processing complex scenes and detailed information, and are difficult to meet real-time processing requirements. Methods based on convolutional neural networks have problems with semantic gaps and loss of detailed information between feature maps of different resolutions.

Method used

A real-time semantic segmentation method based on the continuous attention three-branch network is adopted. Through the continuous attention interaction module and the three-branch detail attention fusion module, the semantic expression and information interaction between feature maps of different resolutions are improved, and the self-attention mechanism is used for depth Fusion increases the information interaction between the two branches.

Benefits of technology

It achieves a balance between speed and performance, obtains better detail expression and segmentation effect, clearer segmentation results, more correct label classification, and ensures high accuracy and fast inference speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118710902A
    Figure CN118710902A
Patent Text Reader

Abstract

The invention provides a real-time semantic segmentation method based on a continuous attention three-branch network. A continuous attention interaction module is used for improving semantic expression between feature maps with different resolutions, increasing information interaction between double branches, reducing semantic gaps between independent double branches and improving the performance of a model. The three-branch detail attention fusion module fuses the semantic branches and the detail branches by using a self-attention mechanism, and performs fusion again by using additional detail branches, thereby obtaining better detail representation. Balance between speed and performance is achieved, and high precision and high reasoning speed can be well guaranteed. The segmentation result is clearer, the label classification is more correct, and a good segmentation effect is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a real-time semantic segmentation method based on a continuous attention three-branch network. Background Art

[0002] With the rapid development of computer vision technology, semantic segmentation, as a key technology, has shown broad application potential in multiple fields such as autonomous driving, medical image analysis, and video surveillance. Traditional semantic segmentation methods rely on manually designed feature extractors. When faced with complex scenes and detailed information, the processing effects of these methods are not very satisfactory and it is difficult to meet the needs of real-time processing. With the rise of deep learning technology. Real-time semantic segmentation methods based on convolutional neural networks have achieved good segmentation performance, but there are still problems with semantic gaps between feature maps of different resolutions and the loss of detailed information during fusion. Summary of the invention

[0003] The purpose of the present invention is to provide a real-time semantic segmentation method based on a continuous attention three-branch network, which improves the semantic expression between feature maps of different resolutions through a continuous attention interaction module, increases information interaction between two branches, reduces the semantic gap between independent two branches, and improves the performance of the model. The three-branch detail attention fusion module uses a self-attention mechanism to fuse the semantic branch and the detail branch, and uses additional detail branches for further fusion, thereby obtaining better detail representation.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is: a real-time semantic segmentation method based on a continuous attention three-branch network, comprising the following steps: Step 1: Preprocess the image into two fixed sizes and then send it to the backbone network to perform preliminary feature extraction on the first three stages S1, S2, and S3; Step 2: Starting from the S3 stage, the continuous attention interaction module CAIM is used to perform feature interaction on the two independent branches of detail branch and semantic branch; Step 3: Use the three-branch detail attention fusion module TBDAFM to fuse the detail branch and the semantic branch, and use the additional detail branch for re-fusion; Step 4: To achieve efficient and accurate segmentation, a dual-branch structure model is trained on the public dataset Cityscapes; Step 5: Send the fused feature map to the segmentation head and output the category label of each object in the image.

[0005] Preferably, the S1, S2, and S3 stages in step 1 are subjected to multiple convolutions, pooling, and nonlinear processing to reduce the image resolution of the image to 1 / 8 of the original input.

[0006] Preferably, in step 3, the semantic branch and the detail branch are deeply fused using a self-attention mechanism.

[0007] Preferably, in step 4, random scaling, random padding, random horizontal flipping, random color jittering and normalization are used to perform data enhancement.

[0008] Preferably, the random scaling range of the public dataset Cityscapes is [0.25, 2.0].

[0009] The beneficial effects of the present invention are:

[0010] This solution improves the semantic expression between feature maps of different resolutions through the continuous attention interaction module, increases the information interaction between the two branches, reduces the semantic gap between the independent two branches, and improves the performance of the model. The three-branch detail attention fusion module uses the self-attention mechanism to fuse the semantic branch and the detail branch, and uses the additional detail branch for further fusion to obtain better detail expression. It achieves a balance between speed and performance, and can well guarantee high accuracy and fast inference speed. The segmentation results are clearer and the label classification is more correct, achieving good segmentation effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0012] Figure 1 FIG. 4 is a diagram showing the overall architecture of DCATNet of the present invention.

[0013] Figure 2 This is a CAIM structure diagram of the present invention.

[0014] Figure 3 This is a structural diagram of the TBDAFM of the present invention.

[0015] Figure 4 This is a comparison diagram of the visualization results of the present invention.

[0016] Figure 5 It is the output segmentation result diagram of the present invention. DETAILED DESCRIPTION

[0017] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0018] The present invention discloses a real-time semantic segmentation method based on a continuous attention three-branch network. The embodiment includes the following steps:

[0019] Step 1: Preprocess the image into two fixed sizes and then send it to the backbone network to perform preliminary feature extraction on the first three stages S1, S2, and S3; Step 2: Starting from the S3 stage, the continuous attention interaction module CAIM is used to perform feature interaction on the two independent branches of detail branch and semantic branch; Step 3: Use the three-branch detail attention fusion module TBDAFM to fuse the detail branch and the semantic branch, and use the additional detail branch for re-fusion; Step 4: To achieve efficient and accurate segmentation, a dual-branch structure model is trained on the public dataset Cityscapes; Step 5: Send the fused feature map to the segmentation head and output the category label of each object in the image.

[0020] like Figure 1 As shown, in step 1, the S1, S2, and S3 stages undergo multiple convolutions, pooling, and nonlinear processing to reduce the image resolution of the image to 1 / 8 of the original input. The 1 / 8 image is considered to be the best resolution choice, which can retain rich feature map information. In this embodiment, the image is preprocessed into two fixed sizes of 512×1024 and 768×1536.

[0021] like Figure 2 As shown in the figure, the detail branch and the semantic branch are two independent branches. The continuous attention interaction module CAIM can be used to extract rich features with different resolutions. The two continuous attentions in the continuous attention interaction module CAIM are used to interact information between cross-resolution features, which reduces the semantic gap between feature maps of different resolutions in the fusion process and improves the segmentation performance.

[0022] like Figure 3 As shown in the figure, after feature interaction, the processed detail branch, semantic branch and additional detail branch are sent to the three-branch detail attention fusion module TBDAFM for fusion. The semantic branch and detail branch are deeply fused using the self-attention mechanism, and the additional detail branch is used to guide the final fusion result to increase global and local dependencies. Effectively improve the effect of image segmentation.

[0023] Cityscapes dataset, with resolution of 768×1536 and 512×1024, and batch sizes of 10 and 24 respectively. The maximum number of iterations is 140,000, and the initial learning rate is 0.003. In terms of data augmentation, random scaling, random padding crops, random horizontal flipping, random color jittering, and normalization are used. The random scaling range of Cityscapes is [0.25, 2.0]. NVIDIA GTX 3090 GPU was used, and the PaddlePaddle framework was used for experiments in CUDA 11.2 and CUDNN 8.1 environments. This step is the training process of the model, which is a necessary step to achieve efficient and accurate segmentation. The output segmentation results are as follows: Figure 5 shown.

[0024] This example is trained on an NVIDIA GTX 3090 GPU with 24G video memory, using the PaddlePaddle framework. The training details on the Cityscapes dataset are as follows:

[0025] 1. Dataset: Cityscapes dataset is one of the commonly used datasets in segmentation tasks. The dataset has high-quality pixel-level labels for 19 categories. The dataset contains 5,000 dense pixel images collected from car perspectives in different cities. Among them, there are 2,979 images in the training dataset, 500 images in the validation dataset, and 1,525 images in the test dataset.

[0026] 2. Evaluation indicators: The two most important evaluation indicators used in real-time semantic segmentation are mIoU average intersection over union and FPS frames per second. They can comprehensively evaluate the quality of the real-time semantic segmentation model.

[0027] 3. Comparative experiment: This embodiment is compared with 22 current representative real-time semantic segmentation methods on the Cityscapes dataset. Table 1 shows the comparison results of the segmentation method of the present invention and some classic real-time segmentation networks on the Cityscapes validation set.

[0028] Among them, "no" means that the method has no backbone. "backbone" means the backbone model pre-trained on the ImageNet dataset. "*" means that the inference speed, GFLOPs and parameters of the model are tested and provided on the platform of this embodiment. If the method is marked with "-", TensorRT is used for accelerated processing. "-" means that these methods do not report the corresponding results. Table 1 Comparison with 22 representative methods on the Cityscapes dataset

[0029] As can be seen from Table 1, at a resolution of 512×1024, DCATNet-S achieves 160.1FPS and 75.0% mIoU, while DCATNet-L achieves 141.5PFS and 75.6% mIoU. At a resolution of 768×1536, DCATNet-S achieves 117.8FPS and 76.5% mIoU, while DCATNet-L achieves 96PFS and 77.6% mIoU. It can be seen that the DCATNet-L of this embodiment is superior to STDC2-Seg75 in segmentation accuracy. On the Cityscapes dataset, the network of this embodiment achieves a balance between speed and performance, which can well guarantee higher accuracy and faster reasoning speed. In terms of accuracy, the method of this embodiment is significantly better than other more advanced methods, such as STDCNet and BiseNetV2, etc. Therefore, the present invention is beneficial.

[0030] 4. Visualization results: In this embodiment, Figure 4 The visualization results of several different methods on the Cityscapes dataset are shown in . Figure 4 From left to right, they are: original image, BiSeNetV1, BiSeNetV2, STDCNet, DCATNet and true label. It can be seen from the white boxes in these figures that the method of this embodiment shows clearer segmentation results and more correct label classification than other methods, which shows that the method of this embodiment is better than the three comparable methods and achieves good segmentation effect.

[0031] It should be noted that the parts not described in detail in the above embodiments are all prior art.

[0032] The above description is only a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Although the present invention has been disclosed as a preferred embodiment as above, it is not intended to limit the present invention. Any technician familiar with the profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention should be covered within the protection scope of the present invention.

Claims

1. A real-time semantic segmentation method based on a continuous attention three-branch network, characterized by: The following steps are involved: Step 1: Preprocess the image into two fixed sizes and then send it to the backbone network to perform preliminary feature extraction on the first three stages S1, S2, and S3; Step 2: Starting from the S3 stage, the continuous attention interaction module CAIM is used to perform feature interaction on the two independent branches of detail branch and semantic branch; Step 3: Use the three-branch detail attention fusion module TBDAFM to fuse the detail branch and the semantic branch, and use the additional detail branch for re-fusion; Step 4: To achieve efficient and accurate segmentation, a dual-branch structure model is trained on the public dataset Cityscapes; Step 5: Send the fused feature map to the segmentation head and output the category label of each object in the image.

2. The real-time semantic segmentation method based on a continuous attention three-branch network according to claim 1, characterized in that: In step 1, the S1, S2, and S3 stages undergo multiple convolutions, pooling, and nonlinear processing to reduce the image resolution of the image to 1 / 8 of the original input.

3. The real-time semantic segmentation method based on a continuous attention three-branch network according to claim 1, characterized in that: In step 3, the semantic branch and the detail branch are deeply fused using the self-attention mechanism.

4. The real-time semantic segmentation method based on a continuous attention three-branch network according to claim 1, characterized in that: In step 4, random scaling, random padding, random horizontal flipping, random color jittering and normalization are used to perform data enhancement.

5. The real-time semantic segmentation method based on a continuous attention three-branch network according to claim 4, characterized in that: The random scaling ranges of the public dataset Cityscapes are [0.25, 2.0].