Lane line detection method based on improved UFLDv2 model
By improving the UFLDv2 model, combining the coordinated attention mechanism, dynamic snake convolution and new loss function, the calculation complexity and real-time problems of lane line detection in complex scenarios are solved, achieving higher detection accuracy and robustness.
Patent Information
- Application Number
- CN202411509892.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-28
- Publication Date
- 2025-03-07
AI Technical Summary
The existing lane line detection technology has high computational complexity and poor real-time performance in complex road scenarios, making it difficult to meet the high real-time requirements in autonomous driving applications.
The lane line detection method based on the improved UFLDv2 model is adopted, and lane line coherence is optimized by integrating the feature extraction layer of the coordinated attention mechanism, the group classification network of dynamic serpentine convolution and the new existence loss function.
It improves the accuracy and robustness of lane line detection, enhances the model's processing ability for complex scenarios, and meets the high real-time requirements in autonomous driving applications.
Smart Images

Figure CN119580209A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an automatic driving lane detection method, and in particular to a lane line detection method based on an improved UFLDv2 model. Technical Background
[0002] Lane detection is a key part of the autonomous driving system. It uses the camera on the vehicle to identify the lane lines on the road, which is crucial to improving vehicle safety and driving convenience. This technology can help the vehicle stay in the correct lane and reduce traffic accidents caused by lane deviation. At the same time, it provides accurate road information for vehicle navigation and path planning, helping the vehicle make correct driving decisions in complex road environments. Lane detection is also an important part of the vehicle's environmental perception system. It can provide key information such as road boundaries, number of lanes and direction. In addition, it is also the basis of many assisted driving systems, such as lane keeping assist systems, which can improve driving comfort and safety.
[0003] With the development of autonomous driving technology, lane detection technology faces challenges such as complex road conditions, occlusion, illumination changes, and ambiguity. In practical applications, lane detection needs to meet high real-time requirements and run efficiently on limited hardware resources. Therefore, algorithm design needs to find a balance between accuracy and computational efficiency. Due to technological advances, especially with the help of deep learning, the accuracy and robustness of lane detection have been significantly improved. Deep learning methods can automatically learn and extract feature information from images, avoiding the tedious process of manually designing features in traditional methods.
[0004] In recent years, instance segmentation methods have also been gradually introduced into lane detection to detect and segment the lane area. The instance segmentation-based method can treat each lane as an independent instance, and then perform pixel-level recognition and segmentation, thereby achieving fine detection of lanes in complex environments. However, although the instance segmentation method has certain advantages in terms of precision and multi-lane detection, its main problem is high computational complexity and poor real-time performance. Especially in autonomous driving applications, the real-time performance of the algorithm is a key requirement, and the instance segmentation method often requires a lot of computing resources and time for pixel-level segmentation, which makes it difficult to meet scenarios with high real-time requirements.
[0005] In order to solve the computational efficiency problem of instance segmentation in lane detection, the anchor method has gradually been applied to this field. The anchor method was first widely used in target detection. It uses predefined anchor boxes to quickly identify the location of target objects without pixel-by-pixel segmentation. In lane detection, the anchor method sets predefined anchor points or anchor lines in the image to achieve rapid recognition and classification of lane positions. Summary of the invention
[0006] The purpose of this invention is to propose a lane line detection method based on an improved UFLDv2 model to achieve the purpose of lane line detection in complex road scenes and further improve the detection accuracy.
[0007] The technical solution adopted by the present invention is:
[0008] A lane line detection method based on an improved UFLDv2 model, the method comprising the following steps:
[0009] 1. Obtain a lane line dataset, which includes a training set and a test set;
[0010] 2. Preprocessing the lane line data set, wherein the preprocessing includes data enhancement of the lane line image and adjustment of the lane line image resolution;
[0011] 3. Establish an improved UFLDv2 model, which includes a feature extraction layer integrating a coordinated attention mechanism, a group classification network integrating dynamic snake convolution, and a loss function integrating a new existence loss;
[0012] 4. Use the preprocessed training set to train the improved UFLD model, and then input the test set into the trained improved UFLDv2 model to obtain lane line detection results.
[0013] Furthermore, in step S2, the data enhancement of the lane line image includes a small rotation of the lane line image, horizontal and vertical offsets, and random chromaticity adjustment.
[0014] Furthermore, in step S3, the improved UFLDv2 model uses the ResNet-18 network as the backbone network, and the backbone network consists of a 5-layer structure, namely C0, C1, C2, C3, and C4, wherein C0 consists of a convolutional layer and a pooling layer; C1, C2, C3, and C4 are feature extraction layers, and each layer of C1, C2, C3, and C4 consists of two 3×3 residual blocks.
[0015] Further, in step S3, the feature extraction layer structure of the fusion coordinated attention mechanism includes:
[0016] The output of the last 3×3 convolutional layer in the second residual block of layer C2 is used as the input of the coordinate attention mechanism. At this time, the output of the coordinate attention mechanism is used as the input of the first 3×3 convolutional layer in the first residual block of layer C3.
[0017] The output of the last 3×3 convolutional layer in the second residual block of layer C3 is used as the input of the coordinate attention mechanism. At this time, the output of the coordinate attention mechanism is used as the input of the first 3×3 convolutional layer in the first residual block of layer C4.
[0018] The output of the last 3×3 convolutional layer in the second residual block of the C4 layer is used as the input of the coordinate attention mechanism. At this time, the output of the coordinate attention mechanism is connected to the fully connected layer in the classification detection network.
[0019] Furthermore, in step 3, the group classification network structure fused with dynamic snake convolution includes: the snake convolution module first performs convolution processing on the input feature map along the row direction and the column direction respectively to obtain two independent feature maps. The two feature maps are pooled through convolution, and then reshaped to reduce the dimension to 2, and then pass through the batch normalization layer and the fully connected layer, and finally output.
[0020] Further, the step 4 includes the following sub-steps:
[0021] 1. Input the preprocessed training set into the improved UFLDv2 model for training, and extract features of different dimensions by the feature extraction layer of the fusion coordinated attention mechanism;
[0022] 2. Input the extracted feature map into the group classification network fused with dynamic snake convolution, and output the classification prediction result;
[0023] 3. Post-process the classification prediction results and segmentation prediction results, convert the classification prediction results into corresponding category indexes, use the loss function to calculate the gradient of the parameters on the network, and update the parameter values;
[0024] 4. Repeat the above steps until the improved UFLDv2 model converges and save the trained model;
[0025] 5. Use the test set to test the trained network model and finally output the lane line detection result.
[0026] Furthermore, in the sub-step 4, the parameter values are updated using the SGD optimization algorithm.
[0027] Furthermore, the lane line dataset adopts CULane, Tusimple and Curvelane datasets.
[0028] At the same time, according to the above method, the present invention also proposes a lane line detection system based on the improved UFLDv2 model, the system includes an image acquisition device and a processor, the image acquisition device is connected to the processor, wherein the image acquisition device is used to obtain the lane line image and upload it to the processor, the processor is integrated with an algorithm based on the method described in the present invention, and is used to perform lane line detection on the lane line image.
[0029] The technical effects of the present invention are:
[0030] The present invention optimizes the detection of lane boundaries and the continuity of lane lines by combining boundary weights and connectivity loss. Secondly, the innovative application of snake convolution enables the model to process row and column features more flexibly and accurately, especially under the row and column anchor design of UFLDv2, the two work particularly well together. Finally, the introduction of the CA module further enhances the model's ability to capture key features and improves the accuracy and robustness of lane line detection in complex scenes. In summary, the present invention improves the accuracy of the model's lane line detection by improving the model, making the lane line detection model more robust. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a technical solution step;
[0032] Figure 2 It is a diagram of the coordinated attention mechanism structure;
[0033] Figure 3 This is the principle diagram of dynamic snake convolution;
[0034] Figure 4 This is a comparison chart of the group classification network before and after improvement. DETAILED DESCRIPTION
[0035] The following is a further detailed description of the specific implementation of the present invention through the description of the embodiments with reference to the accompanying drawings, with the purpose of helping those skilled in the art to have a more complete, accurate and in-depth understanding of the inventive concept and technical solution of the present invention and to facilitate its implementation. In order to make the technical solution of the present invention clearer, the present invention is explained through the following embodiments:
[0036] A lane line detection method based on an improved UFLDv2 model, the method comprising the following steps:
[0037] 1. Obtain a lane line dataset, which includes a training set and a test set.
[0038] In this embodiment, the lane line datasets CULane, Tusimple and Curvelane datasets are all acceptable.
[0039] The Tusimple dataset is one of the standard datasets widely used in the current field of lane detection. It consists of real driving scenes on highways in the United States. The dataset contains a large number of lane annotation images, which is particularly suitable for training and evaluating lane detection models. Tusimple's annotations are frame-by-frame and provide pixel-level annotations of lanes. It has clear lane boundaries and relatively uniform road conditions. The scenes are mainly concentrated on sunny and spacious highways, so lighting and weather conditions have little interference with the model. In general, the Tusimple dataset provides researchers with a relatively ideal experimental environment to test the performance of the model in standard scenarios.
[0040] The Culane dataset is a large lane detection dataset released by the Chinese University of Hong Kong. Compared with Tusimple, it covers more complex and diverse driving environments. The Culane dataset covers scenes of urban roads, rural roads, and traffic congestion, including a variety of weather conditions (such as sunny days, cloudy days, rainy days, nights, etc.) and different types of lane lines (broken lines, overlapping lines, etc.), which puts higher requirements on the robustness of the model. In terms of annotation, Culane provides frame-by-frame video sequences and annotates all visible lane lines in each frame, which enables researchers to test the generalization ability of the model under complex conditions.
[0041] The Curvelane dataset is built to address the challenges of lane line detection on curved roads. It focuses on those complex curved road sections, which have always been a difficult problem in lane detection. The Curvelane dataset contains a large number of curved road scenes, including complex lane line forms such as sharp turns and continuous curves. This dataset requires the model to not only accurately predict lane lines on straight roads, but also maintain good detection performance in curves, thus providing rich experimental data for studying lane line detection on curved roads.
[0042] 2. Preprocess the lane line data set, wherein the preprocessing includes data enhancement of the lane line image and adjustment of the lane line image resolution.
[0043] In this embodiment, the data enhancement of the data set includes a small rotation of the lane line image, horizontal and vertical offsets, and random chromaticity adjustment, so that the model can adapt to the same image under different lighting conditions, greatly reducing the impact of lighting on lane line detection, and overall improving the robustness and generalization ability of the model detection in different scenarios. After data enhancement, the lane line image resolution is adjusted, and the images of Tusimple, CULane, and Curvelane are adjusted to 800×320, 1600×320, and 1600×800, respectively.
[0044] 3. Establish an improved UFLDv2 model, which includes a feature extraction layer integrating a coordinated attention mechanism, a group classification network integrating a dynamic snake convolution, and a loss function integrating a new existence loss.
[0045] The UFLDv2 model is a lane detection model commonly used in the prior art. The UFLDv2 model includes a backbone network and a group classification network, wherein the backbone network usually uses a ResNet-18 network. The backbone network consists of a 5-layer structure, namely C0, C1, C2, C3, and C4, wherein C0 consists of a convolutional layer and a pooling layer; C1, C2, C3, and C4 are feature extraction layers, and each layer of C1, C2, C3, and C4 consists of two 3×3 residual blocks, and the number of residual blocks in each layer is 2, 2, 2, and 2, respectively. Although the high-level features of the UFLD model are semantically rich, they lack location information. Therefore, in this embodiment, the improved UFLDv2 model also uses the ResNet-18 network as the backbone network. However, in order to overcome the shortcoming of the traditional UFLD model that lacks position information, the present invention integrates the coordinate attention mechanism in the C2~C4 layers, and embeds the position information into the channel attention, so that the model can obtain more feature information in the feature extraction process. For scenes without visual clues, it can pay attention to specific coordinates in the image, helping the model to better focus on areas where lane lines may exist, thereby improving the accuracy and robustness of detection.
[0046] Specifically, the feature extraction layer structure of the present invention integrating the coordinate attention mechanism includes: the output of the last 3×3 convolutional layer in the second residual block of the C2 layer is used as the input of the coordinate attention mechanism, and the output of the coordinate attention mechanism is used as the input of the first 3×3 convolutional layer in the first residual block of the C3 layer; the output of the last 3×3 convolutional layer in the second residual block of the C3 layer is used as the input of the coordinate attention mechanism, and the output of the coordinate attention mechanism is used as the input of the first 3×3 convolutional layer in the first residual block of the C4 layer; the output of the last 3×3 convolutional layer in the second residual block of the C4 layer is used as the input of the coordinate attention mechanism, and the output of the coordinate attention mechanism is connected to the fully connected layer in the classification detection network.
[0047] The core idea of the CA module is to combine spatial and channel attention to enhance feature representation by embedding position information. The CA module enhances the perception of feature maps by combining spatial and channel attention. Its core lies in introducing coordinate information into channel attention, so that the model can capture long-range dependencies in space. In this process, the CA module performs one-dimensional global pooling on the input feature map in both horizontal and vertical directions to generate direction-aware features. Its network structure is as follows: Figure 1 .
[0048] Given an input feature map X∈RC×H×W , where C is the number of channels, H is the height of the feature map, and W is the width. First, global pooling is performed in the horizontal and vertical directions respectively, and the formula is as follows:
[0049]
[0050] HereX h ∈R C×H×1 and X w ∈R C×1×W Represent the pooling results along the horizontal and vertical directions respectively. This step retains the spatial location information, allowing the model to capture global features along both directions.
[0051] Next, the CA module performs convolution operations on the two direction-aware feature maps to generate attention maps. The results of the convolution operation are A h ∈R C / r×H×1 and A w ∈R C / r×1×W , where r is the scaling factor. After that, the final attention map A′ is generated through nonlinear activation functions (such as ReLU) and channel-by-channel weighting. h and A′ w .
[0052] The combined process of channel and spatial attention can be expressed as:
[0053] O=X×σ(A h '·A w ')(3)
[0054] Among them, σ is the sigmoid activation function, and · represents element-wise multiplication. The final generated attention map is multiplied with the original input feature map to enhance the feature expression of the key area.
[0055] Compared with the traditional SE module or ECA, the CA module can handle spatial and channel dependencies at the same time, which is particularly important in lane detection tasks. Road scenes usually involve complex geometric structures and diverse lighting conditions, and the CA module captures the global position information and local details of lanes through direction-aware features, significantly improving the model's sensitivity to lane edges and positions. In addition, the lightweight design of the CA module hardly increases the computational burden, which is particularly suitable for real-time tasks such as UFLDv2.
[0056] The core of snake convolution is to change the sliding mode of the convolution kernel. Unlike traditional convolution, which slides pixel by pixel from left to right and from top to bottom, snake convolution simulates the process of a "snake" moving in the image, covering the image through a curved path. This convolution method can better adapt to the shape of lane lines, especially when the lane lines are curved or irregular.
[0057] Snake convolution can be divided into two parts: row-wise convolution and column-wise convolution. In the row direction, the convolution kernel slides along the row direction of the image in a snake-like manner to capture horizontal features; in the column direction, the convolution kernel slides along the column direction in a similar manner to capture vertical features. Its network architecture is as follows: Figure 2 shown.
[0058] Assume that the input feature map is X and the convolution kernel is W. In the snake convolution, the path of the convolution operation is not a fixed rectangular grid, but is deformed along a specific direction (such as row or column). Let P(i, j) be the snake path function. The snake convolution can be expressed as:
[0059]
[0060] Among them, P(i,j) represents the sliding order of the convolution kernel on different paths.
[0061] In UFLDv2, we have improved the use of snake convolution. The traditional snake convolution output will merge the features in the row and column directions through an encoder, but we innovatively process these two parts of features independently. Specifically, we retain the convolution results in the row and column directions separately, and continue to extract features in a row and column independent manner in the subsequent network. This design not only avoids interference between row and column features, but also reduces the mixing and loss of information, and is also consistent with the setting of row and column anchors in UFLDv2. Figure 3 It can be seen that the difference between the group classification network structure before and after improvement.
[0062] The model uses an innovative loss function design to improve the accuracy of lane detection and the robustness of the model. Specifically, it includes two core parts: boundary weight loss and connectivity loss, which are used to improve the sensitivity to lane boundaries and ensure the continuity of lane lines, respectively.
[0063] The boundary weight loss aims to make the model pay more attention to the edge area of the lane line during training through a weighted approach. We adopt a dynamic boundary weight strategy, that is, adjusting the weight according to the difference between the first-order and second-order neighborhoods of the lane line edge, so that the model can more sensitively capture boundary changes. Under this mechanism, the edge area of the lane line will receive a higher weight, while the non-edge area will receive a lower weight, thereby effectively reducing the impact of edge blur.
[0064] The specific form of the loss is as follows:
[0065]
[0066] Among them, w i,j is the weight at pixel (i, j), which is dynamically adjusted as the gradient at that position changes; fi,j and i,j are the lane line probability predicted by the model and the true annotation, and l is the conventional cross entropy loss function.
[0067] Through this weighted mechanism, the model can have a stronger perception of the boundary areas of lane lines in complex environments, effectively reduce detection errors, and improve the accuracy of boundary recognition.
[0068] In order to ensure the overall coherence of the lane lines, we introduced the connectivity loss, which aims to reduce the appearance of discontinuous lane lines by constraining the prediction results of adjacent pixels. Specifically, the connectivity loss compares the prediction categories of adjacent pixels to ensure that the prediction results of adjacent points on the same lane line are continuous, thereby effectively avoiding the phenomenon of broken lane lines.
[0069] The expression of connectivity loss is:
[0070]
[0071] Among them, N represents all adjacent pixel pairs, and l is still the cross entropy loss function, which is used to calculate the category consistency of adjacent pixels.
[0072] Through this design, the model can maintain the global consistency of lane lines when processing lane line detection and reduce lane line interruptions caused by complex scenarios such as occlusion and lighting changes.
[0073] The boundary weight loss and connectivity loss are combined to form a multi-objective optimization existence loss function, which is specifically expressed as follows:
[0074] L ext =α·L boundary +β·L connectivity (7)
[0075] Among them, α and β are two hyperparameters used to balance the importance of boundary weight loss and connectivity loss. By adjusting these two parameters, the model can perform better detection effects in different scenarios.
[0076] This design combining boundary weight and connectivity loss can not only improve the model's ability to recognize lane edges, but also ensure the overall coherence of lanes. Compared with the traditional cross entropy loss, this innovative loss function shows better detection accuracy and robustness in complex road scenes, especially when dealing with occlusion, noise and extreme lighting conditions, which can effectively reduce the risk of error accumulation.
[0077] Then the overall loss function of the model is:
[0078] L=L cls +k1Lexp +k2L ext (8)
[0079] Among them, L cls and L exp are the classification loss function and expected loss function of the original model, which remain unchanged here. k1 and k2 are loss coefficients used to balance the contribution of different parts of the loss.
[0080] Through this loss function design, UFLDv2 demonstrates outstanding performance in lane line detection tasks in complex scenarios, achieving higher detection accuracy and more stable generalization ability.
[0081] 4. Use the preprocessed training set to train the improved UFLDv2 model, and then input the test set into the trained improved UFLDv2 model to obtain lane line detection results. Specifically, step 4 includes the following sub-steps:
[0082] 1) Input the preprocessed training set into the improved UFLDv2 model for training, and extract features of different dimensions by the feature extraction layer of the fusion coordinate attention mechanism.
[0083] 2) Input the extracted feature map into the group classification detection network improved by dynamic snake convolution for processing, and output the classification prediction result. The classification detection network of this embodiment is composed of row and column classification networks, which can classify the extracted row and column feature maps separately. For each lane line, each row of the image is regarded as a classification problem through the fully connected layer, and the probability of each position belonging to the lane line is generated, and finally the classification prediction result is output.
[0084] 3) Post-process the classification prediction results and segmentation prediction results, convert the classification prediction results and segmentation prediction results into corresponding category indexes, and use the improved loss function L = L cls +k1L exp +k2L ext The gradients of the parameters on the network are calculated and the parameter values are updated using the Stochastic Gradient Descent (SGD) optimization algorithm.
[0085] 4) Repeat the above steps until the improved UFLDv2 model converges and save the trained model;
[0086] 5) Use the test set to test the trained network model and finally output the lane line detection result. At the same time, the evaluation index of the test result can be calculated, and the trained model can be used for model reasoning to demonstrate the application effect of the model in actual traffic scenarios. Even if the lane line is blocked by a vehicle, it can be detected accurately in real time, and the detection result almost coincides with the actual lane line, with high detection accuracy.
[0087] At the same time, according to the above method, the present invention also proposes a lane line detection system based on the improved UFLDv2 model, the system includes an image acquisition device and a processor, the image acquisition device is connected to the processor, wherein the image acquisition device is used to obtain the lane line image and upload it to the processor, the processor is integrated with an algorithm based on the method described in the present invention, and is used to perform lane line detection on the lane line image.
[0088] The technical effect of the present invention is as follows: the present invention optimizes the detection of lane boundaries and the continuity of lane lines by combining boundary weights and connectivity loss. Secondly, the innovative application of snake convolution enables the model to process row and column features more flexibly and accurately, especially under the row and column anchor design of UFLDv2, the two work particularly well together. Finally, the introduction of the CA module further enhances the model's ability to capture key features, and improves the accuracy and robustness of lane line detection in complex scenes. In summary, the present invention improves the accuracy of the model's lane line detection by improving the model, making the lane line detection model more robust.
[0089] The present invention is described above by way of example in conjunction with the accompanying drawings. Obviously, the specific implementation of the present invention is not limited to the above-mentioned methods. As long as various non-substantial improvements are made using the method concept and technical solution of the present invention; or the above concept and technical solution of the present invention are directly applied to other occasions without improvement, they are all within the protection scope of the present invention.
Claims
1. A lane detection method based on an improved UFLDv2 model, characterized in that: The method combines dynamic snake convolution with the row-column design of the group classification network, adopts a backbone network fused with a coordinated attention mechanism, and uses an improved existence loss function; and includes the following steps: 1) Obtain a lane line dataset, which includes a training set and a test set; 2) Preprocessing the lane line dataset, including data enhancement of lane line images and adjustment of lane line image resolution; 3) Establish an improved UFLDv2 model, which includes a feature extraction layer integrating a coordinated attention mechanism, a group classification network integrating dynamic snake convolution, and a loss function integrating a new existence loss; 4) The improved UFLDv2 model is trained using the preprocessed training set, and then the test set is input into the trained improved UFLDv2 model to obtain lane line detection results.
2. The lane line detection method based on the improved UFLDv2 model according to claim 1, characterized in that: In step 2, the data enhancement of the lane line image includes a small rotation of the lane line image, horizontal and vertical offsets, and random chromaticity adjustment.
3. The lane line detection method based on the improved UFLDv2 model according to claim 1, characterized in that: In step S3, the improved UFLDv2 model uses the ResNet-18 network as the backbone network, and the backbone network consists of a 5-layer structure, namely C0, C1, C2, C3, and C4, wherein C0 consists of a convolutional layer and a pooling layer; C1, C2, C3, and C4 are feature extraction layers, and each layer of C1, C2, C3, and C4 consists of two 3×3 residual blocks.
4. The lane line detection method based on the improved UFLDv2 model according to claim 3 is characterized in that: In step 3, the feature extraction layer structure of the fusion coordinate attention mechanism includes: The output of the last 3×3 convolutional layer in the second residual block of layer C2 is used as the input of the coordinate attention mechanism. At this time, the output of the coordinate attention mechanism is used as the input of the first 3×3 convolutional layer in the first residual block of layer C3. The output of the last 3×3 convolutional layer in the second residual block of layer C3 is used as the input of the coordinate attention mechanism. At this time, the output of the coordinate attention mechanism is used as the input of the first 3×3 convolutional layer in the first residual block of layer C4. The output of the last 3×3 convolutional layer in the second residual block of the C4 layer is used as the input of the coordinate attention mechanism. At this time, the output of the coordinate attention mechanism is connected to the fully connected layer in the classification detection network.
5. The lane line detection method based on the improved UFLDv2 model according to claim 1, characterized in that: In step 3, the group classification network structure integrating dynamic snake convolution includes: the snake convolution module first performs convolution processing on the input feature map along the row direction and the column direction respectively to obtain two independent feature maps. The two feature maps are pooled through convolution, and then reshaped to reduce the dimension to 2, and then pass through the batch normalization layer and the fully connected layer, and finally output.
6. The lane line detection method based on the improved UFLDv2 model according to claim 1, characterized in that: In step 3, the loss function integrating the new existence loss is as follows: L=L cls +k1L exp +k2L ext (1) Among them, L cls and L exp is the classification loss function and expected loss function of the original model, which remain unchanged here, k1 and k2 are loss coefficients, where L ext That is, the new existence loss function, whose formula is as follows: L ext =α·L boundary +β·L connectivity (2) L connectivity =∑ (i,j)∈N |l(f i,j ,f i+1,j )+l(f i,j ,f i,j+1 )| (3) L boundary =∑ i,j w i,j ·l(f i,j ,y i,j ) (4) Among them, L boundary and L connectivity are the boundary weight loss and connectivity loss, α and β are two hyperparameters, w i,j is the weight at pixel (i, j), which is dynamically adjusted as the gradient at that position changes; f i,j and i,j are the lane line probability predicted by the model and the true annotation, l is the conventional cross entropy loss function, and N represents all adjacent pixel pairs.
7. The lane line detection method based on the improved UFLD model according to claim 1, characterized in that: The lane line dataset uses CULane, Tusimple and Curvelane datasets.
8. The lane line detection method based on the improved UFLD model according to claim 1, characterized in that: The method includes a lane line detection system based on an improved UFLDv2 model, the system including an image acquisition device and a processor; the image acquisition device is connected to the processor, wherein the image acquisition device is used to obtain a lane line image and upload it to the processor, and the processor integrates an algorithm based on items 1-7 above for performing lane line detection on the lane line image.