A lane detection method based on row embedding clustering and feature cross fusion

By introducing embedded clustering and feature cross-fusion modules into the line detection method, the problem of limited number of lane line detection and insufficient accuracy is solved, efficient lane line detection in complex scenes is achieved, and the accuracy and accuracy of detection are improved. robustness.

CN118609081BActive Publication Date: 2024-10-18泉州职业技术大学
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411077619.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-10-18
Estimated Expiration
2044-08-07

AI Technical Summary

Technical Problem

Existing lane line detection methods based on deep learning are difficult to meet the requirements of autonomous driving systems for lane line detection when faced with multiple road scenes and complex road scenes such as extreme lighting and severe occlusion, and traditional lane detection methods have problems with lane line detection. Problems with limited quantity and insufficient accuracy.

Method used

A lane line detection method based on row embedding clustering and feature cross fusion is adopted. By designing the embedded clustering module and auxiliary segmentation branch based on the row detection method, combined with the feature cross fusion module, mutual guidance and enhancement of cross-layer features are achieved. It supplements the information loss caused by gridding of row detection and improves the accuracy and robustness of detection.

Benefits of technology

It realizes the detection of any number of lane lines in multi-lane scenes and complex scenes, improves the accuracy and robustness of lane line detection, and enables accurate detection of lane lines in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118609081B_ABST
    Figure CN118609081B_ABST
Patent Text Reader

Abstract

The present invention discloses a lane line detection method based on row embedding clustering and feature cross fusion, which is applied to the field of data processing technology, and mainly solves the problem of low lane line detection accuracy in multi-lane scenes and complex road scenes of existing lane line detection technology. Its implementation plan is: 1) obtain data sets and detection labels; 2) construct a lane line detection model; 3) construct a loss function; 4) train the lane line detection model; 5) obtain lane line detection results. The lane line detection model constructed by the present invention solves the problem of limited number of lane line detection in traditional row detection methods by combining the embedding clustering strategy, realizes efficient fusion of cross-layer features through the feature cross fusion module, and introduces auxiliary segmentation branches to supplement the detailed information lost due to row detection gridding, thereby improving the lane line detection accuracy in complex scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer vision technology, and in particular relates to a lane line detection method based on row embedding clustering and feature cross fusion. Background Art

[0002] Lane line perception detection is an important research direction in the field of autonomous driving. It plays an important role in constraining the vehicle's driving range and ensuring vehicle driving safety. In the current autonomous driving system, lane line detection is mainly achieved through computer vision technology. Traditional lane line detection technology based on computer vision mainly relies on artificial prior information to design model structure and parameters, such as edge detection and color segmentation. These methods are easily affected by lighting and road conditions in complex road environments, which limits their robustness and accuracy in complex road environments. Therefore, these traditional methods are gradually replaced by deep learning-based methods. Deep neural networks can autonomously learn and adapt to various road scenes, thereby achieving accurate recognition and positioning of lane lines. However, the existing lane line detection methods based on deep learning still have limitations when facing complex road scenes such as multi-road scenes, extreme lighting, and severe occlusion, and it is difficult to meet the requirements of autonomous driving systems for lane line detection in complex scenes. Summary of the invention

[0003] The present invention fully considers the shortcomings of the existing methods, and aims to provide a lane line detection method based on row embedding clustering and feature cross-fusion. By combining the embedding clustering strategy on the basis of row detection, lane line detection for multi-road scenes is realized; through the feature cross-fusion module, mutual guidance and enhancement between cross-layer features are realized, and the information loss caused by row detection gridding is supplemented by the auxiliary segmentation branch, thereby improving the accuracy and robustness of lane line detection in complex environments.

[0004] 1. Technical Principle

[0005] At present, lane line detection algorithms based on line detection mostly use BoneNet, Neck, and Header to complete the detection of lane lines in images. The lane line detection algorithm extracts features from the input image through BoneNet, and realizes multi-scale feature fusion by the Neck structure. Finally, the Header completes lane line detection based on the multi-classification instance discrimination strategy. In the application of autonomous driving technology, accurate detection of lane lines in multi-lane scenes and complex road scenes is currently the two major difficulties. The traditional line detection method has the problem of limited number of lane line detections, and it is difficult to achieve accurate detection of lane lines in complex scenes. In order to realize the detection of any number of lane lines, the present invention designs an embedded clustering module based on the line detection method. Through feature embedding and unsupervised clustering, the problem of limited number of lane line detections caused by multi-classification instance discrimination strategy in the line detection method is solved. In view of the difficulty of lane line detection in complex scenes, the present invention designs an auxiliary segmentation branch and a feature cross fusion module (FCM). The auxiliary segmentation branch adds a semantic segmentation branch in the network to supplement the detailed information lost due to the gridding of line detection. The feature cross-fusion module FCM, as a part of Neck, guides and enhances cross-layer features by utilizing the different characteristics between high-level and low-level features, thereby achieving more efficient cross-layer feature fusion and improving lane line detection accuracy in complex scenarios.

[0006] 2. According to the above principle, the present invention is implemented by the following scheme:

[0007] A lane line detection method based on line embedding clustering and feature cross fusion includes the following steps:

[0008] (1) Obtaining datasets and detection labels:

[0009] Get the lane line dataset and corresponding detection labels;

[0010] (2) Constructing a lane detection model: The model consists of a backbone network BoneNet, a neck network Neck, an auxiliary segmentation branch, a detection head Header, and unsupervised clustering post-processing. The specific construction process includes the following steps:

[0011] (2-a) Construct the backbone network BoneNet: ResNet-18 is used as the backbone network. The input image is processed by the backbone network to obtain four feature maps with decreasing scales. , , and ;

[0012] (2-b) Construct the neck network Neck: The network consists of four convolutional modules and three feature cross-fusion modules FCM, where each convolutional module consists of two convolutional layers and a Relu activation function; the feature map obtained in step (2-a) is , and As the input of four convolution modules, we get , , and ;Will and Input them together into the first feature cross fusion module FCM1 to get the output result ;Will and Input them together into the second feature cross fusion module FCM2 to get the output result ;Will and The three features are input together into the third feature cross fusion module FCM3 to obtain the output result of the neck network Neck. ;

[0013] The feature cross-fusion module FCM is constructed as follows:

[0014] The input of the feature cross fusion module FCM includes a shallow feature map and a deep feature map ; Deep feature map After linear interpolation, we get the same feature map as the shallow layer. Feature maps of the same size ;Will and After 3×3 convolution processing, the results are multiplied pixel by pixel to obtain the intermediate features , then After performing 3×3 convolution operations and Sigmod activation function processing in sequence, the weight feature map is obtained. ;Will and By multiplying pixel by pixel, we get the shallow feature output result ; For shallow feature maps After two 1×1 convolutions and then Relu activation function processing, the detail feature map is obtained. ;Will and After splicing, it is processed by 1×1 convolution to obtain the deep feature output result ;Will and Add pixel by pixel to get the output of feature cross fusion module FCM .

[0015] (2-c) Construct an auxiliary segmentation branch: This branch consists of a feature pyramid module FPN and a convolution module; the feature map obtained in step (2-a) , and Input the feature pyramid module FPN together to obtain a multi-scale feature map ;Will After processing by the convolution module, the segmentation feature map is obtained ; The convolution module consists of two convolutional layers and a Relu activation function.

[0016] (2-d) Construct the detection head: The detection head consists of three parallel convolution modules. The three convolution modules have the same structure. Each convolution module consists of two convolution layers and a Relu activation function. After being processed by each convolution module, the confidence feature map is obtained , offset feature map and embedding feature map ;

[0017] (2-e) Unsupervised clustering post-processing: The , and Obtain a list of points on the lane line through unsupervised clustering L list , and then the lane line detection result is obtained through polynomial fitting;

[0018] (3) Construct loss function:

[0019] Construct the following hybrid loss function :

[0020]

[0021] in is the row embedding clustering loss function, is the segmentation loss function;

[0022] The specific construction process includes the following steps:

[0023] (3-a) Constructing row embedding clustering loss function :

[0024]

[0025] in is the confidence loss, which represents the loss between the confidence prediction result and the confidence label; is the offset loss, which represents the loss between the offset prediction result and the offset label; is the embedding loss, which represents the loss between the embedding prediction result and the embedding label;

[0026] Confidence loss The build is as follows:

[0027]

[0028] in Represents the confidence feature map On point The value at Indicates the confidence level of the label point The value at Indicates the height of the confidence feature map, Indicates the width of the confidence feature map; α and β represents an adjustable hyperparameter; It means taking the natural logarithm;

[0029] Offset loss The build is as follows:

[0030]

[0031] in Represents the offset feature map On point The value at Indicates the point on the offset label The value at Indicates taking the absolute value;

[0032] Embedding Loss The build is as follows:

[0033]

[0034] in is the variance loss, is the distance loss, which are defined as:

[0035]

[0036]

[0037] in Indicates the total number of lane lines, Indicates The total number of points on the lane line, Indicates that each point on the lane line is embedded in the feature map The corresponding vector representation in is, represents the L2 norm, and Represent different lane lines. and Represent the variance threshold and distance threshold respectively, , , and Respectively represent , and The average vector representation of all points on the lane line;

[0038] (3-b) Constructing segmentation loss function :

[0039]

[0040] in Represents the points on the segmentation feature map The value at Indicates the point on the split label The value at Indicates the height of the confidence feature map, Indicates the width of the confidence feature map; α and β represents an adjustable hyperparameter; It means taking the natural logarithm;

[0041] (4) Training lane detection model:

[0042] Use the data set obtained in step (1) to train the lane detection model constructed in step (2); use the hybrid loss function constructed in step (3) Calculate the error between the prediction result output by the model and the label; use the Adam algorithm to update the model parameters during the training process, and use L-2 regularization as a constraint until the loss no longer decreases, and obtain a trained lane line detection model;

[0043] (5) Lane detection:

[0044] After the test image is normalized, it is input into the trained lane line detection model, and the model output result is the final lane line detection result.

[0045] In step (2-e), the unsupervised clustering method preferably uses the K-means algorithm;

[0046] In steps (3-a) and (3-b), α and β 2 and 4 are preferred respectively;

[0047] In step (3-a), and 1 and 5 are preferred respectively;

[0048] Compared with the prior art, the present invention has the following advantages:

[0049] (1) The present invention combines an embedded clustering strategy with a lane detection method, effectively solving the problem of limited number of lane line detections caused by the multi-classification instance discrimination strategy in traditional lane detection methods, and realizes the detection of any number of lane lines in multi-lane scenarios.

[0050] (2) The feature cross-fusion module FCM constructed by the present invention utilizes the common significant parts of cross-layer features through pixel-by-pixel multiplication to make the target part of shallow features more prominent; the detailed information of shallow features is supplemented to deep features through splicing, realizing efficient fusion of cross-layer features, so that the algorithm can also achieve accurate detection of lane lines in complex scenarios.

[0051] (3) The present invention constructs an auxiliary segmentation branch, which introduces a semantic segmentation branch based on the row detection method to supplement the detail information lost due to the gridding of row detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 Flow chart of a lane detection method based on row embedding clustering and feature cross fusion according to an embodiment of the present invention;

[0053] Figure 2 A structural diagram of a lane detection model according to an embodiment of the present invention;

[0054] Figure 3 A structural diagram of a feature cross-fusion module FCM according to an embodiment of the present invention;

[0055] Figure 4 Comparison of the detection results of the lane line detection method according to the embodiment of the present invention and the detection results of other methods. DETAILED DESCRIPTION

[0056] The specific implementation mode of the present invention is described below:

[0057] Example 1

[0058] Figure 1 The flowchart of the lane line detection method based on line embedding clustering and feature cross fusion according to the embodiment of the present invention is shown, and the specific steps are as follows:

[0059] Step 1: Get the dataset and detection labels:

[0060] Get the lane line dataset and corresponding detection labels;

[0061] Step 2: Build a lane detection model: The model consists of the backbone network BoneNet, the neck network Neck, the auxiliary segmentation branch, the detection head Header, and unsupervised clustering post-processing.

[0062] Figure 2 The structure diagram of the lane detection model constructed in the embodiment of the present invention is shown as follows:

[0063] (2-a) Constructing the backbone network BoneNet: ResNet-18 is used as the backbone network. The input image of size 3×288×800 is processed by the backbone network to obtain feature maps of scales 64×72×200, 128×36×100, 256×18×50 and 512×9×25 respectively. , , and ;

[0064] (2-b) Construct the neck network Neck: The network consists of four convolution modules and three feature cross-fusion modules FCM; each convolution module consists of two convolution layers and a Relu activation function; the feature map obtained in step (2-a) is , and As the input of four convolution modules, the processing results with scales of 64×72×200, 64×36×100, 64×18×50 and 64×9×25 are obtained respectively. , , and ;Will and The output is input into the first feature cross fusion module FCM1, and the output is 64×18×50. ;Will and The two are input together into the second feature cross fusion module FCM2 to obtain an output result with a scale of 64×36×100. ;Will and The three features are input together into the third feature cross fusion module FCM3 to obtain an output result with a scale of 64×72×200. ;

[0065] Figure 3 The structure diagram of the feature cross-fusion module FCM of the embodiment of the present invention is shown, and the specific construction is as follows:

[0066] The input of the feature cross fusion module includes a scale of Shallow feature map of With a scale of The deep feature map ; Deep feature map After linear interpolation, we get the same feature map as the shallow layer. The same scale as Feature map ;Will and After 3×3 convolution processing, the results are multiplied pixel by pixel to obtain a scale of The intermediate characteristics , then After performing 3×3 convolution operations and Sigmod activation function processing in sequence, the scale is obtained. The weight feature map ;Will and By performing pixel-by-pixel multiplication, the scale is The shallow feature output result of ; For shallow feature maps After two 1×1 convolutions and then Relu activation function processing, the scale is Detailed feature map ;Will and After splicing, it is processed by 1×1 convolution to obtain a scale of The deep feature output results ;Will and Add pixel by pixel to get the scale The output of the feature cross-fusion module .

[0067] In the first feature cross fusion module FCM1, As the input deep feature map, As the input shallow feature map, is 18, is 50, the module output is ; In the second feature cross fusion module FCM2, As the input deep feature map, As the input shallow feature map, is 36, is 100, the module output is ; In the third feature cross-fusion module FCM3, As the input deep feature map, As the input shallow feature map, is 72, is 200, the module output is .

[0068] (2-c) Construct an auxiliary segmentation branch: This branch consists of a feature pyramid module FPN and a convolution module; the feature map obtained in step (2-a) , and Input the feature pyramid module FPN together to obtain a feature map of scale 64×72×200 ;Will After processing by the convolution module, a segmentation feature map with a scale of 1×72×200 is obtained ; The convolution module consists of two convolutional layers and a Relu activation function.

[0069] (2-d) Construct the detection head: The detection head consists of three parallel convolution modules; the three convolution modules have the same structure, each of which consists of two convolution layers and a Relu activation function; the detection head obtained in step (2-b) After being processed by each convolution module, a confidence feature map with a scale of 1×72×200 is obtained. , the offset feature map with a scale of 1×72×200 , an embedded feature map of size 2×72×200 ;

[0070] (2-e) Unsupervised clustering post-processing: The , and Get a list of points on the lane line through K-means clustering L list , and then the lane line detection result is obtained through polynomial fitting;

[0071] Step 3, construct the loss function:

[0072] Construct the following hybrid loss function :

[0073]

[0074] in is the row embedding clustering loss function, is the segmentation loss function;

[0075] The specific construction process includes the following steps:

[0076] (3-a) Constructing row embedding clustering loss function :

[0077]

[0078] in is the confidence loss, which represents the loss between the confidence prediction result and the confidence label; is the offset loss, which represents the loss between the offset prediction result and the offset label; is the embedding loss, which represents the loss between the embedding prediction result and the embedding label;

[0079] Confidence loss The build is as follows:

[0080]

[0081] in Represents the confidence feature map On point The value at Indicates the confidence level of the label point The value at Indicates the height of the confidence feature map, Indicates the width of the confidence feature map; α and β denotes adjustable hyperparameters, which are set to 2 and 4 respectively; Represents the natural logarithm.

[0082] Offset loss The build is as follows:

[0083]

[0084] in Represents the offset feature map On point The value at Indicates the point on the offset label The value at Indicates taking the absolute value;

[0085] Embedding Loss The build is as follows:

[0086]

[0087] in is the variance loss, is the distance loss, which are defined as:

[0088]

[0089]

[0090] in Indicates the total number of lane lines, Indicates The total number of points on the lane line, Indicates that each point on the lane line is embedded in the feature map The corresponding vector representation in is, represents the L2 norm, and Represent different lane lines. and Represents the variance threshold and distance threshold, which are set to 1 and 5 respectively. , , and Respectively represent , and The average vector representation of all points on the lane line;

[0091] (3-b) Constructing segmentation loss function :

[0092]

[0093] in Represents the points on the segmentation feature map The value at Indicates the point on the split label The value at Indicates the height of the confidence feature map, Indicates the width of the confidence feature map; It means taking the natural logarithm; α and β denotes adjustable hyperparameters, which are set to 2 and 4 respectively;

[0094] Step 4: Train the lane detection model:

[0095] Use the data set obtained in step (1) to train the lane detection model constructed in step (2); use the hybrid loss function constructed in step (3) Calculate the error between the prediction result output by the model and the label; use the Adam algorithm to update the model parameters during the training process, and use L-2 regularization as a constraint until the loss no longer decreases, and obtain a trained lane line detection model;

[0096] Step 5: Lane detection:

[0097] After the test image is normalized, it is input into the trained lane line detection model, and the model output result is the final lane line detection result.

[0098] Example 2

[0099] The lane detection experiment was performed on the Tusimple dataset using the method in Example 1. The experimental operating system was Ubuntu 18.04, the PyTorch 1.2.0 framework based on CUDA 10.0 and cuDNN 7.6.0, and a personal computer equipped with an Intel Core i5-12600KF CPU (3.70 GHz) and NVIDIA GeForce RTX 3090 (24 GB) hardware was used for training and testing.

[0100] This example uses five indicators, namely F1 (F1-Measure), ACC (accuracy), FP (false positive rate), FN (missed positive rate), and FPS (frames per second), to conduct experimental comparisons between six test methods, namely SAD, UFASTv1, UFASTv2, CondLaneNet, BezierLaneNet, and LaneATT, and the method of the present invention on the Tusimple dataset.

[0101] The comparison results are shown in Table 1. It can be found that compared with other methods, the present invention can obtain accurate detection results on the Tusimple dataset and achieve the best results in the evaluation indicators F1, ACC and FN. Please refer to the following for details.

[0102] Table 1

[0103]

[0104] Figure 4 The figure shows the comparison of lane line detection results of the embodiment of the present invention and the detection results of other methods. The results show that the model designed by the present invention can handle various challenging scenes well, including multi-road scenes ( Figure 4 1st and 2nd rows), complex road scenes ( Figure 4 3, 4, and 5). Compared with other methods, the lane detection results obtained by this method are more accurate.

[0105] The above-described embodiments are only preferred embodiments of the present invention and are not intended to limit the scope of implementation of the present invention. Therefore, all changes made based on the structure and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A lane detection method based on row embedding clustering and feature cross fusion, Features The following steps are involved: (1) Obtaining datasets and detection labels: Get the lane line dataset and corresponding detection labels; (2) Constructing a lane detection model: The model consists of a backbone network BoneNet, a neck network Neck, an auxiliary segmentation branch, a detection head Header, and unsupervised clustering post-processing. The specific construction process includes the following steps: (2-a) Construct the backbone network BoneNet: ResNet-18 is used as the backbone network. The input image is processed by the backbone network to obtain four feature maps with decreasing scales. , , and ; (2-b) Construct the neck network Neck: The network consists of four convolution modules and three feature cross-fusion modules FCM; the feature map obtained in step (2-a) , and As the input of four convolution modules, we get , , and ;Will and Input together into the first feature cross fusion module FCM 1 , and get the output result ;Will and Input together to the second feature cross fusion module FCM 2 , and get the output result ;Will and Input together into the third feature cross fusion module FCM 3 , and get the output result of the neck network Neck ; (2-c) Construct an auxiliary segmentation branch: This branch consists of a feature pyramid module FPN and a convolution module; the feature map obtained in step (2-a) , and Input the feature pyramid module FPN together to obtain a multi-scale feature map ;Will After processing by the convolution module, the segmentation feature map is obtained ; (2-d) Construct the detection head: The detection head consists of three parallel convolution modules; After being processed by each convolution module, the confidence feature map is obtained , offset feature map and embedding feature map ; (2-e) Unsupervised clustering post-processing: The , and Obtain a list of points on the lane line through unsupervised clustering L list , and then the lane line detection result is obtained through polynomial fitting; (3) Construct loss function: Construct the following hybrid loss function : in is the row embedding clustering loss function, is the segmentation loss function; The specific construction process includes the following steps: (3-a) Constructing row embedding clustering loss function : in is the confidence loss, which represents the loss between the confidence prediction result and the confidence label; is the offset loss, which represents the loss between the offset prediction result and the offset label; is the embedding loss, which represents the loss between the embedding prediction result and the embedding label; Confidence loss The build is as follows: in Represents the confidence feature map On point The value at Indicates the confidence level of the label point The value at Indicates the height of the confidence feature map, Indicates the width of the confidence feature map; α and β represents an adjustable hyperparameter; It means taking the natural logarithm; Offset loss The build is as follows: in Represents the offset feature map On point The value at Indicates the point on the offset label The value at Indicates taking the absolute value; Embedding Loss The build is as follows: in is the variance loss, is the distance loss, which are defined as: in Indicates the total number of lane lines, Indicates The total number of points on the lane line, Indicates that each point on the lane line is embedded in the feature map The corresponding vector representation in is, represents the L2 norm, and Represent different lane lines. and Represent the variance threshold and distance threshold respectively, , , and Respectively represent , and The average vector representation of all points on the lane line; (3-b) Constructing segmentation loss function : in Represents the segmentation feature map On point The value at Indicates the point on the split label The value at (4) Training lane detection model: Use the data set obtained in step (1) to train the lane detection model constructed in step (2); use the hybrid loss function constructed in step (3) Calculate the error between the prediction result output by the model and the label; use the Adam algorithm to update the model parameters during the training process, and use L-2 regularization as a constraint until the loss no longer decreases, and obtain a trained lane line detection model; (5) Lane detection: After the test image is normalized, it is input into the trained lane line detection model, and the model output result is the final lane line detection result.

2. A lane line detection method based on row embedding clustering and feature cross fusion as claimed in claim 1, It is characterized in that The input of the feature cross fusion module FCM in step (2-b) includes a shallow feature map and a deep feature map ; Deep feature map After linear interpolation, we get the same feature map as the shallow layer. Feature maps of the same size ;Will and After a 3×3 convolution process, the results are multiplied pixel by pixel to obtain the intermediate features. , then After performing 3×3 convolution operations and Sigmod activation function processing in sequence, the weight feature map is obtained. ;Will and By multiplying pixel by pixel, we get the shallow feature output result ; For shallow feature maps After two 1×1 convolutions and then Relu activation function processing, the detail feature map is obtained. ;Will and After splicing, it is processed by 1×1 convolution to obtain the deep feature output result ;Will and Add pixel by pixel to get the output of feature cross fusion module FCM .

3. A lane line detection method based on row embedding clustering and feature cross fusion as claimed in claim 1, It is characterized in that The convolution modules in step (2-b) are composed of two convolution layers and a Relu activation function.

4. The lane line detection method based on row embedding clustering and feature cross fusion as claimed in claim 1, It is characterized in that The convolution module in step (2-c) is composed of two convolution layers and a Relu activation function.

5. A lane line detection method based on row embedding clustering and feature cross fusion as claimed in claim 1, It is characterized in that The convolution modules in the step (2-d) all have the same structure, and each convolution module consists of two convolution layers and a ReLU activation function.

6. A lane line detection method based on row embedding clustering and feature cross fusion as claimed in claim 1, It is characterized in that In the steps (3-a) and (3-b) α , β , , are all positive integers, and α is 2, β is 4, 1. is 5.

Citation Information

Patent Citations

  • Lane line detection method and system based on region of interest

    CN114973172A

  • Digital twinning method and device for traffic road in confluence area

    CN118411517A