Lane line detection method and device

Through technologies such as backbone networks and spline curves, the accuracy and fitting ability of lane line detection are improved, solving the problems of insufficient lane line detection accuracy and complex shape fitting ability in the existing technology, and realizing the update of complex lane lines. Accurate identification and fitting.

CN118587672AActive Publication Date: 2024-09-03ZHEJIANG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410738125.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-09-03
Estimated Expiration
2044-06-07

AI Technical Summary

Technical Problem

Existing lane line detection solutions based on parametric curves have deficiencies in detection accuracy and fitting capabilities for lane lines with complex shapes, resulting in poor environmental adaptability and application obstacles to autonomous driving and assisted driving technologies.

Method used

A lane line detection method is adopted to generate lane line control point positions and confidence levels through backbone network feature extraction, lane line proposal initialization, spline curve definition, non-maximum suppression algorithm and inverse perspective transformation, thereby improving lane lines. Fitting ability and flexibility.

Benefits of technology

It improves the flexibility and local fit of lane line representation, enhances the ability to fit complex scenes, reduces computational complexity, and achieves more accurate fitting of diverse lane lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587672A
    Figure CN118587672A
Patent Text Reader

Abstract

The invention discloses a lane line detection method and device, and the method comprises the steps: carrying out the processing of a first feature map based on a lane line proposal initialization network, and generating a preliminary lane line detection result; on the basis of the lane line position refining network and the second feature map, more detailed sampling point features are obtained and converted into control point features, the correlation form of the control point features is made to be consistent with the curve property, and a more accurate lane line detection result is generated; representing the position of the lane line based on a spline curve having a set of control points; de-weighting the lane lines based on a non-maximum suppression algorithm; based on inverse perspective transformation, the lane lines are transferred to a ground coordinate system; and performing curve regression loss function calculation based on the closed region area and the curve length. According to the invention, the fitting capability of a lane line detection scheme can be enhanced, and the environment adaptability is improved under the condition of low calculation complexity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of lane line detection, and in particular to a lane line detection method and device. Background Art

[0002] As driverless technology and vehicle assistance systems are favored by more and more automobile companies, a series of technical research with driverless technology as the background is increasingly valued by academia and industry. The key and difficulty of driverless technology research lies in the analysis of the vehicle's surrounding environment, and computer vision can be used to solve these key points and difficulties, including lane line detection. Lane line detection refers to the use of digital image processing and pattern recognition technology to effectively extract lane line information in road images and fit lane lines, which is used to assist functions such as automatic driving, automatic parking and anti-collision warning.

[0003] Lane detection technology, as an indispensable part of the environmental perception technology system, is an important component of realizing unmanned driving and assisted driving. This technology can accurately assist vehicles in positioning, obtain the precise position information of vehicles on the road in real time, and ensure that autonomous vehicles strictly abide by traffic regulations during driving. The existing lane detection scheme based on parameter curves can directly output lane instances and has a fast inference speed, but the detection accuracy is often relatively low, and the fitting ability for lanes with complex shapes is weak. These models tend to output straight lanes that account for a high proportion of the data set during training, resulting in poor environmental adaptability of the model, which brings great resistance to the application of this scheme. Summary of the invention

[0004] Based on the above defects, the present invention proposes a lane line detection method and device.

[0005] The present invention provides a lane line detection method, comprising the following steps:

[0006] S1, acquiring a first image;

[0007] S2, scaling the first image according to a preset image size to generate a second image;

[0008] S3, extracting features from the second image based on the backbone network to generate a first feature map and a second feature map;

[0009] S4, processing the first feature map based on the lane line proposal initialization network to generate a first lane line control point position set and a corresponding first lane line confidence;

[0010] S5. Processing the first lane line control point position set based on the spline curve definition to obtain a first lane line sampling point position set;

[0011] S6. Processing the second feature map and the first lane line sampling point position set based on the lane line position refinement network to obtain a second lane line control point position set and a corresponding second lane line confidence;

[0012] S7. Processing the second lane line control point position set based on the spline curve definition to obtain a second lane line sampling point position set;

[0013] S8. Processing the second lane line sampling point position set and the second lane line confidence based on a non-maximum suppression algorithm to generate a third lane line sampling point position set;

[0014] S9, processing the third lane line sampling point position set based on inverse perspective transformation to generate a fourth lane line sampling point position set; the fourth lane line sampling point position set is defined in a top view perspective;

[0015] S10, calculate the loss function of the entire network, implement the back propagation algorithm, and update the network parameters.

[0016] Preferably, the step S3 specifically includes the following steps:

[0017] S301, inputting the second image into the backbone network to perform feature extraction to obtain three levels of output feature maps of different sizes, namely, primary, secondary and tertiary feature maps;

[0018] S302, using the primary feature map as the first feature map;

[0019] S303: Use the third-level feature map as the second feature map.

[0020] Preferably, the step S4 specifically includes the following steps:

[0021] S401, processing the first feature map based on the lane line global feature extraction network to generate the global features of the lane line;

[0022] S402: Input the global features of the lane line into a first prediction head composed of a fully connected network to generate a first lane line control point position set of the lane line and a corresponding first lane line confidence.

[0023] Preferably, the step S5 specifically includes the following steps:

[0024] S501, using the first lane line control point position set as control points of a spline curve to generate a first curve set;

[0025] S502, the positions of the sampling points of the first curve set on the curve are controlled by an equidistant parameter u set;

[0026] S503, calculating the corresponding basis function value according to the parameter u set;

[0027] S504, combining the basis function values ​​to generate a first transformation matrix M;

[0028] S505: Based on the first lane line control point position set and the first transformation matrix M, generate a first lane line sampling point position set.

[0029] Preferably, the step S6 specifically includes the following steps:

[0030] S601, performing matrix transformation on the first transformation matrix M to generate a second transformation matrix W; the matrix transformation is implemented by the following formula: W = (M T M) -1 M T ;

[0031] S602: According to the second feature map and the first lane line sampling point position set, bilinear interpolation is performed on the features at the corresponding pixels of the first sampling point position set in the second feature map to obtain the feature set F of the first sampling point. s ;

[0032] S603: Based on the feature set F of the first sampling point s and the second transformation matrix W to generate the control point feature set F C , the specific implementation method is F C =WF s ;

[0033] S604: The control point feature set F C The second prediction head composed of a fully connected network is input to generate a second control point position set of the lane line and the corresponding second lane line confidence.

[0034] Preferably, the step S8 specifically includes the following steps:

[0035] S801, calculating the distance set between the second lane line sampling point position set according to the chamfer distance, calculating the first curve distance D; and transforming to obtain the standardized second curve distance D norm :

[0036]

[0037] The parameter r is a constant;

[0038] S802, according to the non-maximum suppression algorithm and the second curve distance D norm, the second lane line sampling point position set is screened to obtain a third lane line sampling point position set.

[0039] Preferably, the step S9 specifically includes the following steps:

[0040] S901, generating an inverse perspective transformation matrix H based on the intrinsic parameters and extrinsic parameters of the image acquisition device;

[0041] S902: Generate a fourth lane line sampling point position set according to the inverse perspective transformation matrix H and the third lane line sampling point position set.

[0042] Preferably, the step S10 specifically includes the following steps:

[0043] S1001. Calculate the area S of the closed region between the curves and the length L of the lane line true value according to the second lane line sampling point position set and the manually marked lane line true value; decompose the area S of the closed region between the curves into triangle areas for approximate calculation, and decompose the length L of the lane line true value into line segment lengths for approximate calculation;

[0044] S1002: Calculate the area loss function according to the area S of the closed area between the curves and the length L of the true value of the lane line.

[0045] S1003: Calculate the endpoint loss function L according to the second lane line sampling point position set and the manually marked lane line true value. point ; The endpoint loss function is calculated by the L2 loss function;

[0046] S1004, calculating the loss function of the entire network according to the classification loss function, the area loss function, and the endpoint loss function, and using the calculation result for back propagation and parameter update;

[0047] S1005. Calculate the matching loss using the same method as the loss function of the entire network, and assign labels to the lane line true value and the second sampling point position set.

[0048] The present invention provides a lane line detection device, comprising:

[0049] An image acquisition device, used for acquiring a first image;

[0050] A backbone network processing module, used for performing feature extraction on the second image based on the backbone network to generate a first feature map and a second feature map;

[0051] A lane line proposal initialization module, used to process the first feature map based on the lane line proposal initialization network to generate a first lane line control point position set and a corresponding first lane line confidence;

[0052] A lane line position refinement module, configured to process the second feature map and the first lane line sampling point position set based on a lane line position refinement network to obtain a second lane line control point position set and a corresponding second lane line confidence;

[0053] A non-maximum suppression module is used to process the second lane line sampling point position set and the second lane line confidence based on a non-maximum suppression algorithm to generate a third lane line sampling point position set.

[0054] The present invention provides an electronic device, comprising:

[0055] one or more processors;

[0056] A memory for storing one or more programs;

[0057] When the one or more programs are executed by the one or more processors, the one or more processors implement the lane line detection method provided by the present invention.

[0058] The present invention provides a computer-readable storage medium on which computer instructions are stored. When the instructions are executed by a processor, the steps of the lane line detection method provided by the present invention are implemented.

[0059] Compared with the prior art, the present invention has the following beneficial effects:

[0060] The present invention improves the flexibility of lane line representation, and can represent lane lines by local spline curves for complex scenes; designs a lane line proposal initialization module, so that the initial position of the lane line proposal is more targeted for each image, and can use a smaller number of lane line proposals to reduce the computational complexity; designs a lane line position refinement module, collects the features of sampling points on a second feature map with higher resolution, and converts the features of the sampling points into the features of control points, further improving the local fit of the lane lines, and at the same time, for local spline curves, can achieve the association of features of adjacent control points, and at the same time, the features of distant control points are decoupled, thereby improving the fitting ability of the model, giving full play to the degree of freedom of the parameter curve itself, and achieving the fitting of more complex and diverse lane lines. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 A schematic diagram of a lane line detection method provided in Embodiment 1 of the present invention;

[0062] Figure 2 A module structure diagram of a lane line detection device provided in Embodiment 2 of the present invention.

[0063] Figure 3The figure is a schematic diagram of the structure of an electronic device provided for the third embodiment of the present invention. DETAILED DESCRIPTION

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

[0065] A lane line detection method provided in the first embodiment of the present invention is as follows: Figure 1 The figure shows a schematic diagram of a lane line detection method provided by the first embodiment of the present invention, which mainly includes the following steps:

[0066] S1, acquiring a first image;

[0067] Specifically, the first image is a two-dimensional image taken by a vehicle-mounted camera.

[0068] S2, scaling the first image according to a preset image size to generate a second image;

[0069] Specifically, the preset image size is W0*H0, and the second image size is W0*H0, wherein W0 is the width of the preset image size, and H0 is the height of the preset image size.

[0070] Here, the preset image size is the specified size of the input image of the backbone network used later. For example, the specified size of the input image of the backbone network is 800*320, then the width W of the preset image size is 800 and the height is 320. The size of the first image collected by the vehicle camera is not uniform. When using the backbone network, any first image needs to be scaled according to the preset image size to obtain a second image of size W0*H0.

[0071] S3, extracting features from the second image based on the backbone network to generate a first feature map and a second feature map;

[0072] Specifically, the second image is input into the backbone network for feature extraction to obtain three levels of output feature maps of different sizes, namely, primary, secondary and tertiary feature maps;

[0073] Among them, a three-level feature pyramid network with a residual network as a feature extraction network is used to construct a backbone network. The first-level feature map is used as the first feature map; the third-level feature map is used as the second feature map; the resolution of the first-level, second-level and third-level feature maps increases in sequence, and the width / height of the first-level, second-level and third-level feature maps are 1 / 32, 1 / 16 and 1 / 4 of the width / height of the second image respectively.

[0074] S4, processing the first feature map based on the lane line proposal initialization network to generate a first lane line control point position set and a corresponding first lane line confidence;

[0075] Specifically, the first feature map is processed by the lane line global feature extraction network to generate the global features of the lane line. The global feature extraction network processes the first feature map by spatial attention weighting, and the size of the first feature map is expressed as W1*H1. First, the first spatial attention weight is generated by the first group of convolutions, with a size of N*W1*H1, where N is the number of lane line proposals, and the value here is 60. The sigmoid function is executed on the first spatial attention weight, and the sum of the weights in space is calculated, which is used as the denominator to normalize the first spatial attention weight to obtain the second spatial attention weight.

[0076] The first feature map is processed by the second set of convolutions to generate a third feature map with a size of C*W1*H1, where C is the number of channels, which is 128 here. The second spatial attention weight and the third feature map are multiplied in space and summed in the spatial dimension to obtain the global features of the lane line with a size of N*C. The global features are processed by two fully connected layers to obtain the set of control point positions of the first lane line and the corresponding confidence of the first lane line, where the control point positions are normalized by the sigmoid function and the confidence is calculated by the softmax function.

[0077] S5. Processing the first lane line control point position set based on the spline curve definition to obtain a first lane line sampling point position set;

[0078] Specifically, the first lane control point position set is used as the control point of the spline curve to obtain the first curve set. The position of the sampling points of the first curve set on the curve is controlled by the equidistant parameter u set. Here, the number of sampling points is 30, and N is used. s To indicate that the number of control points is 8, use N C To represent, the corresponding basis function values ​​are calculated according to the parameter u set, and further combined to generate the first transformation matrix M, with a size of N s *N C The first lane line sampling point position set can be generated by multiplying the first transformation matrix M by the first lane line sampling point position set.

[0079] S6. Processing the second feature map and the first lane line sampling point position set based on the lane line position refinement network to obtain a second lane line control point position set and a corresponding second lane line confidence;

[0080] Specifically, because the first transformation matrix M contains the correspondence between the curve control points and the sampling points, the formula W = (M T M) -1 M T To calculate the second transformation matrix W, its size is N C *N s .

[0081] According to the second feature map and the first lane line sampling point position set, bilinear interpolation is performed on the features at the corresponding pixels of the first sampling point position set in the second feature map to obtain the feature set F of the first sampling point. s , size is N*N s *C. Get the feature set F of the first sampling point s After that, we can also choose to further enhance and update F through the deformable attention mechanism s , to obtain richer local features of sampling points. C =WF s , the feature set F of the first sampling point s Converted into control point feature set F C , whose size is N*N C *C. Set the control point feature set F C The second prediction head composed of two layers of fully connected networks is input to generate a second control point position set of the lane line and the corresponding second lane line confidence. The control point position is normalized by the sigmoid function and the confidence is calculated by the softmax function.

[0082] S7. Processing the second lane line control point position set based on the spline curve definition to obtain a second lane line sampling point position set;

[0083] Specifically, the first transformation matrix M is multiplied by the second lane line control point position set to obtain the second lane line sampling point position set of the lane line.

[0084] S8. Processing the second lane line sampling point position set and the second lane line confidence based on a non-maximum suppression algorithm to generate a third lane line sampling point position set;

[0085] Specifically, the distance set between the second sampling point position set of the lane line is calculated according to the chamfer distance to obtain the first curve distance D. The parameter r is set to 9, and the first curve distance D is standardized to obtain the second curve distance D norm , the normalization formula used is:

[0086]

[0087] Using the idea of ​​fast non-maximum suppression algorithm, Dnorm To replace the role of IoU in the algorithm, first calculate the first curve distance matrix, triangulate the first curve distance matrix to obtain the second curve distance matrix, take the maximum value of the second curve distance matrix in the first dimension, and generate the first selection vector. Binarize the first selection vector through the NMS threshold to obtain the second selection vector. The NMS threshold is set to 0.2. The value of the second selection vector at the corresponding position where the first selection vector is greater than the NMS threshold is set to False, and the value of the second selection vector at the corresponding position where the first selection vector is less than the NMS threshold is set to True. The length of the first selection vector is N, and the size of the second lane line sampling point position set is N*N s *2, use the first selection vector to select the second lane line sampling point position set at the first latitude, retain the rows corresponding to the first selection vector position of True, and discard the rows corresponding to the first selection vector position of False, to obtain the fourth lane line sampling point position set.

[0088] S9, processing the third lane line sampling point position set based on inverse perspective transformation to generate a fourth lane line sampling point position set; the fourth lane line sampling point position set is defined in a top view perspective;

[0089] Specifically, the inverse perspective transformation matrix H is calculated based on the intrinsic parameters and extrinsic parameters of the camera. A fourth lane line sampling point position set is generated based on the inverse perspective transformation matrix H and the third lane line sampling point position set. This step realizes the transformation of 2D lane line points to the ground coordinate system, and the obtained fourth lane line sampling point position set can be used for downstream tasks of lane line detection.

[0090] S10, calculate the loss function of the entire network, implement the back propagation algorithm, and update the network parameters;

[0091] Specifically, based on the second lane line sampling point position set and the manually annotated lane line true value, the area S of the closed area between the curves is calculated, and the length L of the lane line true value is calculated. Take a series of equal number of sampling points on each curve, where the number of sampling points is set to 100, and divide the closed area into multiple triangles. The difference in the sampling point serial numbers corresponding to the vertices of each triangle does not exceed 1, and the area S of the closed area is approximated by calculating the sum of the areas of the triangles. For the sampling points on the same curve, connect the adjacent sampling points to form a series of shorter line segments, calculate the lengths of these line segments and sum them, and you can get the approximate length L of the lane line true value. According to the area S of the closed area between the curves and the length L of the lane line true value, calculate the area loss function According to the second lane line sampling point position set and the manually marked lane line true value, calculate the endpoint loss function L point, the endpoint loss function is calculated by the L2 loss function. cls , area loss function L area , endpoint loss function L point , calculate the loss function of the entire network, and use the calculation results for back propagation and parameter update. The matching loss is calculated in the same way as the loss function of the entire network, and the labels of the lane line true value and the second lane line sampling point position set are assigned. The label assignment function is implemented through the one-to-many simOTA algorithm.

[0092] Figure 2 This is a module structure diagram of a lane line detection device provided in Embodiment 2 of the present invention. The device is a terminal device or server that implements the aforementioned method embodiment, or can be a device that enables the aforementioned terminal device or server to implement the aforementioned method embodiment. For example, the device can be a device or chip system of the aforementioned terminal device or server. Figure 2 As shown, the device includes: an image acquisition device, a backbone network processing module, a lane line proposal initialization module, a lane line position refinement module, and a non-maximum suppression module.

[0093] The image acquisition device 1 is used to acquire a first image;

[0094] The backbone network processing module 2 is used to extract features from the second image based on the backbone network to generate a first feature map and a second feature map;

[0095] The lane line proposal initialization module 3 is used to process the first feature map based on the lane line proposal initialization network to generate a first lane line control point position set and a corresponding first lane line confidence;

[0096] The lane line position refinement module 4 is used to process the second feature map and the first lane line control point position set based on the lane line position refinement network to obtain a second lane line control point position set and a corresponding second lane line confidence;

[0097] The non-maximum suppression module 5 is used to process the second lane line sampling point position set and the second lane line confidence based on the non-maximum suppression algorithm to generate a third lane line sampling point position set.

[0098] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0099] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present application scheme. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0100] Accordingly, the present invention also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the lane line detection method as described above. Figure 3 FIG. 1 is a schematic diagram of the structure of an electronic device provided by Embodiment 3 of the present invention, except that Figure 3 In addition to the processor, memory, DMA controller, disk, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiment is located may also include other hardware, which will not be described in detail, generally based on the actual functions of the device with data processing capabilities.

[0101] Accordingly, the present invention also provides a computer-readable storage medium having computer instructions stored thereon, which implement the lane line detection method as described above when the instructions are executed by a processor. The computer-readable storage medium may be an internal storage unit of any device with data processing capabilities described in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), an SD card, a flash card (Flash Card), etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capabilities. The computer-readable storage medium is used to store the computer program and other programs and data required by any device with data processing capabilities, and may also be used to temporarily store data that has been output or is to be output.

[0102] Although the present invention is described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the present invention. It should therefore be understood that many modifications may be made to the exemplary embodiments and that other arrangements may be devised without departing from the spirit and scope of the present invention as defined by the appended claims. It should be understood that the various dependent claims and features described herein may be combined in a manner different from that described in the original claims. It should also be understood that features described in conjunction with individual embodiments may be used in other described embodiments.

Claims

1. A lane line detection method, characterized in that: The following steps are involved: S1, acquiring a first image; S2, scaling the first image according to a preset image size to generate a second image; S3, extracting features from the second image based on the backbone network to generate a first feature map and a second feature map; S4, processing the first feature map based on the lane line proposal initialization network to generate a first lane line control point position set and a corresponding first lane line confidence; S5. Processing the first lane line control point position set based on the spline curve definition to obtain a first lane line sampling point position set; S6. Processing the second feature map and the first lane line sampling point position set based on the lane line position refinement network to obtain a second lane line control point position set and a corresponding second lane line confidence; S7. Processing the second lane line control point position set based on the spline curve definition to obtain a second lane line sampling point position set; S8. Processing the second lane line sampling point position set and the second lane line confidence based on a non-maximum suppression algorithm to generate a third lane line sampling point position set; S9, processing the third lane line sampling point position set based on inverse perspective transformation to generate a fourth lane line sampling point position set; The fourth lane line sampling point position set is defined in the top view perspective; S10, calculate the loss function of the entire network, implement the back propagation algorithm, and update the network parameters.

2. A lane line detection method according to claim 1, characterized in that: The step S3 specifically comprises the following steps: S301, inputting the second image into the backbone network to perform feature extraction to obtain three levels of output feature maps of different sizes, namely, primary, secondary and tertiary feature maps; S302, using the primary feature map as the first feature map; S303: Use the third-level feature map as the second feature map.

3. A lane line detection method according to claim 1, characterized in that: The step S4 specifically comprises the following steps: S401, processing the first feature map based on the lane line global feature extraction network to generate the global features of the lane line; S402: Input the global features of the lane line into a first prediction head composed of a fully connected network to generate a first lane line control point position set of the lane line and a corresponding first lane line confidence.

4. A lane line detection method according to claim 1, characterized in that: The step S5 specifically comprises the following steps: S501, using the first lane line control point position set as control points of a spline curve to generate a first curve set; S502, the positions of the sampling points of the first curve set on the curve are controlled by an equidistant parameter u set; S503, calculating the corresponding basis function value according to the parameter u set; S504, combining the basis function values ​​to generate a first transformation matrix M; S505: Based on the first lane line control point position set and the first transformation matrix M, generate a first lane line sampling point position set.

5. A lane line detection method according to claim 4, characterized in that: The step S6 specifically comprises the following steps: S601, performing matrix transformation on the first transformation matrix M to generate a second transformation matrix W; the matrix transformation is implemented by the following formula: W = (M T M) -1 M T ; S602: According to the second feature map and the first lane line sampling point position set, bilinear interpolation is performed on the features at the corresponding pixels of the first sampling point position set in the second feature map to obtain the feature set F of the first sampling point. s ; S603: Based on the feature set F of the first sampling point s and the second transformation matrix W to generate the control point feature set F C , the specific implementation method is F C =WF s ; S604: The control point feature set F C The second prediction head composed of a fully connected network is input to generate a second control point position set of the lane line and the corresponding second lane line confidence.

6. A lane line detection method according to claim 5, characterized in that: The step S8 specifically includes the following steps: S801, calculating the distance set between the second lane line sampling point position set according to the chamfer distance, calculating the first curve distance D; and transforming to obtain the standardized second curve distance D norm : The parameter r is a constant; S802, according to the non-maximum suppression algorithm and the second curve distance D norm , the second lane line sampling point position set is screened to obtain a third lane line sampling point position set.

7. A lane line detection method according to claim 6, characterized in that: The step S9 specifically includes the following steps: S901, generating an inverse perspective transformation matrix H based on the intrinsic parameters and extrinsic parameters of the image acquisition device; S902, generating a fourth lane line sampling point position set according to the inverse perspective transformation matrix H and the third lane line sampling point position set; The step S10 specifically includes the following steps: S1001. Calculate the area S of the closed region between the curves and the length L of the lane line true value according to the second lane line sampling point position set and the manually marked lane line true value; decompose the area S of the closed region between the curves into triangle areas for approximate calculation, and decompose the length L of the lane line true value into line segment lengths for approximate calculation; S1002: Calculate the area loss function according to the area S of the closed area between the curves and the length L of the true value of the lane line. S1003: Calculate the endpoint loss function L according to the second lane line sampling point position set and the manually marked lane line true value. point ; The endpoint loss function is calculated by the L2 loss function; S1004, calculating the loss function of the entire network according to the classification loss function, the area loss function, and the endpoint loss function, and using the calculation result for back propagation and parameter update; S1005. Calculate the matching loss using the same method as the loss function of the entire network, and assign labels to the lane line true value and the second sampling point position set.

8. A device for implementing the lane line detection method according to any one of claims 1 to 7, characterized in that: include: An image acquisition device, used for acquiring a first image; A backbone network processing module, used for performing feature extraction on the second image based on the backbone network to generate a first feature map and a second feature map; A lane line proposal initialization module, used to process the first feature map based on the lane line proposal initialization network to generate a first lane line control point position set and a corresponding first lane line confidence; A lane line position refinement module, configured to process the second feature map and the first lane line sampling point position set based on a lane line position refinement network to obtain a second lane line control point position set and a corresponding second lane line confidence; A non-maximum suppression module is used to process the second lane line sampling point position set and the second lane line confidence based on a non-maximum suppression algorithm to generate a third lane line sampling point position set.

9. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Global lane line detection method based on key points and gradient equalization loss

    CN111460984A

  • Lane line robust detection and extraction method based on road constraint

    CN116486352A

  • System and method for detecting lane using lane variation vector and cardinal spline

    KR1020160083410A

  • Traffic lane line detection method and apparatus, and terminal device and readable storage medium

    WO2022126377A1