CN-115909243-B - Lane line detection method and device
Abstract
The invention provides a lane line detection method and device, the method comprises the steps of obtaining a lane line image to be detected, inputting the lane line to be detected into a lane line detection model to obtain a lane line detection result output by the lane line detection model, wherein the lane line detection model is used for respectively carrying out point position probability prediction, point position detection and precision loss detection on a feature map obtained by extracting the lane line image to be detected to obtain the lane line detection result, and the lane line detection model is obtained by training a lane line detection true value obtained by carrying out position coding on a lane line based on a training lane line image and a lane line based on the training lane line image. According to the method, the lane line detection model is used for carrying out point position probability prediction, point position detection and precision loss detection on the lane line image to be detected, so that the lane line detection precision under the bifurcation lane line scene is improved, the decision and the path planning of a correct route are obviously facilitated, and the occurrence of missing of an intersection, wrong steering and other wrong driving routes is reduced.
Inventors
- LI MENGYU
Assignees
- 嬴彻星创智能科技(上海)有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20221128
Claims (7)
- 1. A lane line detection method, characterized by comprising: Acquiring a lane line image to be detected; inputting the lane line image to be detected into a lane line detection model to obtain a lane line detection result output by the lane line detection model; The lane line detection model is used for respectively carrying out point position probability prediction, point position detection and precision loss detection on the feature images extracted from the lane line images to be detected to obtain lane line detection results, and is obtained by training on the basis of training lane line images and lane line detection truth values obtained by carrying out position coding on the lane lines in the training lane line images; The lane line detection result comprises the confidence coefficient of each point forming the lane line, the relative coordinates of the lane line point positions and the precision loss result, and the lane line detection model comprises: the feature extraction layer is used for carrying out feature extraction based on the input lane line image to be detected to obtain a lane line feature image; the first lane line detection layer is used for carrying out point position probability prediction on the lane line feature map to obtain the confidence coefficient of each point forming the lane line; The second lane line detection layer is used for carrying out point location detection on the lane line feature map to obtain lane line point location relative coordinates; The third lane line detection layer is used for detecting precision loss of the lane line feature map to obtain a precision loss result of floating point integer conversion; the lane line point location relative coordinates include a start point distance coordinate and an end point distance coordinate, and the performing point location detection on the lane line feature map to obtain the lane line point location relative coordinates includes: performing point location detection by using a first offset channel based on the lane line feature map to obtain a starting point distance coordinate, wherein the starting point distance coordinate is a distance coordinate between a point forming the lane line and a starting point along a direction pointing to the starting point; performing point location detection by using a second offset channel based on the lane line feature map to obtain a second end point distance coordinate, wherein the end point distance coordinate is the distance coordinate between the point forming the lane line and the end point along the direction pointing to the end point; After obtaining the lane line detection result output by the lane line detection model, the method comprises the following steps: screening the relative coordinates of the lane line point positions based on a preset threshold value to obtain all starting point distance coordinates and all ending point distance coordinates smaller than the preset threshold value; clustering the starting point distance coordinates and the end point distance coordinates obtained by screening, and obtaining the average value of each clustering result to obtain predicted starting point coordinates and predicted end point coordinates; And according to the predicted starting point coordinates and the predicted ending point coordinates, combining the confidence coefficient and the accuracy loss result of each point forming the lane line, and obtaining the coordinate positions of all the points and the ID of the lane line to which the coordinates belong.
- 2. The lane line detection method according to claim 1, further comprising, after obtaining the lane line detection result output by the lane line detection model: and optimizing the lane line detection result based on non-maximum suppression.
- 3. The lane-line detection method according to claim 1, wherein training the lane-line detection model comprises: acquiring a training lane line image and a lane line detection truth value corresponding to the training lane line image; And training the network to be trained by taking the training lane line image as input data for training and taking a lane line detection true value corresponding to the training lane line image as a label to obtain a lane line detection model for generating a lane line detection result.
- 4. The lane line detection method according to claim 3, wherein the acquiring the training lane line image and the lane line detection truth value corresponding to the training lane line image includes: acquiring a training lane line image; carrying out lane line sampling on the training lane line image to obtain sampling points forming a lane line; And encoding the sampling points to obtain a lane line detection truth value.
- 5. A lane line detection apparatus, comprising: The data acquisition module acquires a lane line image to be detected; The lane line detection module is used for inputting the lane line image to be detected into a lane line detection model to obtain a lane line detection result output by the lane line detection model; The lane line detection model is used for respectively carrying out point position probability prediction, point position detection and precision loss detection on the feature images extracted from the lane line images to be detected to obtain lane line detection results, and is obtained by training on the basis of training lane line images and lane line detection truth values obtained by carrying out position coding on the lane lines in the training lane line images; The lane line detection result comprises the confidence coefficient of each point forming the lane line, the relative coordinates of the lane line point positions and the precision loss result, and the lane line detection model comprises: the feature extraction layer is used for carrying out feature extraction based on the input lane line image to be detected to obtain a lane line feature image; the first lane line detection layer is used for carrying out point position probability prediction on the lane line feature map to obtain the confidence coefficient of each point forming the lane line; The second lane line detection layer is used for carrying out point location detection on the lane line feature map to obtain lane line point location relative coordinates; The third lane line detection layer is used for detecting precision loss of the lane line feature map to obtain a precision loss result of floating point integer conversion; the lane line point location relative coordinates include a start point distance coordinate and an end point distance coordinate, and the second lane line detection layer is further configured to: performing point location detection by using a first offset channel based on the lane line feature map to obtain a starting point distance coordinate, wherein the starting point distance coordinate is a distance coordinate between a point forming the lane line and a starting point along a direction pointing to the starting point; performing point location detection by using a second offset channel based on the lane line feature map to obtain a second end point distance coordinate, wherein the end point distance coordinate is the distance coordinate between the point forming the lane line and the end point along the direction pointing to the end point; the device further comprises: The screening module is used for screening the relative coordinates of the lane line point positions based on a preset threshold after the lane line detection result output by the lane line detection model is obtained, so as to obtain all the starting point distance coordinates and the ending point distance coordinates which are smaller than the preset threshold; the coordinate prediction module clusters the starting point distance coordinates and the end point distance coordinates obtained by screening, and obtains the average value of each clustering result to obtain predicted starting point coordinates and predicted end point coordinates; and the position determining module is used for obtaining the coordinate positions of all the points and the ID of the lane line according to the predicted starting point coordinates and the predicted ending point coordinates and combining the confidence coefficient and the precision loss result of each point forming the lane line.
- 6. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the lane line detection method according to any one of claims 1 to 4 when the program is executed by the processor.
- 7. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements the steps of the lane line detection method according to any one of claims 1 to 4.
Description
Lane line detection method and device Technical Field The invention relates to the technical field of automatic driving, in particular to a lane line detection method and device. Background Lane lines are an integral part of conventional ADAS (advanced driver assistance system) and automatic driving, and especially in applications such as lane departure warning (lane departure warning, LDW) and lane keeping assistance (LANE KEEPINGASSIST, LKA), detection of lane lines is of great importance. The current main stream algorithm for lane line detection mainly comprises segmentation-based, anchor-based, row-wise and poly-regression, wherein a neural network is used for outputting lane line positions, a segmentation-based method is used for outputting lane line masks based on image segmentation, an anchor-based method is used for obtaining lane line distance anchor line offset based on anchor lines, the row-wise method is used for dividing a picture into a plurality of fence grids so as to obtain center offset, and a poly-regression method is used for directly returning lane line fitting parameters. However, the main flow algorithm for detecting the lane line is not good in the complex and changeable road, such as the bifurcation line, such as the 'Y' -shaped, the 'V' -shaped and the inverted 'V' -shaped equally-divided forklift lane line, and has the problems of missed detection and false detection, and the main flow algorithm is often detected as the same lane line, so that the path planning is easy to be wrong, and the correct intersection, such as a high-speed ramp, a bifurcation road, an intersection road and the like, is missed. Disclosure of Invention The invention provides a lane line detection method and a lane line detection device, which are used for solving the defect that the traditional lane line detection in the prior art cannot better cope with complex road scenes, improving the lane line detection precision under the bifurcation lane line scene, obviously helping decision and path planning correct routes, and reducing the occurrence of missed driving routes such as crossing, wrong steering and the like. The invention provides a lane line detection method, which comprises the steps of obtaining a lane line image to be detected, inputting the lane line image to be detected into a lane line detection model to obtain a lane line detection result output by the lane line detection model, wherein the lane line detection model is used for respectively carrying out point position probability prediction, point position detection and precision loss detection on a feature image obtained by extracting the lane line image to be detected to obtain a lane line detection result, and the lane line detection model is obtained by training a lane line detection truth value obtained by carrying out position coding on a lane line in a training lane line image. The lane line detection method comprises the steps of obtaining a lane line feature map by feature extraction based on an input lane line image to be detected, carrying out point location probability prediction on the lane line feature map by a first lane line detection layer to obtain the confidence coefficient of each point forming a lane line, carrying out point location detection on the lane line feature map by a second lane line detection layer to obtain the lane line point location relative coordinate, and carrying out precision loss detection on the lane line feature map by a third lane line detection layer to obtain the precision loss result of floating point integer conversion. The lane line point position relative coordinate comprises a starting point distance coordinate and an end point distance coordinate, the lane line feature map is subjected to point position detection to obtain lane line point position relative coordinates, the lane line point position relative coordinates are obtained by utilizing a first offset channel to conduct point position detection based on the lane line feature map, the starting point distance coordinate is a distance coordinate between a point forming the lane line along a direction pointing to a starting point and the starting point, the lane line feature map is utilized to conduct point position detection based on a second offset channel to obtain a second end point distance coordinate, and the end point distance coordinate is a distance coordinate between a point forming the lane line along a direction pointing to an end point and the end point. The lane line detection method comprises the steps of screening relative coordinates of points of the lane line based on a preset threshold value to obtain all starting point distance coordinates and all end point distance coordinates smaller than the preset threshold value, clustering the starting point distance coordinates and the end point distance coordinates obtained through screening, obtaining average values of clustering results to obtain predicted starting point coord