A lane line recognition positioning method based on mixed attention feature enhancement
By employing a hybrid attention feature enhancement method, combining ResNet, FPN, ROI Align, and DCS modules, attention operations are optimized, addressing the accuracy and computational resource issues of lane line recognition and localization in complex environments, and achieving efficient and accurate lane line recognition and localization.
Patent Information
- Application Number
- CN202411917776.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-12-24
AI Technical Summary
Existing lane line recognition and localization methods have low recognition accuracy in complex environments, struggle to handle situations where lane lines are obscured or worn, and require high computational resources, which cannot meet the needs of autonomous driving.
A hybrid attention feature enhancement method is adopted, which extracts feature information through ResNet and FPN networks, combines ROI Align and DCS modules for feature fusion, uses Transformer Decoder for decoding, and adopts SimOTA strategy to train the model and optimize attention operation to suppress the influence of interference regions.
It improves the accuracy and speed of lane line recognition and positioning, reduces computing costs, can better perceive road surface track information, adapts to complex environments, and has good practical feasibility.
Smart Images

Figure CN120071278B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of automatic driving, and in particular to a lane line identification and positioning method based on mixed attention feature enhancement. BACKGROUND
[0002] In recent years, automatic driving technology has developed rapidly. A complete automatic driving system includes multiple core parts, such as environment perception, decision planning, and control execution. Among these links, environment perception, as the primary link of automatic driving, is in a key position for the interaction of the vehicle and the external environment information. The main task of environment perception is to detect and identify vehicles, pedestrians, road traffic signs, markings, and traffic signal controls. The core goal is to enable intelligent driving cars to better simulate the perception ability of human drivers, so as to accurately understand the driving environment of themselves and the surroundings.
[0003] Lane line identification and positioning is a key link in intelligent driving technology, and rapid and effective detection of lane lines in road condition images plays a very important role in driving path planning, road deviation warning, and traffic accident avoidance.
[0004] Traditional lane line identification and positioning methods use edge detection (Canny) and Hough line detection (Hough) techniques to extract lane line features from images. In the HSV color space, the Canny operator is used for edge detection, and the Hough transform is used for lane line tracking or the Hough transform and slope feature recognition are used to identify the edge segments of the lane line. The lane line is fitted by the least squares method, and then lane line identification and positioning are realized.
[0005] Although traditional lane line identification and positioning algorithms have the advantages of rapid detection and low computational resource requirements, their anti-interference ability is weak. In practical applications, there are various types of lane lines, including yellow lines, white lines, single lines, and other forms. However, most lane line detection methods mainly focus on the detection of a single lane line, and only a few works are based on lane line position detection to classify the overall attributes. These methods are difficult to cope with the complex and variable road conditions in urban environments and cannot meet the needs of the development of automatic driving. Therefore, with the development of deep learning algorithms, convolutional neural network (CNN) based algorithms have shown good performance. If CNN is applied to the field of lane line identification and positioning, there is still room for improvement in how to handle situations such as lane line occlusion and wear or how to capture global information of lane lines in long straight roads or lane changes. SUMMARY
[0006] The present application aims at the defects and deficiencies of the prior art, and provides a lane line recognition and positioning method based on mixed attention feature enhancement, which solves the problems of complex scenes difficult to handle and low recognition accuracy in the prior art, uses a calibration optimization module to enhance model feature expression in the feature fusion process, optimizes the attention operation in the subsequent process, suppresses the influence of the interference area, reduces the calculation cost, fully utilizes the low-level features in the lane line recognition and positioning process to refine the features with high-level semantics, helps the model to accurately position the lane line, has higher detection speed and recognition accuracy compared with other existing methods, can help the vehicle to better perceive the road surface track information, and has good actual feasibility.
[0007] The technical scheme adopted by the present application to solve its technical problems is: a lane line recognition and positioning method based on mixed attention feature enhancement, which comprises the following steps:
[0008] Step 1: extracting feature information of the to-be-detected object through a convolutional neural network;
[0009] Step 2: processing the feature information based on a feature fusion network to obtain a fused feature map;
[0010] Step 3: designing a calibration optimization module to enhance feature information expression;
[0011] Step 4: inputting the processed feature information into an optimized decoder for decoding;
[0012] Step 5: training the model to obtain a final detection model.
[0013] As a preferred scheme of the lane line recognition and positioning method, in step 1, the feature information of the to-be-detected object is extracted through a convolutional neural network, that is, ResNet is used as the backbone of the algorithm model, the to-be-detected object is first extracted through an initial convolutional layer to obtain low-level features, and then more complex features are gradually extracted through multiple residual blocks. Each residual block comprises a convolutional layer and a skip connection, the latter directly adds the input and the output of the convolutional layer to ensure that the information will not be lost in the multi-layer network.
[0014] As a preferred scheme of the lane line recognition positioning method, in the step 2, the feature information is processed based on a feature fusion network to obtain a fused feature map, and a FPN (Feature Pyramid Network) network is used as a feature fusion module, aiming to process multi-scale information and perform efficient fusion. After the feature information to be processed is extracted by a conventional convolution at the bottom of the FPN network, a plurality of scale feature maps are generated, and the FPN network performs feature fusion through a top-down path, in which process, the feature map of a higher layer is fused with the feature map of a lower layer through up-sampling, so that the low-level detail information and the high-level semantic information are combined.
[0015] As a preferred scheme of the lane line recognition positioning method, in the step 3, a calibration optimization module is designed to enhance the expression of feature information, and the input feature map X = [H, W, C] is obtained, wherein H is the height of the feature map, W is the width of the feature map, and C is the channel number of the feature map. The ROI feature X of the lane prior of the feature map X is obtained by using ROI Align. l In order to collect the nearby features of each target pixel, a dynamic feature fusion module (DCS) based on hybrid attention is used to further extract the lane prior feature Xp, and then the global feature map X is obtained. f The attention operation is performed to obtain a vector x, wherein the global feature map X f is a feature map obtained by adjusting the size of the feature map X and then flattening, and the process of the attention operation can be represented as:
[0016]
[0017] Wherein, C is the length of the attention head, that is, the channel number of the feature map, and Softmax is a normalization exponential function.
[0018] As a preferred scheme of the lane line recognition positioning method, in the step 3, a calibration optimization module is designed to enhance the expression of feature information, and the input feature map X = [H, W, C] is obtained, wherein H is the height of the feature map, W is the width of the feature map, and C is the channel number of the feature map. The ROI feature X of the lane prior of the feature map X is obtained by using ROI Align. P The feature information of the lane line is refined, and the DCS module is constructed based on a large kernel convolution and hybrid attention. l After two different large kernel depth convolutions are performed to generate feature maps, the feature maps are spliced to generate a feature map The process can be represented as:
[0019]
[0020] Wherein, DWConv (X l ) represents a depth separable convolution operation on the feature X l , and then the two features are concatenated to obtain a feature map
[0021] When processing using the mixed attention, since the mixed attention is designed based on channel attention and spatial attention, the input feature map After the network preliminarily extracts the features, the features are first processed by the channel attention mechanism, the inter-channel relationship of the features is utilized to generate a channel attention map The process can be represented as:
[0022]
[0023] wherein represents average pooling on the feature , represents maximum pooling on the feature , after which the two features are processed by an MLP and a Sigmoid function (σ) to serve as channel weight coefficients, and finally multiplied by the feature to obtain the channel attention map
[0024] The channel attention map is processed by the spatial attention mechanism to obtain the spatial relationship between the features and generate a spatial attention map The process can be represented as:
[0025]
[0026] After the channel attention map is subjected to average pooling and maximum pooling operations, a convolutional layer (f 7 ×7 ) with a size of 7x7 is used for operation, and after being processed by a Sigmoid function, a spatial weight coefficient is generated, and finally multiplied by the channel attention map to obtain the spatial attention map
[0027] The feature attention map is input into different branches to generate dynamic selection values w1 and w2, and the process can be represented as:
[0028]
[0029] In one of the two branches, a convolutional layer with a size of 7x7 and a Sigmoid function are used to generate a coefficient w1 on the basis of linear processing, and in the other branch, only the feature is input into a linear layer for linear processing to generate a coefficient w2.
[0030] The obtained dynamic selection values w1, w2 are used to calibrate the features, and the operation of multiplying the features from different large kernel depth convolutions is adaptively selected before the operation of residual connection to obtain lane prior features X optimized by calibration P The process can be represented as:
[0031]
[0032] As a preferred scheme of the lane line recognition positioning method, the step 4 inputs the processed feature information into the optimized decoder for decoding, which is to decode the encoded feature information into more complex and easy-to-understand output. When the model constructs the Transformer Decoder to process the feature map, it first generates corresponding position encoding for the feature map, generates Query vector, Key vector and Value vector through weight matrix W Q and W K,V , wherein the Key vector and the Value vector share the same representation, the Query vector can generate lane attribute prediction based on multi-layer perception (MLP), then generates lane prediction probability distribution through attention encoding, in order to reduce the amount of calculation, therefore, the proxy attention module is designed, and deep separable convolution (DWC) is used in the subsequent process to restore the diversity problem faced by the attention, after attention processing, the model can pay more attention to the features related to the target in the feature map, and the result is input into the feedforward network FFN to output the decoded feature vector.
[0033] As a preferred scheme of the lane line recognition positioning method, the proxy attention module introduces an additional agent vector Agent in the traditional attention triplets (Query, Key, Value), the agent vector can serve as a proxy for Query, aggregate information from Key and Value, and then broadcast the information back to Query, and Agent can use a smaller number, so it can model global information at a lower computational cost, the process can be represented as:
[0034]
[0035] Wherein Q, K, V, A represent Query, Key, Value, Agent vectors respectively, Softmax is a normalized exponential function, and d is the length of the attention head.
[0036] In a preferred embodiment of the lane line recognition and localization method described in this invention, step 5 involves training the model to obtain the final detection model. During training, the model employs a SimOTA dynamic matching strategy. During training, each real-world lane is dynamically assigned one or more predicted lanes as a positive sample. Specifically, the predicted lanes are ranked according to their allocation cost, defined as follows:
[0037] C assign =w sim C sim +w cls C cls
[0038] C sim =(C dis .C xy .C theta ) 2
[0039] Where C cls It is the focus cost between prediction and labeling, C sim It is the cost of predicting the similarity between the lane and the actual lane, C dis C represents the average pixel distance of all valid lane points. xy C represents the distance from the starting point coordinates. theta The values representing the differences in the theta angle are all normalized to [0,1]. sim and w cls These are the weighting coefficients for each defined component. Each ground-based real-time lane is determined according to C. assign Assigning a dynamic number (top-k) of predicted lanes enables the model to effectively select the most relevant lane points, ensuring more accurate model output.
[0040] The beneficial effects of this invention are as follows: This invention uses a calibration optimization module to enhance the model's feature expression during feature fusion, and optimizes the attention operation in subsequent processes to suppress the influence of interference regions and reduce computational costs. It makes full use of low-level features in the lane line recognition and localization process to refine features with high-level semantics, helping the model to accurately locate lane lines. Compared with other existing methods, it has higher detection speed and recognition accuracy, which can help vehicles better perceive road track information and has good practical feasibility. Attached Figure Description
[0041] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Wherein:
[0043] Figure 1 A basic flowchart of a lane line recognition and positioning method based on mixed attention feature enhancement is provided for an embodiment of the present application.
[0044] Figure 2 A network model structure diagram of a lane line recognition and positioning method based on mixed attention feature enhancement is provided for an embodiment of the present application.
[0045] Figure 3 A calibration optimization module diagram of a lane line recognition and positioning method based on mixed attention feature enhancement is provided for an embodiment of the present application.
[0046] Figure 4 A DCS module structure diagram of a lane line recognition and positioning method based on mixed attention feature enhancement is provided for an embodiment of the present application.
[0047] Figure 5 A decoder structure diagram of a lane line recognition and positioning method based on mixed attention feature enhancement is provided for an embodiment of the present application.
[0048] Figure 6 A proxy attention module structure diagram of a lane line recognition and positioning method based on mixed attention feature enhancement is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to make the above objectives, features and advantages of the present application more apparent, specific embodiments of the present application will be described in detail below with the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work should fall within the protection scope of the present application.
[0050] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be practiced without the specific details, other than in the description of the application, and it is understood that the present application is not limited to the embodiments described herein. In some instances, well-known structures and functions have not been described in detail in order to avoid obscuring the application.
[0051] Secondly, the "one embodiment" or "embodiment" referred to herein can include specific features, structures or characteristics contained in at least one implementation of the present application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments.
[0052] The present application is described in detail in conjunction with the schematic diagram, and in the detailed description of the embodiments of the present application, the cross-sectional view of the device structure is partially enlarged without the general proportion for the convenience of illustration, and the schematic diagram is only an example, which should not limit the scope of protection of the present application herein. In addition, the three-dimensional spatial dimensions of length, width and depth should be included in actual production.
[0053] Meanwhile, in the description of the present application, it should be noted that the terms "upper, lower, inner and outer" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, which is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the indicated device or element must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first, second or third" are only for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0054] Unless otherwise specifically defined and limited in the present application, the terms "mounting, connecting, connecting" should be broadly understood, for example: it can be fixedly connected, detachably connected or integrally connected; it can also be mechanically connected, electrically connected or directly connected, it can also be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For those skilled in the art, the specific meaning of the above terms in the present application can be understood according to the specific circumstances.
[0055] Example 1
[0056] Reference Figures 1-6 For an embodiment of the present application, a lane line recognition and positioning method based on mixed attention feature enhancement is provided, as shown in Figure 1 The method comprises the following steps:
[0057] S1: extracting feature information of the to-be-detected object through a convolutional neural network;
[0058] Further, the feature information of the to-be-detected object is extracted through a convolutional neural network, that is, ResNet is used as the backbone of the algorithm model, and the to-be-detected object is first extracted through an initial convolutional layer to extract low-level features, and then more complex features are gradually extracted through multiple residual blocks. Each residual block includes a convolutional layer and a skip connection, the latter directly adds the input and the convolutional layer output to ensure that the information will not be lost in the multi-layer network.
[0059] S2: processing the feature information based on a feature fusion network to obtain a fused feature map;
[0060] Further, as shown in Figure 2As shown, feature information is processed using a feature fusion network to obtain fused feature maps. The Feature Pyramid Network (FPN) is used as the feature fusion module to process multi-scale information and perform efficient fusion. The feature information to be processed is extracted at the bottom of the FPN network through conventional convolutions, generating feature maps of multiple scales. The FPN network performs feature fusion through a top-down path. In this process, higher-level feature maps are upsampled and fused with lower-level feature maps, thus combining low-level detail information with high-level semantic information. When feature maps extracted by a CNN are fused using the FPN network, the spatial size of the feature maps is restored to a size close to that of the image input to the CNN. However, through the upsampling and feature fusion processes in the FPN, feature maps of different scales can provide feature information of different resolutions. The number of channels (C) may change, typically increasing at different levels to express richer semantic information.
[0061] S3: Design calibration optimization module to enhance feature information expression;
[0062] Furthermore, such as Figure 3 As shown, the design calibration optimization module enhances the representation of feature information. The input feature map X = [H, W, C], where H is the height of the feature map, W is the width of the feature map, and C is the number of channels of the feature map. ROIAlign is used to obtain the lane prior ROI features of the feature map X. The purpose of ROI Align is to map candidate regions (Regions of Interest, ROIs) of different sizes onto a fixed-size feature map, so that targets of different sizes can be processed uniformly in subsequent processing steps. It mainly uses bilinear interpolation to determine the pixel values of the scaled image, which can effectively solve the problem of region mismatch. To collect the nearby features of each target pixel, a dynamic feature fusion module (DCS) based on hybrid attention is used to further extract the lane prior features Xp, which are then compared with the global feature map X. f Attention operations yield a vector x, which combines local prior information (such as lane geometry, location, and morphology) with global contextual information (such as the overall road structure and lane distribution). This attention mechanism allows the model to focus more on key areas, enhancing its adaptability to complex environments. The global feature map X... f The feature map is obtained by adjusting the size of the feature map X and then flattening it. Finally, the attention operation process can be represented as:
[0063]
[0064] Where C is the length of the attention head, which is also the number of channels in the feature map, and Softmax is the normalization exponential function.
[0065] Further, as shown in Figure 4 , the DCS module further extracts lane prior features X P , and the DCS module is constructed based on large kernel convolution and mixed attention. The ROI features X l After two different large kernel depth convolutions, the feature maps are spliced to generate a feature map This process can be represented as:
[0066]
[0067] where DWConv(X l ) represents a deep separable convolution operation on feature X l , and then the two features are concatenated to obtain a feature map
[0068] When using mixed attention for processing, since the mixed attention is designed based on channel attention and spatial attention, the input feature map After the network extracts the features, it is first processed by the channel attention mechanism, which uses the inter-channel relationship of the features to generate a channel attention map This process can be represented as:
[0069]
[0070] where represents average pooling of feature , and represents maximum pooling of feature . After processing by MLP and Sigmoid function (σ), the two features are used as channel weight coefficients, and finally multiplied by the feature to obtain the channel attention map
[0071] The channel attention map is processed using the spatial attention mechanism to obtain the spatial relationship between features and generate a spatial attention map This process can be represented as:
[0072]
[0073] After average pooling and maximum pooling operations on the channel attention map , a convolution layer (f 7 ×7) is multiplied by the channel attention map to obtain the spatial attention map The spatial attention map is obtained after multiplication
[0074] The feature attention map is input into different branches to generate dynamic selection values w1 and w2, and the process can be represented as:
[0075]
[0076] In one of the two branches, a 7x7 convolution and a Sigmoid function are used to generate the coefficient w1 based on linear processing, and the other branch only inputs the feature into the Linear layer for linear processing to generate the coefficient w2.
[0077] The dynamic selection values w1 and w2 are used to calibrate the features, and the features from different large kernel deep convolutions are adaptively selected for multiplication and then residual connection to obtain the calibrated and optimized lane prior feature X P , and the process can be represented as:
[0078]
[0079] S4: input the processed feature information into the optimized decoder for decoding;
[0080] Further, as shown in Figure 5 , the processed feature information is input into the optimized decoder for decoding to decode the encoded feature information into more complex and easy-to-understand output. When the Transformer Decoder processes the feature map, it first generates the corresponding position encoding, generates the Query vector, Key vector and Value vector through the weight matrix W Q and W K,V , the Key vector and the Value vector share the same representation, the Query vector can generate lane attribute prediction based on the multi-layer perception (MLP), then performs attention encoding to generate lane prediction probability distribution. In order to reduce the amount of calculation, a proxy attention module is designed, and a deep separable convolution (DWC) is used in the subsequent process to restore the diversity problem faced by the attention. After attention processing, the model can pay more attention to the features related to the target in the feature map, and input the result into the feedforward network FFN to output the decoded feature vector.
[0081] Further, as shown in Figure 6As shown, the agent attention module is introduced in the traditional attention triplet (Query, Key, Value). In agent attention, the similarity between Query and Key is not directly calculated, but a small number of agent vectors Agent are used to collect information in Key and Value, and then presented to Query, to realize the modeling of global information with low computational cost. Agent vector Agent acts as the agent of Query, aggregates information from Key and Value, and then broadcasts the information back to Query. Agent can be used in a smaller number, and the original attention operation can be equivalent to a generalized linear attention, so that the overall computational complexity is close to linear, thus being able to realize the modeling of global information with low computational cost. The process can be represented as:
[0082]
[0083] Where Q, K, V, A represent Query, Key, Value, Agent vector respectively, Softmax is a normalized exponential function, and d is the length of the attention head.
[0084] S5: training the model to obtain a final detection model.
[0085] Further, in step 5, the model is trained to obtain a final detection model. In order to ensure the alignment between the output of the model and the ground truth, solve the problems of label imbalance, positive and negative sample selection, background noise interference, etc., the SimOTA dynamic matching strategy is used when the model is trained. In the training process, each ground truth lane is dynamically assigned one or more predicted lanes as a positive sample. In particular, the predicted lanes are sorted according to the assignment cost, which is defined as:
[0086] C assign =w sim C sim +w cls C cls
[0087] C sim =(C dis .C xy .C theta ) 2
[0088] Where C cls is the focus cost between the prediction and the label, C sim is the similarity cost between the predicted lane and the true lane, C dis represents the average pixel distance of all valid lane points, C xy represents the distance of the starting point coordinates, and Ctheta The difference value of theta angle, which are all normalized to [0, 1]. w sim and w cls is the weight coefficient of each defined component. Each ground truth lane is assigned a dynamic number (top-k) of predicted lanes, enabling the model to effectively select the most relevant lane points and ensuring more accurate model output. assign
[0089] Embodiment 2
[0090] Referring to Table 1, for an embodiment of the present application, a lane line recognition positioning method based on mixed attention feature enhancement is provided. The experiments of the present application are carried out on a python3.8, pytorch1.12 experimental platform. The server Ubuntu version is 20.04.4. The GPU uses NVIDIA GeForce RTX 3090 (24G). The data set used is the CULane data set. The floating point operations per second (GFlops) is used as an index to measure the complexity of the algorithm. The F1 score can be regarded as a weighted average of model accuracy and recall rate. Therefore, the F1 score is used as an index to measure the accuracy of the model. The calculation method is as follows:
[0091]
[0092] Wherein, precision represents the precision rate, which refers to the proportion of samples with a predicted value of 1 and a true value of 1 in all samples with a predicted value of 1; recall represents the recall rate, which refers to the proportion of samples with a predicted value of 1 and a true value of 1 in all samples with a true value of 1. In order to verify its beneficial effect, the comparative results of three schemes are provided.
[0093] Table 1 comparison table
[0094] Classic SCNN algorithm LineCNN algorithm The present solution F1 score 71.60% 76.68% 80.47% Lane lines with large curvature Detection difficult Detection difficult Good detection GFlops 328.4 92.14 53.6
[0095] As can be seen from Table 1, the results of lane line identification and positioning of the present application are more accurate, the feature information of the to-be-detected object is obtained through a convolutional neural network, the feature information is processed based on a feature fusion network to obtain a fused feature map, a calibration optimization module is designed to enhance the expression of the feature information, the processed feature information is input into an optimized decoder for decoding, and the final detection model is obtained by training the model. By effectively combining low-level features and high-level semantic features, the present scheme can maintain fine structure information while suppressing noise interference, thereby improving the target identification and positioning accuracy in complex environments (such as lane line identification and positioning in areas with large curvature). In addition, the present scheme optimizes multiple key operations in the model architecture, thereby significantly reducing the computational complexity and reducing the consumption of required computing resources. These improvements not only improve the processing efficiency of the model, but also ensure that efficient real-time inference can be achieved in resource-limited practical applications.
[0096] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application, and they should be covered in the scope of the claims of the present application.
Claims
1. A lane line recognition positioning method based on mixed attention feature enhancement, characterized in that, The method comprises the following steps: Step 1: extracting feature information of the object to be detected through a convolutional neural network; Step 2: obtaining a fused feature map by processing the feature information based on a feature fusion network; Step 3: Design a calibration optimization module to enhance feature information expression, input feature map X = [H, W, C], where H is the height of the feature map, W is the width of the feature map, and C is the number of channels of the feature map. Use ROIAlign to get the ROI feature X of the lane prior of the feature map X l To collect the nearby features of each target pixel, use a dynamic feature fusion module DCS based on hybrid attention to further extract lane prior features Xp, and then combine them with the global feature map X f Perform attention operation to get vector x, where the global feature map X f is the feature map obtained after adjusting the size of the feature map X and then flattening it, and the process of the final attention operation is represented as: Wherein, C is the length of the attention head, that is, the channel number of the feature map, and Softmax is a normalized exponential function; The DCS module is constructed based on large-core convolution and hybrid attention; Step 4: decoding the processed feature information in an optimized decoder; Step 5: training the model to obtain a final detection model.
2. The lane line recognition and positioning method based on mixed attention feature enhancement according to claim 1, characterized in that: In step 1, the feature information of the object to be detected is extracted through a convolutional neural network, that is, ResNet is used as the backbone of the algorithm model. The object to be detected is first extracted by the initial convolutional layer to obtain low-level features, and then more complex features are gradually extracted through multiple residual blocks. Each residual block includes a convolutional layer and a skip connection, which directly adds the input and the output of the convolutional layer to ensure that the information is not lost in the multi-layer network.
3. The lane line recognition and positioning method based on mixed attention feature enhancement according to claim 1, characterized in that: In step 2, the feature information is processed based on the feature fusion network to obtain a fused feature map. FPN (Feature Pyramid Network) network is used as the feature fusion module to process multi-scale information and perform efficient fusion. After the feature information is extracted by convolution at the bottom of the FPN network, multiple scale feature maps are generated. The FPN network performs feature fusion through a top-down path. In this process, the higher layer feature map is fused with the lower layer feature map through upsampling, so that the low-level detail information and high-level semantic information can be combined.
4. The lane line recognition and positioning method based on mixed attention feature enhancement according to claim 1, wherein: The DCS module further extracts lane prior feature X P The feature information of the lane line is refined, and the ROI feature X of the lane prior l After two different large kernel depth convolutions respectively generate feature maps, the feature maps are spliced to generate a feature map The process is represented as: where DWConv(X l ) denotes a depthwise separable convolution operation on feature X l , and then a Concat operation on the two features to obtain the feature map When processing using the mixed attention, since the mixed attention is designed based on the channel attention and the spatial attention, the input feature map After the network preliminarily extracts the features, the channel attention mechanism is first used to process, utilize the inter-channel relationship of the features, and generate a channel attention map The process is represented as: wherein represents performing average pooling on the feature represents performing max pooling on the feature , and then processing the two features through an MLP and a sigmoid function (σ) as channel weight coefficients, and finally multiplying with the feature to obtain the channel attention map Utilizing spatial attention mechanism on channel attention map The spatial relationship between features is obtained by processing to generate a spatial attention map The process is represented as: Pay attention to the channel diagram After performing average pooling and max pooling operations, a 7×7 convolutional layer (f) is used. 7×7 The process involves performing operations, followed by processing with the Sigmoid function to generate spatial weight coefficients, which are then compared with the channel attention diagram. The spatial attention diagram is obtained after multiplication. The feature attention map is input into different branches to generate dynamic selection values w1 and w2. The process is represented as: In one of the two branches, a 7x7 convolution and a Sigmoid function are used to process the linearly processed feature to generate the coefficient w1. In the other branch, only the feature is input into the Linear layer for linear processing to generate the coefficient w2. The obtained dynamic selection values w1, w2 are used to calibrate the features, and the operation of multiplying the features from different large kernel depth convolutions is performed before the operation of residual connection to obtain calibrated and optimized lane prior features X P The process is represented as:
5. The lane line recognition and positioning method based on hybrid attention feature enhancement according to claim 1, characterized in that: The step 4 inputs the processed feature information into the optimized decoder for decoding, in order to decode the encoded feature information into more complex and easy-to-understand output. When the model constructs the Transformer Decoder to process the feature map, the feature map is first generated by corresponding position encoding. Through the weight matrix W Q and W K,V Generate Query vector, Key vector and Value vector, where Key vector and Value vector share the same representation, Query vector generates lane attribute prediction based on multi-layer perception (MLP), then generates lane prediction probability distribution through attention encoding. In order to reduce the amount of calculation, therefore, the proxy attention module is designed, and the diversity problem faced by the attention is recovered by using deep separable convolution (DWC) in the subsequent process. After attention processing, the model pays more attention to the features related to the target in the feature map. Input the result into the feedforward network FFN, and output the decoded feature vector.
6. The lane line recognition and positioning method based on hybrid attention feature enhancement according to claim 1, wherein: In step 5, the model is trained to obtain a final detection model. SimOTA dynamic matching strategy is used for model training. In the training process, each ground truth lane is dynamically assigned one or more predicted lanes as positive samples. The predicted lanes are sorted according to the assignment cost, which is defined as: C assign = w sim C sim + w cls C cls C sim = (C dis .C xy .C theta ) 2 Where C cls It is the focus cost between prediction and labeling, C sim It is the cost of predicting the similarity between the lane and the actual lane, C dis C represents the average pixel distance of all valid lane points. xy C represents the distance from the starting point coordinates. theta The values representing the differences in theta angles are all normalized to [0,1]. sim and w cls These are the weighting coefficients for each defined component, and each ground-based lane is weighted according to C. assign The model is assigned a dynamic number of top-k predicted lanes, enabling it to effectively select the most relevant lane points and ensuring more accurate model output.
Citation Information
Patent Citations
Visual lane line detection system and method based on scene prior
CN115439817A
Deep learning-based lane line detection method and model
CN118366129A
Cited By
AEB triggering method for reducing false triggering in curve scene
CN121912925A
AEB triggering method for reducing false triggering in a curve scenario
CN121912925B