Lane region segmentation method based on gated attention double-branch encoder

By adopting a lane area segmentation method based on gated attention dual-branch encoder in the traffic monitoring system, the problem of identification and segmentation difficulties of traditional methods in multi-lane traffic monitoring scenarios is solved, and higher segmentation accuracy and connectivity are achieved.

CN119810772AInactive Publication Date: 2025-04-11ZENMORN (HEFEI) TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510313634.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-04-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The traditional lane area segmentation method performs poorly in multi-lane traffic monitoring scenarios, especially when the image is taken from the upper side view angle and the target direction is arbitrary, and conventional image semantic segmentation methods are difficult to accurately identify and segment the lane area.

Method used

The lane area segmentation method based on the gated attention dual-branch encoder is adopted, combined with the dual-branch encoder and attention decoder, and feature extraction and area segmentation are used for gated attention mechanisms, and more accurate image semantic segmentation and target recognition are achieved through cascade receptive field enhancement.

Benefits of technology

It improves the accuracy and efficiency of the traffic monitoring system, can capture lane morphological characteristics more accurately, achieve accurate lane area segmentation, and improves segmentation accuracy and connectivity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810772A_ABST
    Figure CN119810772A_ABST
Patent Text Reader

Abstract

The invention relates to the field of image processing, and discloses a lane region segmentation method based on a gated attention double-branch encoder, which comprises the following steps of: 1, acquiring a scene image sample; 2, preprocessing a scene image sample, and importing the scene image sample into the constructed depth model for training; 3, constructing a network codec, carrying out feature fusion on the image samples, and obtaining a decoded feature map; 4, judging a scene image sample by utilizing the trained depth model embedding equipment, and carrying out pixel point classification to obtain a final image visual separation graph; the dual-encoder input channel-by-channel self-attention and gating mechanism is applied to each level to capture more complex details and construct multi-scale features, through the network architecture, morphological features of lanes can be captured more accurately, accurate lane region segmentation is achieved, and a novel network architecture for lane segmentation is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a lane area segmentation method based on a gated attention dual-branch encoder. Background Art

[0002] Traffic monitoring is an important means to ensure road traffic safety and improve traffic efficiency. Traditional traffic monitoring systems usually use cameras to obtain images on the road and monitor traffic flow, vehicle driving status, and accident occurrences through manual analysis.

[0003] However, with the increase in traffic volume and the progress of urbanization, traditional monitoring methods can no longer meet the growing demand. In recent years, deep learning has made great breakthroughs in the field of computer vision, especially in image semantic segmentation. Semantic segmentation technology can assign each pixel in the image to the category of the traffic monitoring scene, thereby achieving accurate recognition and segmentation of different targets in the image. Conventional lane area segmentation methods still face some challenges in traffic monitoring scenarios, such as multi-lane traffic monitoring images. In multi-lane traffic monitoring scenarios, the acquired images are often taken from the side and top perspectives, and the targets in the images often have arbitrary directions and occupy very small parts of the image. Conventional image semantic segmentation methods perform poorly in this case.

[0004] The lane area segmentation method is generally implemented in the following ways: 1. Query stage: the monitoring personnel extract the images in the monitoring screen and manually input them into the lane area segmentation system for analysis; 2. Real-time processing: the images collected by each camera are automatically sent to the lane area segmentation system for real-time analysis. The traditional lane area segmentation system has some limitations in both the query stage and batch testing. First, the query stage requires the monitoring personnel to manually extract the images and input them into the system. This process is limited by manpower and lacks specificity. Secondly, the automatic image transmission method is used in batch testing, but it is also limited by the angle of the camera. Most of the unnecessary images cannot be accurately filtered out and cannot respond to emergencies.

[0005] Based on this, a lane area segmentation method based on gated attention dual-branch encoder is proposed to solve the above problems. Summary of the invention

[0006] The purpose of the present invention is to overcome the shortcomings of the prior art. To achieve the above purpose, a method based on a gated attention dual-branch encoder and cascade receptive field enhancement is adopted. The method combines the dual-branch encoder and the attention decoder, and uses the gated attention mechanism in the image semantic segmentation process to achieve more accurate feature extraction and region segmentation. By embedding the method into the camera of the monitoring system, real-time image semantic segmentation and target recognition can be achieved, further improving the accuracy and efficiency of the traffic monitoring system. The purpose of the present invention can be achieved by the following technical solutions: A lane region segmentation method based on a gated attention dual-branch encoder comprises the following steps: Step 1: Obtain scene image samples; Step 2: Preprocess the scene image samples and import the constructed training depth model; Step 3: Build a network codec, perform feature fusion on scene image samples and obtain a decoded feature map; Step 4: Use the trained deep model to embed the device to judge the scene image samples, classify the pixels, and obtain the final image visual segmentation map.

[0007] Preferably, it also includes: Step 1: Obtain data of image samples of a traffic monitoring scene, wherein the data of the image samples includes training data of m images, verification data of n images, and test data of several images, wherein the training data and verification data include label images corresponding to the original images; Step 2: Normalize the RBG channels of the input image samples to between -1 and 1, configure the loss function and optimizer, and train the deep model; Step 3: Use the constructed network encoder to extract features and obtain fusion features; Step 4: Use the constructed network decoder and encoder to combine features to obtain a more accurate decoding feature map; Step 5: Determine whether the pixel points in the input image belong to the target to be extracted by training the deep model, embed the trained deep model into the device, cooperate with it to perform real-time lane area segmentation, and perform test enhancement operations on the overlapping areas to obtain more accurate segmentation results.

[0008] Preferably, the specific steps of processing the scene image samples, configuring the loss function and the optimizer, and training the deep model include: Step 1: Set the training set of scene image samples to m images , set the corresponding label images of m images to ,in Indicates the training set images, Indicates the training set The label image of the image, ; Step 2: Set the validation set of scene image samples to n images , set n corresponding label images to ,in Indicates the validation set images, Indicates the validation set The label image of the image, ; Step 3: Develop a deep model training strategy and set the ratio of training set to test set ; Step 4: Normalize the input scene image samples: ,in is the input scene sample image; Step 5: Set the optimizer to Adam, and then obtain the final loss function based on the binary cross entropy loss function and the intersection-over-union loss function.

[0009] Preferably, according to the binary cross entropy loss function and the intersection-over-union loss function, the specific steps of obtaining the final loss function include: According to the binary cross entropy loss function And the intersection-over-union loss function , and obtain the loss function ; ; ; ; in, represents the binary cross entropy loss function, where Indicates the image The true value of each pixel, Indicates the image The predicted value of each pixel; represents the intersection-over-union loss function, Represents the true value area in an image With prediction area The intersection of Represents the true value area in an image With prediction area The union of; Represents the final loss function, where and Represent the weights of binary cross entropy loss and intersection-over-union loss respectively and have , The number of all pixels in the input image, , and Represent the width and height of the input image respectively.

[0010] Preferably, the specific steps of extracting features using the constructed network encoder to obtain fusion features include: Step 1: Build the first path of the network encoder, use the residual network to extract features, and perform 5 downsamplings in total to obtain the feature map ,in The size is 2 times; Step 2: Build the second path of the network encoder, use dynamic snake convolution blocks to extract features, and perform downsampling 5 times in total to obtain the feature map ,in The size is 2 times; Step 3: Fuse feature maps of different sizes to obtain a fused feature map , fusion feature map The calculation formula is: Here, ,in represents the element at coordinate (i, j) in P_X, indicating the influence of the i-th channel on the j-th channel, for , that is, the addition of corresponding elements. In order to promote mutual guidance, P_A and P_B are multiplied element by element to obtain the fused affinity matrix .

[0011] Preferably, the specific steps of combining features by building the network decoder and encoder to obtain a more accurate decoding feature map include: Step 1: Construct an MA module to capture rich features from the self-attention branch of the ResNet encoder and the dynamic snake convolution encoder, which are then complementarily fused through a multi-gate mechanism. The module is placed in the fusion part of each layer of the ResNet encoder and the output is fed into the ResNet encoder block of the next layer to adapt the correlation matrix C×C; Step 2: Multi-dimensional gating aggregation mechanism. In this module, the fusion of two different gating mechanisms ultimately selects a variety of information types, enhancing the expressiveness of information. ; Among them, the transpose of the fusion affinity matrix Pmix is ​​multiplied by F_a and F_b respectively, and the result is resized to the shape of C×H×W, and the enhanced features F'_a and F'_b are calculated, where i represents each position of the feature map, αx represents two learnable weights initialized to 0, corresponding to A and B respectively, and P_{mix} is the element in P_{mix} located at the coordinate (i, j); Step 3: Up-sampling the fused features. In the above sampling process, the size of the feature map is expanded to twice the size of the original feature map, and the number of feature channels is reduced to half of the original number of channels; Step 4: The goal of SpaGate is to select spatial region features, which is achieved through the spatial attention module, which multiplies the generated attention tensor with the original feature tensor to achieve spatial gating for each image patch; Step 5: First, global average pooling (GAP) and global maximum pooling (GMP) operations are used along the channel axis to emphasize the spatially active areas and generate two types of two-dimensional feature maps. Based on the spatial attention convolution, these two two-dimensional feature maps are concatenated and convolved through the standard convolution layer to obtain the two-dimensional spatial attention map As. Therefore, the final output after the spatial gated convolution is S. ; Among them, based on the spatial attention convolution, these two-dimensional feature maps are connected and convolved through the standard convolution layer to obtain a two-dimensional spatial attention map , where [;] indicates a connection operation, represents the Sigmoid function, W_s represents the weight of the convolution operation, so the final output after the spatial gated convolution is S.

[0012] Preferably, the training deep model is used to determine whether a pixel in the input image belongs to the target to be extracted, the training deep model is embedded in the device, and the real-time lane area segmentation is performed, and the test enhancement operation is performed on the overlapping area. The specific steps of obtaining a more accurate segmentation result include: Step 1: In the decoder stage, four FFU modules are placed together to fuse three features with different semantics from the encoder and the intermediate layer. These three feature maps are connected along the channel dimension. Subsequently, a 1×1 convolutional layer is used to generate a preliminary fusion result. Finally, a channel attention weight is assigned to each channel through the channel attention (CA) mechanism. ; Among them, Ei (i = 1, 2, 3) represents the feature maps of the two encoding stages and a feature map of the current decoder, Hcat(·) represents the connection operation along the channel dimension, and De represents the final fusion result; Step 2: Embed the trained deep learning model into the camera device to perform real-time image lane segmentation. Based on the relationship between the camera position and the actual image carrying area, different real-time lane segmentation inferences are performed. If overlapping areas are generated, , while performing the test enhancements: ; Among them, for the overlapping areas in the feature map The corresponding pixel in Calculating and obtaining the probability value that the target confidence is a positive sample; Step 3: Pass the overlapping area The pixel points are calculated multiple times to obtain the average confidence level, which improves the final detection accuracy and obtains more accurate segmentation results.

[0013] Compared with the prior art, by adopting the above technical solution, the present invention has the following technical effects: First, the framework provides a basic structure for the entire network. Then, a newly designed multi-gate information self-attention (MA) module is introduced, which can capture long-distance semantic information and control the information flow from two data sources in a complementary manner. Finally, the design of the loss function is outlined, which can effectively train the network and optimize the performance of the network. In an embodiment of the present invention, a network called GateNet is described in detail as an example. The network includes a 7×7 convolution layer with a stride of 2, followed by a residual block and a maximum pooling layer to reduce its dimension to 64×64. Subsequently, GateNet is fed into the 4-level encoding encoder of ResNet34. The first two layers use custom residual blocks and pooling, and the last two layers use pre-trained 6-layer and 4-layer residual blocks. At the same time, the dynamic snake convolution block encoder The encoder layer inputs each encoder layer of the network and merges them into a shared feature layer to extract finer details related to road morphology. In another branch of the encoder, dynamic snake convolutions are integrated into each layer of the encoder to extract more complex details. In addition, dual encoder input channel-by-channel self-attention and gating mechanisms are applied to each level to capture more complex details and construct multi-scale features. Through this network architecture, the morphological characteristics of the lane can be more accurately captured and accurate lane area segmentation can be achieved. A new network architecture for lane segmentation is provided, which adopts multi-gate information self-attention, can capture long-range semantic information, integrate local and global information, and achieve better road extraction effects. This method achieves higher segmentation accuracy (F1 score and IoU) and connectivity (APLS), verifying the effectiveness of the proposed method. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings: Figure 1 A schematic diagram of the steps of a method for segmenting lane areas in a traffic monitoring image according to some embodiments disclosed in the present application; Figure 2 A schematic diagram of a training and testing framework flow chart of an embodiment disclosed in this application; Figure 3 A schematic diagram of a gated attention structure of some embodiments disclosed in this application; Figure 4 This is a schematic diagram of the dual-branch encoder structure of some embodiments disclosed in this application. DETAILED DESCRIPTION

[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0016] Please refer to Figure 1 and Figure 2 In an embodiment of the present invention, a lane area segmentation method based on a gated attention dual-branch encoder comprises the following specific steps: Step 1: Obtain the training set and test set of the lane area segmentation method; Step 2: Build a network encoder and decoder, input lane area samples into the encoder to extract features and perform feature fusion to obtain a decoded feature map; Step 3: The decoded feature map obtains enhanced features and fuses them through the fusion feature module; Step 4: The fused feature map is passed through the decoder to generate the final lane area segmentation map; Step 5: Use the trained deep model to embed lane area samples, classify pixels, and obtain the final lane area segmentation map.

[0017] In some specific embodiments, the method for segmenting lane areas of traffic monitoring images is specifically as follows: First, we obtain scene image samples in traffic monitoring scenes, and divide the obtained data into training data and test data. The image sample data includes training data of m images and test data of several images. The training data and verification data contain label images corresponding to the original images. In order to collect image sample data, multiple cameras are used, such as cameras, etc. These devices can capture images in traffic monitoring scenes. At the same time, image annotation tools can be used to annotate the captured images to obtain corresponding label images. Through this process, training data and test data sets are obtained, where each sample includes the original image and the corresponding label image. These data will be used to train and verify relevant models and algorithms for traffic monitoring scene images.

[0018] For the input image samples, first normalize their BGR channels and limit the channel value range to between -1 and 1. This processing is conducive to the convergence of the model and the stability of the training process. Next, configure the loss function and optimizer. These two are very important components of the training process. The loss function is used to measure the difference between the predicted value and the true value, and the optimizer is used to update the model parameters according to the results of the loss function to continuously optimize the performance of the model. After that, start training the deep model. The specific steps are as follows: Set the training set of scene image samples to m images , set the corresponding label images of m images to ,in Indicates the training set images, Indicates the training set The label image of the image, ; In a specific implementation manner, image selection can cover most scenes.

[0019] The accuracy is evaluated using the IoU intersection-over-union ratio, that is, the ratio of the overlapping part of the true value of the tested area and the area predicted by the model is used as the evaluation standard for measuring the effectiveness of the model. In the specific implementation, 120 epochs are set, and the learning rate decay is set at 80 and 110 moments, and the decay factor is 5.0.

[0020] For the input image samples, normalization is required: The specific steps are as follows: First, read the input sample image and convert the RGB channel value range of the image from 0 to 255 to a 32-bit floating point number between 0 and 1. Then, use the functions in the OpenCV library to complete the image reading and normalization operations. By normalizing the image, the image value range can be limited to between -1 and 1. It should be noted that the size of the input image is a fixed value, and its size is the specified size. , and the number of channels of the image is 3, representing RGB channels. Through such normalization processing, the input image can be made more suitable for the training and reasoning stages of the deep learning model.

[0021] The optimizer is set to Adam, and then the final loss function is obtained based on the binary cross entropy loss function and the dice coefficient loss function. In the specific implementation, Adam takes a shorter time and is more conducive to rapid convergence. The initial learning rate is set to , other parameters remain unchanged.

[0022] In some specific embodiments, according to the binary cross entropy loss function and the dice coefficient loss function, the specific steps of obtaining the final loss function include: first setting the loss function, according to the binary cross entropy loss function And the dice coefficient loss function are superimposed in proportion to obtain the final loss function , the specific formula is as follows: ; ; ; in, represents the binary cross entropy loss function, where Indicates the image The true value of each pixel, Indicates the image The predicted value of each pixel; represents the intersection-over-union loss function, Represents the true value area in an image With prediction area The intersection of Represents the true value area in an image With prediction area The purpose of using the intersection-over-union loss function is to make the predicted image contour closer to the actual situation; Represents the final loss function, where and Represent the weights of binary cross entropy loss and intersection-over-union loss respectively and have , it is more appropriate to control these two parameters at 0.6 and 0.4 or 0.7 and 0.3; The number of all pixels in the input image, , and Respectively represent the width and height of the input image. In a specific implementation, The value is ,Right now .

[0023] like Figure 4 As shown, the constructed network dual-branch encoder is used to extract features and obtain fusion features. The specific steps include: In a specific implementation, the input image size is ; The feature map size is: , Different from the first branch, the dilated convolution adopted by this branch will make the receptive field of the feature map larger, so that the feature maps at the same scale have different receptive fields.

[0024] The first pass of the encoder is built, and the residual network is used to extract features. Downsampling is performed 5 times in total to obtain the feature map; ,in The size is 2 times; The second path of the network encoder is built, and dynamic snake convolution blocks are used to extract features. A total of 5 downsamplings are performed to obtain the feature map ,in The size is 2 times; Fuse feature maps of different sizes to obtain a fused feature map , fusion feature map The calculation formula is: ; Here, ,in represents the element at coordinate (i, j) in P_X, indicating the influence of the i-th channel on the j-th channel, for , that is, the addition of corresponding elements. In order to promote mutual guidance, P_A and P_B are multiplied element by element to obtain the fused affinity matrix .

[0025] according to Figure 3 The MA module is proposed, which subtly captures the rich features in the self-attention branch of the ResNet encoder and the dynamic snake convolution encoder. These unique features are then complementarily fused through a multi-gate mechanism. It should be noted that this module is placed in the fusion part of each layer of the encoder and the output is passed to the ResNet block of the next layer. This method has a dual effect. First, it adapts to the shared correlation matrix C×C, which is especially useful when the number of channels is maximized and the semantic information is most complex. Second, it significantly reduces the complexity of the network, making the architecture more lightweight. The multi-dimensional gated aggregation mechanism, in this module, the fusion of two different gating mechanisms ultimately selects a variety of information types, thereby enhancing the expressiveness of the information. ; Among them, the transpose of the fusion affinity matrix Pmix is ​​multiplied by F_a and F_b respectively, and the result is resized to the shape of C×H×W, and the enhanced features F'_a and F'_b are calculated, where i represents each position of the feature map, αx represents two learnable weights initialized to 0, corresponding to A and B respectively, and P_{mix} is the element in P_{mix} located at the coordinate (i, j); In the decoder stage, four FFU modules are placed together to fuse three features with different semantics from the encoder and the intermediate layer. These three feature maps are connected along the channel dimension. Subsequently, a 1×1 convolutional layer is used to generate a preliminary fusion result. Finally, the channel attention weight is assigned to each channel through the channel attention (CA) mechanism. ; Among them, Ei (i = 1, 2, 3) represents the feature maps of the two encoding stages and a feature map of the current decoder, Hcat(·) represents the connection operation along the channel dimension, and De represents the final fusion result. The average confidence is calculated multiple times by calculating the pixels in the overlapping area to improve the final detection accuracy and obtain a more accurate segmentation result.

[0026] Through this method, the traffic monitoring system can better cope with the semantic segmentation challenges in traffic monitoring scenarios and improve traffic safety and traffic monitoring effects.

[0027] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the invention to only specific implementation methods. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.

Claims

1. A lane region segmentation method based on a gated attention dual-branch encoder, characterized in that: The following steps are involved: Step 1: Obtain scene image samples; Step 2: Preprocess the scene image samples and import the constructed training depth model; Step 3: Build a network codec, perform feature fusion on scene image samples and obtain a decoded feature map; Step 4: Use the trained deep model to embed the device to judge the scene image samples, classify the pixels, and obtain the image visual segmentation map.

2. According to claim 1, a lane area segmentation method based on a gated attention dual-branch encoder is characterized in that: Also includes: Step 1: Obtain data of image samples of a traffic monitoring scene, wherein the data of the image samples includes training data of m images, verification data of n images, and test data of several images, wherein the training data and verification data include label images corresponding to the original images; Step 2: Normalize the RBG channels of the input image samples to between -1 and 1, configure the loss function and optimizer, and train the deep model; Step 3: Use the constructed network encoder to extract features and obtain fusion features; Step 4: Use the constructed network decoder and encoder to combine features to obtain a more accurate decoding feature map; Step 5: Determine whether the pixel points in the input image belong to the target to be extracted by training the deep model, embed the trained deep model into the device, cooperate with it to perform real-time lane area segmentation, and perform test enhancement operations on the overlapping areas to obtain more accurate segmentation results.

3. According to claim 2, a lane area segmentation method based on a gated attention dual-branch encoder is characterized in that: The specific steps of processing the scene image samples, configuring the loss function and the optimizer, and training the deep model include: Step 1: Set the training set of scene image samples to m images , set the corresponding label images of m images to ,in Indicates the training set images, Indicates the training set The label image of the image, ; Step 2: Set the validation set of scene image samples to n images , set n corresponding label images to ,in Indicates the validation set images, Indicates the validation set The label image of the image, ; Step 3: Develop a deep model training strategy and set the ratio of training set to test set ; Step 4: Normalize the input scene image samples: ,in is the input scene sample image; Step 5: Set the optimizer to Adam, and then obtain the final loss function based on the binary cross entropy loss function and the intersection-over-union loss function.

4. According to claim 3, a lane area segmentation method based on a gated attention dual-branch encoder is characterized in that: According to the binary cross entropy loss function and the intersection-over-union loss function, the specific steps of obtaining the final loss function include: According to the binary cross entropy loss function And the intersection-over-union loss function , and obtain the loss function ; ; ; ; in, represents the binary cross entropy loss function, where Indicates the image The true value of each pixel, Indicates the image The predicted value of each pixel; represents the intersection-over-union loss function, Represents the true value area in an image With prediction area The intersection of Represents the true value area in an image With prediction area The union of; Represents the final loss function, where and Represent the weights of binary cross entropy loss and intersection-over-union loss respectively and have , The number of all pixels in the input image, , and Represent the width and height of the input image respectively.

5. According to claim 2, a lane area segmentation method based on a gated attention dual-branch encoder is characterized in that: The specific steps of extracting features using the constructed network encoder and obtaining fusion features include: Step 1: Build the first path of the network encoder, use the residual network to extract features, and perform 5 downsamplings in total to obtain the feature map ,in The size is 2 times; Step 2: Build the second path of the network encoder, use dynamic snake convolution blocks to extract features, and perform downsampling 5 times in total to obtain the feature map ,in The size is 2 times; Step 3: Fuse feature maps of different sizes to obtain a fused feature map , fusion feature map The calculation formula is: Here, ,in represents the element at coordinate (i, j) in P_X, indicating the influence of the i-th channel on the j-th channel, for , that is, the addition of corresponding elements. In order to promote mutual guidance, P_A and P_B are multiplied element by element to obtain the fused affinity matrix .

6. According to claim 5, a lane area segmentation method based on a gated attention dual-branch encoder is characterized in that: The specific steps of combining features using the constructed network decoder and encoder to obtain a more accurate decoding feature map include: Step 1: Construct an MA module to capture rich features from the self-attention branch of the ResNet encoder and the dynamic snake convolution encoder, which are then complementarily fused through a multi-gate mechanism. The module is placed in the fusion part of each layer of the ResNet encoder and the output is fed into the ResNet encoder block of the next layer to adapt the correlation matrix C×C; Step 2: Multi-dimensional gating aggregation mechanism. In this module, the fusion of two different gating mechanisms ultimately selects a variety of information types, enhancing the expressiveness of information. ; Among them, the transpose of the fusion affinity matrix Pmix is ​​multiplied by F_a and F_b respectively, and the result is resized to the shape of C×H×W, and the enhanced features F'_a and F'_b are calculated, where i represents each position of the feature map, αx represents two learnable weights initialized to 0, corresponding to A and B respectively, and P_{mix} is the element in P_{mix} located at the coordinate (i, j); Step 3: Up-sampling the fused features. In the above sampling process, the size of the feature map is expanded to twice the size of the original feature map, and the number of feature channels is reduced to half of the original number of channels; Step 4: The goal of SpaGate is to select spatial region features, which is achieved through the spatial attention module, which multiplies the generated attention tensor with the original feature tensor to achieve spatial gating for each image patch; Step 5: First, global average pooling (GAP) and global maximum pooling (GMP) operations are used along the channel axis to emphasize the spatially active areas and generate two types of two-dimensional feature maps. Based on the spatial attention convolution, these two two-dimensional feature maps are concatenated and convolved through the standard convolution layer to obtain the two-dimensional spatial attention map As. Therefore, the final output after the spatial gated convolution is S. ; Among them, based on the spatial attention convolution, these two-dimensional feature maps are connected and convolved through the standard convolution layer to obtain a two-dimensional spatial attention map , where [;] indicates a connection operation, represents the Sigmoid function, W_s represents the weight of the convolution operation, so the final output after the spatial gated convolution is S.

7. According to claim 2, a lane area segmentation method based on a gated attention dual-branch encoder is characterized in that: The specific steps of determining whether a pixel in an input image belongs to a target to be extracted by using the training deep model, embedding the training deep model into a device, cooperating with the real-time lane area segmentation, and performing a test enhancement operation on the overlapping area to obtain a more accurate segmentation result include: Step 1: In the decoder stage, four FFU modules are placed together to fuse three features with different semantics from the encoder and the intermediate layer. These three feature maps are connected along the channel dimension. Subsequently, a 1×1 convolutional layer is used to generate a preliminary fusion result. Finally, a channel attention weight is assigned to each channel through the channel attention (CA) mechanism. ; Among them, Ei (i = 1, 2, 3) represents the feature maps of the two encoding stages and a feature map of the current decoder, Hcat(·) represents the connection operation along the channel dimension, and De represents the final fusion result; Step 2: Embed the trained deep learning model into the camera device to perform real-time image lane segmentation. Based on the relationship between the camera position and the actual image carrying area, different real-time lane segmentation inferences are performed. If overlapping areas are generated, , while performing the test to enhance the operation: ; Among them, for the overlapping areas in the feature map The corresponding pixel in Calculating and obtaining the probability value that the target confidence is a positive sample; Step 3: Pass the overlapping area The pixel points are calculated multiple times to obtain the average confidence level, which improves the final detection accuracy and obtains more accurate segmentation results.

Citation Information

Patent Citations

  • Image visual semantic segmentation method based on two-way region attention coding and decoding

    CN113065578A

  • Visual question-answering method and system based on multi-level visual feature enhancement network

    CN115984575A

  • Cross-coupled multi-task learning for depth mapping and semantic segmentation

    WO2023102223A1