A guide wire detection model training method and device, and an autonomous driving system
By introducing a first penalty term and a second penalty term in the training of the guide line detection model, the curvature change of adjacent anchor points is constrained, which solves the problem of jitter and non-physical distortion in the guide line detection model and achieves higher detection accuracy and smoothness.
Patent Information
- Application Number
- CN202511689555.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2045-11-18
AI Technical Summary
Existing guide line detection models ignore the geometric correlation between adjacent anchor points during training, which makes the predicted guide lines prone to non-physical jitter and S-shaped distortion, affecting detection accuracy.
By increasing the values of the first and second penalty terms used to suppress the spatial inflection points of the predicted guide line, the curvature changes of adjacent anchor points are constrained, the guide line is forced to transition smoothly, the curvature distribution is optimized, and abnormal bending is suppressed.
The detection performance of the guide line detection model has been improved, the high-frequency jitter of the predicted guide line has been reduced, and the smoothness and accuracy of the detection have been enhanced.
Smart Images

Figure CN121147710B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and in particular, to a training method for a guideline detection model. Background Technology
[0002] With the development of artificial intelligence technology, autonomous driving has been widely applied. For example, in the application of autonomous driving on roads, lane detection is the foundation for realizing autonomous driving. It is based on the lane detection model to detect lanes from a front view with captured lane images in order to obtain the predicted three-dimensional spatial information of the lanes.
[0003] Guide line detection is typically achieved through a trained guide line detection model. Currently, the training of guide line detection models is usually based on the difference between the predicted spatial location information of the guide line in the sample and its expected spatial location information. The trained guide line detection model is unsatisfactory in terms of guide line detection. Summary of the Invention
[0004] This application provides a training method for a guide line detection model to improve the accuracy of the guide line detection model's predictions.
[0005] The first aspect of this application provides a method for training a guide line detection model, including:
[0006] The sample image data is input into the guide line detection model to be trained, and the guide line detection model outputs the predicted spatial location information used to characterize at least one anchor point in the guide line of at least one sample.
[0007] Based on the predicted spatial location information output by the guide line detection model to be trained, the total loss function value is calculated.
[0008] Based on the total loss function value, adjust the model parameters of the guide line detection model to be trained until the expected result is achieved.
[0009] in,
[0010] The total loss function value includes at least: a first penalty term value used to suppress the spatial inflection points of at least one sample prediction guideline, and a first loss function value used to characterize the difference between the predicted spatial location information and the expected spatial location information of each anchor point in the at least one sample prediction guideline.
[0011] As one possible implementation, the total loss function value further includes: a second penalty term value for suppressing spatial abrupt bending of at least one sample prediction guideline;
[0012] As one possible implementation, the value of the first penalty term is determined based on the number of spatial curvature sign transformations of at least one sample prediction guide line;
[0013] As one possible implementation, the first loss function value is determined in the following manner:
[0014] For any sample, predict the guide line.
[0015] Calculate the absolute value of the error between the predicted spatial location information of each anchor point in the sample prediction guide line and the expected spatial location of that anchor point.
[0016] The first loss function value of the sample prediction guideline is obtained by averaging the absolute values of the errors at all anchor points in the sample prediction guideline.
[0017] As one possible implementation, the total loss function value is the sum of the first penalty term value, the second penalty term value, and the first loss function value of all sample prediction guidelines;
[0018] As one possible implementation, the value of the first penalty term is determined in the following manner:
[0019] For any sample, predict the guide line.
[0020] Based on the predicted spatial positions of each anchor point in the sample prediction guide line, the number of sign transformations of the curvature at each adjacent anchor point in the sample prediction guide line is counted to obtain the inflection point information of the predicted spatial positions in the sample prediction guide line.
[0021] The number of sign transformations is weighted using weighting coefficients to obtain the weighted number of sign transformations.
[0022] For each anchor point in the sample prediction guideline, the spatial curvature at that anchor point is calculated based on the predicted spatial position of that anchor point and its adjacent anchor points within the sample prediction guideline.
[0023] The average spatial curvature at all anchor points in the predicted guide line of this sample is calculated.
[0024] The average value is summed with the number of weighted sign transformations to obtain the first penalty term value of the predicted guideline for this sample.
[0025] As one possible implementation, the second penalty term value is determined based on the range of variation in the spatial curvature of at least one sample prediction guide line.
[0026] As one possible implementation, the value of the second penalty term is determined in the following manner:
[0027] The distribution of spatial curvature at each anchor point in the prediction guide line of each sample image is statistically analyzed.
[0028] Based on the distribution of spatial curvature, constraint values are determined to constrain the spatial curvature at each anchor point.
[0029] For each anchor point in the guide line of any sample prediction, calculate the difference between the spatial curvature and the constraint value at that anchor point, and select the larger of the two values, 0 and the difference, as the constraint spatial curvature at that anchor point.
[0030] The average value of the constraint space curvature at all anchor points in the sample prediction guideline is calculated to obtain the second penalty term value of the sample prediction guideline.
[0031] As one possible implementation, the constraint value is determined in the following manner:
[0032] The constraint values are determined based on the application scenarios in the sample image data, with different constraint values corresponding to different application scenarios.
[0033] As one possible implementation, the predicted spatial location information includes two-dimensional spatial location information, wherein the other spatial location information besides the two-dimensional spatial location information is preset equal spacing information;
[0034] As one possible implementation, the spatial curvature is determined in the following manner:
[0035] For each anchor point in the guide line of any sample prediction
[0036] The first-order difference value of the anchor point is obtained by calculating the difference between the predicted spatial position of the anchor point and the predicted spatial position of the first adjacent anchor point.
[0037] The difference between the predicted spatial position of the first adjacent anchor point and the predicted spatial position of the second adjacent anchor point is calculated to obtain the first-order difference value of the first adjacent anchor point.
[0038] The difference between the first-order difference value of the anchor point and the first-order difference value of the first adjacent anchor point is calculated to obtain the second-order difference value of the anchor point. The sign of the second-order difference value is used to characterize the sign of the curvature.
[0039] Calculate the absolute value of the second-order difference of the anchor point to obtain the spatial curvature of the anchor point.
[0040] As one possible implementation, the predicted spatial location information includes:
[0041] The first predicted spatial position information of the anchor point in the bearing surface where the sample prediction guide line is located, perpendicular to the tangent direction of the sample prediction guide line, and / or
[0042] The second predicted spatial location information of the anchor point in the direction perpendicular to the bearing surface where the sample prediction guide line is located, and / or
[0043] The third predicted spatial location information of the anchor point in a direction parallel to the tangent direction of the sample prediction guide line.
[0044] in,
[0045] The third predicted spatial location information is the equidistant information.
[0046] As one possible implementation, the first penalty term value includes: a first penalty term value for a first predicted spatial location, and / or, a first penalty term value for a second predicted spatial location.
[0047] in,
[0048] The first penalty term value for the first predicted spatial location is obtained as follows:
[0049] On the bearing surface where the guide line is located in any sample prediction
[0050] For each anchor point along the tangent direction of the sample prediction guide line
[0051] The difference between the first predicted spatial position of the anchor point and the first predicted spatial position of the adjacent first anchor point in the opposite direction of the tangent direction of the anchor point is calculated to obtain the first difference value of the anchor point.
[0052] The difference between the first predicted spatial position of the first anchor point and the first predicted spatial position of the adjacent second anchor point in the opposite direction of the tangent direction of the first anchor point is calculated to obtain the first-order difference value of the first anchor point.
[0053] The absolute value of the difference between the first-order difference value of the anchor point and the first-order difference value of the first anchor point is calculated to obtain the first second-order difference value of the anchor point. The sign of the first second-order difference value is used to characterize the sign of the curvature of the first predicted spatial position at the anchor point, and the absolute value of the first second-order difference value is used to characterize the curvature of the first predicted spatial position at the anchor point.
[0054] By counting the number of sign transformations of the first and second order differences between each adjacent anchor point, the inflection point information of the first predicted spatial position in the predicted guide line of this sample is obtained.
[0055] The number of sign transformations is weighted using a first weighting coefficient to obtain a weighted number of sign transformations.
[0056] The average curvature of the first predicted spatial position at all anchor points in the predicted guide line of this sample is calculated.
[0057] The average value is summed with the number of weighted sign transformations to obtain the first penalty term value for the first predicted spatial position in the predicted guide line of the sample.
[0058] As one possible implementation, the first penalty term value for the second predicted spatial location is obtained as follows:
[0059] On the projection plane perpendicular to the bearing surface and used to project the second predicted spatial position,
[0060] For each anchor point along the tangent direction of any sample prediction guide line
[0061] The difference between the second predicted spatial position of the anchor point and the second predicted spatial position of the adjacent third anchor point in the opposite direction of the anchor point's tangent direction is calculated to obtain the first-order difference value of the anchor point.
[0062] The difference between the second predicted spatial position of the third anchor point and the second predicted spatial position of the adjacent fourth anchor point in the opposite direction of the tangent direction of the third anchor point is calculated to obtain the first-order difference value of the third anchor point.
[0063] The absolute value of the difference between the first-order difference value of the anchor point and the first-order difference value of the third anchor point is calculated to obtain the second-order difference value of the anchor point. The sign of the second-order difference value characterizes the sign of the curvature at the second predicted spatial location of the anchor point, and the absolute value of the second-order difference value characterizes the curvature at the second predicted spatial location of the anchor point.
[0064] By counting the number of sign transformations of the second-order difference values between each adjacent anchor point, the inflection point information of the second predicted spatial position in the predicted guide line of this sample is obtained.
[0065] The number of sign transformations is weighted using a second weighting coefficient to obtain the weighted number of sign transformations.
[0066] The average curvature of the second predicted spatial location at all anchor points in the predicted guide line of this sample is calculated.
[0067] The average value and the number of weighted sign transformations are summed to obtain the first penalty term value of the second prediction spatial position in the prediction guide line of the sample.
[0068] As one possible implementation, the second penalty term value includes: a second penalty term value for the first predicted spatial location, and / or, a second penalty term value for the second predicted spatial location.
[0069] in,
[0070] The second penalty term for the first predicted spatial location is obtained as follows:
[0071] Based on the first and second order difference values, the first curvature distribution of each first prediction spatial position in each sample prediction guide line of each sample image is statistically analyzed.
[0072] Based on the first curvature distribution, a first constraint value is determined to constrain the absolute value of the first second-order difference.
[0073] For each anchor point in any sample prediction guide line, calculate the first difference between the absolute value of the first second-order difference of that anchor point and the first constraint value. Select the larger of the values 0 and the first difference as the constraint curvature of the first prediction spatial position at that anchor point.
[0074] Calculate the average value of the constraint curvature at the first predicted spatial position at all anchor points in the sample prediction guide line to obtain the second penalty term value for the first predicted spatial position in the sample prediction guide line;
[0075] As one possible implementation, the second penalty term value for the second predicted spatial location is obtained in the following manner:
[0076] Based on the second second-order difference value, the second curvature distribution of each second prediction spatial location in the prediction guide line of each sample image is statistically analyzed.
[0077] Based on the second curvature distribution, a second constraint value is determined to constrain the absolute value of the second second-order difference.
[0078] For each anchor point in any sample prediction guide line, calculate the second difference between the absolute value of the second second-order difference of that anchor point and the second constraint value. Select the larger of the values 0 and the second difference as the constraint curvature of the second prediction spatial position at that anchor point.
[0079] Calculate the average value of the constraint curvature at the second predicted spatial position at all anchor points in the sample prediction guide line to obtain the second penalty term value for the second predicted spatial position.
[0080] A second aspect of this application provides a training apparatus for a guide line detection model, the apparatus comprising:
[0081] The sample prediction module is used to input sample image data into the guide line detection model to be trained, and the guide line detection model to be trained outputs predicted spatial location information to characterize at least one anchor point in at least one sample predicted guide line.
[0082] The loss function calculation module is used to calculate the total loss function value based on the predicted spatial location information output by the guide line detection model to be trained.
[0083] The adjustment module is used to adjust the model parameters of the guideline detection model to be trained based on the total loss function value until the expected result is achieved.
[0084] in,
[0085] The total loss function value includes at least: a first penalty term value used to suppress the spatial inflection points of at least one sample prediction guideline, and a first loss function value used to characterize the difference between the predicted spatial location information and the expected spatial location information of each anchor point in the at least one sample prediction guideline.
[0086] A third aspect of this application provides an autonomous driving system, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to use the computer program to perform guideline detection based on a guideline detection model obtained by training any of the guideline detection models.
[0087] The training method for the guide line detection model provided in this application increases the value of the first penalty term used to suppress the spatial inflection points of the predicted guide line of at least one sample during the training process. This makes the predicted spatial positions between anchor points correlated, avoiding the high-frequency jitter of the predicted guide line caused by training with the loss function value used to characterize the difference between the predicted spatial position information and the expected spatial position information. This makes the curvature of the predicted guide line stable at the geometric level, which is beneficial to improving the smoothness of the predicted guide line. Attached Figure Description
[0088] Figure 1 This is a schematic flowchart illustrating a training method for a guideline detection model according to an embodiment of this application.
[0089] Figure 2 This is a schematic diagram of the lane line detection model in this embodiment.
[0090] Figure 3 This is a schematic diagram of the spatial coordinate system of the anchor points in the lane lines of this embodiment.
[0091] Figure 4 This is a schematic diagram of lane line detection based on anchor points under ideal conditions.
[0092] Figure 5 This is a schematic diagram illustrating a lateral swing.
[0093] Figure 6 This is a schematic diagram of a process for obtaining the first penalty term of the first predicted spatial location in this embodiment.
[0094] Figure 7 This is a schematic diagram of a process for obtaining the first penalty term of the second predicted spatial location in this embodiment.
[0095] Figure 8 This is a schematic diagram of a process for obtaining the second penalty term value in this embodiment.
[0096] Figure 9 This is a schematic diagram of a training device for a guide line detection model according to an embodiment of this application.
[0097] Figure 10 This is a schematic diagram of an autonomous driving system according to an embodiment of this application. Detailed Implementation
[0098] To make the objectives, technical means, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings.
[0099] The applicant's research found that in anchor-based guideline detection methods, the guideline detection model, which accurately detects curved and varied guidelines in an image by classifying and regressing each anchor point using preset anchor points, typically relies solely on the L1 loss function to independently optimize the coordinates of anchor points in each guideline, ignoring the geometric correlation between adjacent anchor points within the same guideline. This leads to non-physical jitter in the guidelines predicted by the trained guideline detection model, such as S-shaped distortion.
[0100] In view of this, embodiments of this application provide a training method for a guideline detection model, which improves the detection performance of the guideline detection model by increasing the value of a first penalty term used to suppress the spatial inflection point of the guideline predicted by at least one sample.
[0101] See Figure 1 As shown, Figure 1 This is a schematic flowchart illustrating a training method for a guideline detection model according to an embodiment of this application. The method includes:
[0102] Step 101: Input the sample image data into the guide line detection model to be trained, and have the guide line detection model output the predicted spatial location information used to characterize at least one anchor point in the guide line of at least one sample.
[0103] Step 102: Based on the predicted spatial location information output by the guide line detection model to be trained, calculate the total loss function value.
[0104] The total loss function value includes at least: a first penalty term value used to suppress the spatial inflection point of at least one sample prediction guideline, and a first loss function value used to characterize the difference between the predicted spatial location information and the expected spatial location information of each anchor point in the at least one sample prediction guideline;
[0105] As an example, the first loss function value is the L1 loss function value. It should be understood that the first loss function value can also be other loss function values of different forms or combinations thereof, and this application does not limit this.
[0106] As an example, the value of the first penalty term is determined based on the number of sign transformations of the spatial curvature of the guide line predicted from at least one sample.
[0107] As an example, the value of the first penalty term is determined as follows:
[0108] For any sample, predict the guide line.
[0109] Based on the predicted spatial positions of each anchor point in the sample prediction guide line, the number of sign transformations of the curvature at each adjacent anchor point in the sample prediction guide line is counted to obtain the inflection point information of the predicted spatial positions in the sample prediction guide line. The sign of the curvature is determined based on the second-order difference value of the predicted spatial positions between adjacent anchor points.
[0110] The number of sign transformations is weighted using weighting coefficients to obtain the weighted number of sign transformations.
[0111] For each anchor point in the sample prediction guideline, the spatial curvature at that anchor point is calculated based on the predicted spatial position of that anchor point and its adjacent anchor points within the sample prediction guideline.
[0112] The average spatial curvature at all anchor points in the predicted guide line of this sample is calculated.
[0113] The average value and the number of weighted sign transformations are summed to obtain the first penalty term value of the sample prediction guideline, which helps to make the sample prediction guideline smooth.
[0114] To reduce the computational load during training, as an example, the predicted spatial location information includes two-dimensional spatial location information, wherein the other dimension of spatial location information besides the two-dimensional spatial location information is equally spaced information;
[0115] Therefore, the curvature of space is determined as follows:
[0116] For each anchor point in the guide line of any sample prediction
[0117] The first-order difference value of the anchor point is obtained by calculating the difference between the predicted spatial position of the anchor point and the predicted spatial position of the first adjacent anchor point.
[0118] The difference between the predicted spatial position of the first anchor point and the predicted spatial position of the second adjacent anchor point is calculated to obtain the first difference value of the first adjacent anchor point.
[0119] The difference between the first-order difference value of the anchor point and the first-order difference value of the first adjacent anchor point is calculated to obtain the second-order difference value of the anchor point. The second-order difference value characterizes the degree of change between adjacent first-order difference values, that is, it characterizes the degree of change in the predicted spatial position between adjacent anchor points. The sign of the second-order difference value is used to characterize the sign of the spatial curvature.
[0120] Calculate the absolute value of the second-order difference of the anchor point to obtain the spatial curvature of the anchor point.
[0121] Furthermore,
[0122] The total loss function value also includes a second penalty term used to suppress abrupt spatial bending of the guide line predicted from at least one sample.
[0123] As an example, the value of the second penalty term is determined based on the range of variation in the spatial curvature of the guide line predicted by at least one sample.
[0124] For example:
[0125] The distribution of spatial curvature at each anchor point in the prediction guide line of each sample image is statistically analyzed.
[0126] Based on the distribution of spatial curvature, constraint values are determined to constrain the spatial curvature at each anchor point.
[0127] For each anchor point in the guide line of any sample prediction, calculate the difference between the first norm of the spatial curvature at that anchor point and the constraint value, and select the larger of the values 0 and 0 as the constraint spatial curvature at that anchor point.
[0128] The average value of the constraint space curvature at all anchor points in the sample prediction guideline is calculated to obtain the second penalty term value of the sample prediction guideline.
[0129] Step 103: Adjust the model parameters of the guide line detection model to be trained according to the total loss function value until the expected result is achieved.
[0130] The training method for the guide line detection model provided in this application introduces curvature constraints on adjacent anchor points by adding a first penalty term value. This enables the trained guide line detection model to eliminate jitter in the predicted guide line during the detection process, forcing a smooth transition of the guide line and optimizing the curvature of the guide line. Furthermore, by adding a second penalty term value, the range of loss function values is constrained based on the true curvature distribution, suppressing abnormal bending and improving the training accuracy and efficiency of the guide line detection model.
[0131] To facilitate understanding of the embodiments of this application, the following description uses lane lines in a road as an example of guide lines. It should be understood that the guide lines in the embodiments of this application are not limited to lane lines in a road. They can be guide lines used to guide the movement of mobile robots, waterways floating on the water surface used to guide the movement of ships, or planning lines used to complete tasks. This application does not impose any restrictions on these.
[0132] See Figure 2 As shown, Figure 2 This is a schematic diagram of a lane line detection model in this embodiment. The model includes: a feature encoding network layer for extracting image features, and a detection head for detecting lane line anchor points based on the extracted features.
[0133] Lane detection models are typically applicable to vehicle-mounted forward-looking cameras and can be used in various road scenarios, including urban roads, highways, suburban roads, and parking lots. They can be used for complex lane lines, including but not limited to ordinary single dashed lines, single solid lines, and solid-dashed lines.
[0134] For ease of description, see Figure 3 As shown, Figure 3 This is a schematic diagram of the spatial coordinate system of the anchor point in the lane line in this embodiment. In this embodiment, the ground where the lane line is located is the lane line bearing surface. The direction in which the tangent of the lane line at the anchor point extends to the far end is the tangent direction of the lane line at that anchor point, denoted as the y-axis direction of the anchor point. The y-coordinate is used to represent the longitudinal position of the anchor point from the vehicle's forward-looking perspective. The direction perpendicular to the tangent direction of the lane line and pointing to the right of the lane line in the bearing surface is denoted as the x-direction of the anchor point, and the x-coordinate is used to characterize the lateral position of the anchor point from the vehicle's forward-looking perspective. The direction perpendicular to the bearing surface and pointing upwards from the bearing surface at the anchor point is the z-direction, and the z-coordinate is used to characterize the height position of the anchor point from the vehicle's forward-looking perspective.
[0135] In this embodiment, the predicted spatial position information in the x-direction is called the first predicted spatial position information, the predicted spatial position information in the z-direction is called the second predicted spatial position information, and the predicted spatial position information in the y-direction is called the third predicted spatial position information.
[0136] See Figure 4 As shown, Figure 4 This is a schematic diagram illustrating lane detection based on anchor points under ideal conditions. Linear anchor points define anchor point information in 3D space, and the system predicts a maximum of M lane lines and a maximum of N 3D coordinate points per lane line. For example... Figure 4 In the diagram, the horizontal axis represents the predicted lane lines A1~A1. M The lateral direction (x-axis) is represented by the vehicle's forward-looking view, while the ordinate represents the lane line direction (y-axis) in the top-down view. A maximum of N anchor points are predicted for each lane line, and the three-dimensional coordinates of these anchor points can be represented as:
[0137] P={(x ij ,y ij ,z ij )|j∈1 ,2 ,…,M}, i∈1 ,2 ,…,N},
[0138] Where x represents the lateral position of the anchor point in the vehicle's forward-looking view, y represents the longitudinal position of the anchor point in the vehicle's forward-looking view, and z represents the height position of the anchor point in the vehicle's forward-looking view.
[0139] Since lane lines are typically set to be evenly spaced in the y-direction, only the x-direction of each lane line needs to be predicted. ij and zij That is, the horizontal and vertical positions are sufficient.
[0140] The L1 loss function is used for calculation during training. The mathematical expression of the L1 loss function is as follows:
[0141]
[0142] in, Here is the loss function value for predicting lane lines for a sample, where N is the total number of anchor points. The true coordinates of the anchor point. This refers to the predicted spatial location information of the anchor point.
[0143] Because the L1 loss function only considers the absolute value of the error between the predicted and ground truth values, lane detection models trained in this way may cause the predicted points to oscillate in both lateral position and height. (See [link to relevant documentation]). Figure 5 As shown, Figure 5 This is a schematic diagram illustrating lateral positional oscillation. In the diagram, red represents the actual position point, i.e., the true value point, and green represents the predicted point. Since L1 Loss only considers the absolute value of the error, the loss magnitude is the same on both sides of the predicted point (green) and the true value point (red), which makes it prone to S-shaped jitter.
[0144] Similarly, the height position will also fluctuate in the projection planes containing the y-axis and z-axis.
[0145] Although the detection accuracy of lane lines can be improved by presetting anchor points and L1 loss function values, there is still a defect of missing anchor point correlation. Because the coordinates of each anchor point are optimized independently, the continuity of curvature between adjacent anchor points in the same lane line is ignored, which causes the predicted spatial position information of the anchor points to oscillate frequently around the true value, forming an S-shaped jitter. The reason for this is that when the L1 loss function constrains the error distance by absolute value, the positive or negative difference between the predicted value and the true value is ignored. Moreover, since the curvature range is not constrained, abnormal curvatures that exceed the limits of the real road are easily generated under sharp curves or noise interference.
[0146] To suppress lateral jitter, the predicted lane lines are forced to be smooth by constraining the curvature variation between adjacent anchor points.
[0147] For each sample, predict the coordinate sequence of anchor points in the lane line, i.e. , where i increases along the y direction.
[0148] The vertical coordinate y of the anchor point i For anchor point information, the lane line after cubic polynomial fitting can be represented as:
[0149] x = ay 3 + by 2 + cy + d,
[0150] Where y is the distance the lane line points to the far end, i.e., the distance traveled along the lane line, and x is the lateral offset of the lane line at position y relative to the driving centerline.
[0151] According to the curvature calculation formula, the curvature of the lane line is:
[0152]
[0153] Since x′ is relatively small, the curvature is mainly approximated by x″ in a coordinate system with x to the right and y to the front. Figure 3 In the coordinate system shown, the second derivative of curvature k is marked with a "+" sign to indicate an increase in curvature, i.e., a left turn, and a "-" sign to indicate a decrease in curvature, i.e., a right turn.
[0154] Since the lane detection model primarily represents lane lines by predicting anchor points, the curvature k is mainly calculated using the second-order predicted spatial location, i.e.,
[0155]
[0156] Due to changes in longitudinal position Since the intervals are equal, Since the second difference of the lateral error is a fixed value, it is used as the first penalty term for curvature penalty to constrain the curvature change between adjacent anchor points, thereby forcing the predicted lane line to be smooth.
[0157] See Figure 6 As shown, Figure 6 This is a flowchart illustrating the process of obtaining the first penalty term for the first predicted spatial position in this embodiment. For any predicted lane line, the following processing is performed:
[0158] Step 601: Calculate the difference between the first predicted spatial position of each anchor point in the predicted lane line and the first predicted spatial position of the first anchor point adjacent to that anchor point to obtain the first difference value of the anchor point. The position of the first anchor point in the coordinate sequence precedes the position of the anchor point in the coordinate sequence; that is, the first anchor point is located in the opposite direction along the tangent direction of the sample predicted lane line.
[0159] The mathematical expression for the first-order difference of this anchor point is:
[0160]
[0161] in, Let be the first-order difference value of anchor point i, representing the lateral positional change between adjacent anchor points. Let i be the first predicted spatial location of anchor point i. Let i be the first predicted spatial location of the first anchor point i-1 of anchor point i.
[0162] Step 602: Calculate the difference between the first predicted spatial position of the first anchor point and the first predicted spatial position of the adjacent second anchor point to obtain the first-order difference value of the first anchor point. The position of the second anchor point in the coordinate sequence precedes the position of the first anchor point in the coordinate sequence; that is, the second anchor point is located in the opposite direction along the tangent direction of the sample predicted lane line.
[0163] The mathematical expression for the first-order difference value of the first anchor point is:
[0164]
[0165] in, The first difference value of the first anchor point i-1, Let i-1 be the first predicted spatial location of the first anchor point. Let i-2 be the first predicted spatial location of the second anchor point.
[0166] Step 603: Calculate the difference between the first-order difference of this anchor point and the first-order difference of the first anchor point to obtain the first second-order difference. The mathematical expression of the first second-order difference is as follows:
[0167]
[0168] in, Let be the first and second order difference value of anchor point i. The sign of the first and second order difference value represents the sign of the curvature of the first predicted spatial position at the anchor point, and the absolute value of the first and second order difference value represents the curvature of the first predicted spatial position at the anchor point. The first difference value of anchor point i It is the first-order difference value of the first anchor point i-1.
[0169] Step 604: Based on the first and second order differences of each anchor point in the predicted lane line of the sample, count the number of sign transformations of the curvature at each adjacent anchor point in the predicted lane line of the sample. The mathematical expression is:
[0170]
[0171] in, This represents the number of sign transitions counted, where || is an indicator function used to count the number of curvature sign abrupt changes. This indicates a sign-taking operation. As can be seen from the mathematical expression, if the first and second order difference values of anchor point i are different from those of anchor point i-1, then anchor point i is an inflection point.
[0172] Step 605: The number of sign changes counted is weighted using the first weighting coefficient to obtain the weighted number of sign changes for the predicted lane line of the sample.
[0173] Step 606: Calculate the average of the absolute values of the first and second order differences at all anchor points in the predicted lane line of the sample, and sum the average value with the number of weighted sign transformations to obtain the first penalty term value for the first predicted spatial position of the predicted lane line of the sample. The mathematical expression of the first penalty term value is as follows:
[0174]
[0175] in, This is the first weighting coefficient, which can be set according to the model optimization results. For the first norm, The sign transformation number of the first and second order difference values being statistically analyzed. The first penalty term value for the first predicted spatial location is the loss function value used to characterize the curvature smoothing constraint of the first predicted spatial location.
[0176] By adding the first penalty term value of the first predicted spatial position, the high-frequency jitter can be eliminated and the continuity of lane line lateral position prediction can be improved.
[0177] Similarly, the first penalty term value can also be obtained for the second predicted spatial location information.
[0178] See Figure 7 As shown, Figure 7 This is a flowchart illustrating the first penalty term for obtaining the second predicted spatial location in this embodiment. For any predicted lane line, the following processing is performed:
[0179] Step 701: Calculate the difference between the second predicted spatial position of each anchor point in the predicted lane line and the second predicted spatial position of the third anchor point adjacent to that anchor point to obtain the first-order difference value of the anchor point. The position of the third anchor point in the coordinate sequence precedes the position of the anchor point in the coordinate sequence; that is, the third anchor point is located in the opposite direction along the tangent direction of the sample predicted lane line.
[0180] The mathematical expression for the first-order difference of this anchor point is:
[0181]
[0182] in, Let be the first-order difference value of the second predicted spatial position at anchor point i, representing the change in height position between adjacent anchor points. Let i be the second predicted spatial location of anchor point i. Let i be the second predicted spatial location of the third anchor point i-1 of anchor point i.
[0183] Step 702: Calculate the difference between the second predicted spatial position of the third anchor point and the second predicted spatial position of the adjacent fourth anchor point to obtain the first-order difference value of the third anchor point. The fourth anchor point's position in the coordinate sequence precedes the third anchor point's position in the coordinate sequence; that is, the second anchor point is located in the opposite direction to the tangent direction of the sample predicted lane line.
[0184] The mathematical expression for the first-order difference value of the third anchor point is:
[0185]
[0186] in, The first-order difference value at the third anchor point i-1, The second predicted spatial location of the third anchor point i-1 The second predicted spatial location is the fourth anchor point i-2.
[0187] Step 703: Calculate the difference between the first-order difference of the anchor point and the first-order difference of the third anchor point to obtain the second-order difference. The mathematical expression of the second-order difference is as follows:
[0188]
[0189] in, Let be the second second-order difference value of anchor point i. The sign of the second second-order difference value represents the sign transformation of the curvature of the second predicted spatial position at the anchor point, and the absolute value of the second second-order difference value represents the curvature of the second predicted spatial position at the anchor point. The first difference value of anchor point i It is the first-order difference value of the third anchor point i-1.
[0190] Step 704: Based on the second second-order difference value of each anchor point, count the number of sign transformations of the curvature at the second predicted spatial position of each adjacent anchor point in the predicted lane line of the sample.
[0191] The mathematical expression is as follows:
[0192]
[0193] in, This represents the number of sign transitions counted, where || is an indicator function used to count the number of curvature sign abrupt changes. This indicates the sign-reset operation.
[0194] Step 705: The number of sign changes counted is weighted using a second weighting coefficient to obtain the weighted number of sign changes for the predicted lane lines of the sample.
[0195] Step 706: Calculate the average of the absolute values of the second second-order difference values at all anchor points in the predicted lane line of the sample, and sum the calculated average with the number of weighted sign transformations to obtain the first penalty term value for the second predicted spatial position of the predicted lane line of the sample. The mathematical expression of the first penalty term value is as follows:
[0196]
[0197] in, This is the second weighting coefficient, which can be set according to the model optimization results. For the first norm, The sign transformation number of the statistically analyzed second-order second difference value. The first penalty term value for the second predicted spatial location is used to characterize the loss function value representing the curvature smoothing constraint of the second predicted spatial location.
[0198] By adding the first penalty term value of the second predicted spatial location, the high-frequency jitter can be eliminated and the continuity of lane line height position prediction can be improved.
[0199] Furthermore, based on the physical laws of real road curvature, a curvature dynamic range constraint loss function is constructed to suppress abrupt bending in unrealistic scenarios.
[0200] See Figure 8 As shown, Figure 8 This is a schematic diagram of a process for obtaining the second penalty term value in this embodiment. It includes:
[0201] Step 801: Perform curvature distribution statistics on the training set, that is, statistically analyze the spatial curvature distribution at each anchor point in the predicted lane line of each sample image to obtain the probability distribution P(k) of lane line curvature k.
[0202] Step 802: Based on the spatial curvature distribution, determine the constraint value used to constrain the spatial curvature at each anchor point. For example, the maximum curvature corresponding to a curvature distribution probability of 95% is used as the constraint value.
[0203] Step 803: For each anchor point in the lane line predicted for any sample,
[0204] Calculate the difference between the spatial curvature and the constraint value at the anchor point, and select the larger of the two values, 0 and the difference, as the constrained spatial curvature at the anchor point.
[0205] The average value of the constraint space curvature at all anchor points in the sample predicted lane line is calculated to obtain the second penalty term value of the sample predicted lane line, which is used to penalize curvature that exceeds the range.
[0206] The mathematical expression for the second penalty term is:
[0207]
[0208] Where, k i Reference , used to characterize the curvature of the predicted spatial location at anchor point i, For constraint values, max(0, k) i -k max The constrained space curvature at anchor point i is represented. The second penalty term value is used to predict the lane lines for this sample.
[0209] As an example, constraint values can be set based on road attributes, such as urban roads and highway ramps. For instance, urban roads typically have lower speeds, such as 60 km / h or less, and urban curves are mainly gentle turns, with a curvature range of [0, 0.005] / m. On highway ramps, the speed is greater than or equal to 80 km / h, but turns need to be completed in a limited space, so they typically have a larger curvature (smaller radius), with a typical range of [0.005, 0.01] / m. Thus, different constraint values are set for different road attributes.
[0210] Meanwhile, considering safety requirements, urban roads see frequent pedestrian and vehicle interactions, and a low curvature threshold can suppress lane detection models from generating dangerous sharp curves, avoiding misleading the autonomous driving system. While highway ramps allow for larger curvatures, higher constraint values are needed to constrain outliers, such as invalid sharp curves with curvature greater than 0.01. Therefore, the curvature range constraint for multiple scenarios is improved, and the mathematical expression for the second penalty term is:
[0211]
[0212] Where, k s1 k s2 The symbols "and" represent the constraint values for each scenario. These can be predefined in the model training based on the scenario database to adapt to the curvature distribution of multiple scenarios, such as highways and urban curves, to avoid outputting abnormal shapes such as "hairpin bends" and improve the robustness of curve area detection, such as ramp merging sections.
[0213] In this embodiment, the second penalty term value includes: the second penalty term value for the first predicted spatial location, and / or, the second penalty term value for the second predicted spatial location.
[0214] in,
[0215] The second penalty term for the first predicted spatial location is obtained as follows:
[0216] Based on the first and second order difference values, the first curvature distribution of each first predicted spatial location in the predicted lane line of each sample image is statistically analyzed.
[0217] Based on the first curvature distribution, a first constraint value is determined to constrain the absolute value of the first second-order difference.
[0218] For each anchor point in the lane line of any sample prediction, calculate the first difference between the absolute value of the first second-order difference of the anchor point and the first constraint value. Select the larger of the value 0 and the first difference as the constraint curvature of the first predicted spatial position at the anchor point.
[0219] Calculate the average value of the constraint curvature at the first predicted spatial position at all anchor points in the sample predicted lane line to obtain the second penalty term value for the first predicted spatial position in the sample predicted lane line.
[0220] Similarly, the second penalty term value for the second predicted spatial location is obtained as follows:
[0221] Based on the second second-order difference value, the second curvature distribution of each second predicted spatial location in the predicted lane line of each sample image is statistically analyzed.
[0222] Based on the second curvature distribution, a second constraint value is determined to constrain the absolute value of the second second-order difference.
[0223] For each anchor point in the lane line predicted for any sample, calculate the second difference between the absolute value of the second second-order difference of that anchor point and the second constraint value. Select the larger of the values 0 and the second difference as the constraint curvature of the second predicted spatial location at that anchor point.
[0224] The average value of the constraint curvature at the second predicted spatial location at all anchor points in the predicted lane line of the sample is calculated to obtain the second penalty term value for the second predicted spatial location.
[0225] Therefore, the total loss function value is the sum of the first penalty term value, the second penalty term value, and the first loss function value for all sample lane line predictions. Mathematically, this can be expressed as:
[0226] )
[0227] Where L is the total loss function value, and M is the total number of lane lines predicted in the sample. The first loss function value for predicting lane lines for the j-th sample is, in this embodiment, the first loss function value includes the first loss function value for the first predicted spatial location and the first loss function value for the second predicted spatial location. The first penalty term value is the first predicted spatial location of the lane line for the j-th sample. The first penalty term value is the second predicted spatial location of the lane line for the j-th sample. The second penalty term value is the first predicted spatial location of the lane line for the j-th sample. The second penalty term value is used to predict the second spatial location of the lane line for the j-th sample.
[0228] This embodiment trains the lane detection model using multiple loss function values, which are a combination of a first loss function value, a first penalty term value for smoothness constraints, and a second penalty term value for curvature range constraints. This helps to simultaneously improve the positioning accuracy and trajectory rationality of the lane detection model, making the prediction results more consistent with the characteristics of real roads.
[0229] See Figure 9 As shown, Figure 9 This is a schematic diagram of a training device for a guide line detection model according to an embodiment of this application. The device includes:
[0230] The sample prediction module is used to input sample image data into the guide line detection model to be trained, and the guide line detection model to be trained outputs predicted spatial location information to characterize at least one anchor point in at least one sample predicted guide line.
[0231] The loss function calculation module is used to calculate the total loss function value based on the predicted spatial location information output by the guide line detection model to be trained.
[0232] The adjustment module is used to adjust the model parameters of the guideline detection model to be trained based on the total loss function value until the expected result is achieved.
[0233] in,
[0234] The total loss function value includes at least: a first penalty term value used to suppress the spatial inflection points of at least one sample prediction guideline, and a first loss function value used to characterize the difference between the predicted spatial location information and the expected spatial location information of each anchor point in the at least one sample prediction guideline.
[0235] See Figure 10 As shown, Figure 10 This is a schematic diagram of an autonomous driving system according to an embodiment of this application. The device includes a memory and a processor. The memory stores a computer program, and the processor is configured to execute the computer program to perform guideline detection based on a guideline detection model obtained by training any of the guideline detection models.
[0236] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0237] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0238] This invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the training method for the guide line detection model described in this application.
[0239] For the device / network-side equipment / storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and relevant parts can be referred to in the description of the method embodiments.
[0240] In this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0241] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A training method for a guide line detection model, characterized in that, include: The sample image data is input into the guide line detection model to be trained, and the guide line detection model outputs the predicted spatial location information used to characterize at least one anchor point in the guide line of at least one sample. Based on the predicted spatial location information output by the guide line detection model to be trained, the total loss function value is calculated. Based on the total loss function value, adjust the model parameters of the guide line detection model to be trained until the expected result is achieved. in, The total loss function value includes at least: a first penalty term value used to suppress the spatial inflection points of at least one sample prediction guideline, and a first loss function value used to characterize the difference between the predicted spatial location information and the expected spatial location information of each anchor point in the at least one sample prediction guideline; The first penalty term value is determined based on the number of spatial curvature sign transformations of at least one sample prediction guide line in the following manner: For any sample, predict the guide line. Based on the predicted spatial positions of each anchor point in the sample prediction guide line, the number of sign transformations of the curvature at each adjacent anchor point in the sample prediction guide line is counted to obtain the inflection point information of the predicted spatial positions in the sample prediction guide line. The number of sign transformations is weighted using weighting coefficients to obtain the weighted number of sign transformations. For each anchor point in the sample prediction guideline, the spatial curvature at that anchor point is calculated based on the predicted spatial position of that anchor point and its adjacent anchor points within the sample prediction guideline. The average spatial curvature at all anchor points in the predicted guide line of this sample is calculated. The average value is summed with the number of weighted sign transformations to obtain the first penalty term value of the predicted guideline for this sample.
2. The method as described in claim 1, characterized in that, The total loss function value further includes: a second penalty term value used to suppress spatial abrupt bending of at least one sample prediction guideline; The first loss function value is determined as follows: For any sample, predict the guide line. Calculate the absolute value of the error between the predicted spatial location information of each anchor point in the sample prediction guide line and the expected spatial location of that anchor point. The first loss function value of the sample prediction guideline is obtained by averaging the absolute values of the errors at all anchor points in the sample prediction guideline.
3. The method as described in claim 2, characterized in that, The total loss function value is the sum of the first penalty term value, the second penalty term value, and the first loss function value of all sample prediction guide lines; The second penalty term value is determined based on the range of variation in the spatial curvature of the guide line of at least one sample prediction.
4. The method as described in claim 3, characterized in that, The value of the second penalty term is determined as follows: The distribution of spatial curvature at each anchor point in the prediction guide line of each sample image is statistically analyzed. Based on the distribution of spatial curvature, constraint values are determined to constrain the spatial curvature at each anchor point. For each anchor point in the guide line of any sample prediction, calculate the difference between the spatial curvature and the constraint value at that anchor point, and select the larger of the two values, 0 and the difference, as the constraint spatial curvature at that anchor point. The average value of the constraint space curvature at all anchor points in the sample prediction guideline is calculated to obtain the second penalty term value of the sample prediction guideline.
5. The method as described in claim 4, characterized in that, The constraint value is determined in the following manner: The constraint values are determined based on the application scenarios in the sample image data, with different constraint values corresponding to different application scenarios. The predicted spatial location information includes two-dimensional spatial location information, wherein the other spatial location information besides the two-dimensional spatial location information is a preset equal spacing information; The spatial curvature is determined in the following manner: For each anchor point in the guide line of any sample prediction The first-order difference value of the anchor point is obtained by calculating the difference between the predicted spatial position of the anchor point and the predicted spatial position of the first adjacent anchor point. The difference between the predicted spatial position of the first adjacent anchor point and the predicted spatial position of the second adjacent anchor point is calculated to obtain the first-order difference value of the first adjacent anchor point. The difference between the first-order difference value of the anchor point and the first-order difference value of the first adjacent anchor point is calculated to obtain the second-order difference value of the anchor point. The sign of the second-order difference value is used to characterize the sign of the curvature. Calculate the absolute value of the second-order difference of the anchor point to obtain the spatial curvature of the anchor point.
6. The method as described in claim 5, characterized in that, The predicted spatial location information includes: The first predicted spatial position information of the anchor point in the bearing surface where the sample prediction guide line is located, perpendicular to the tangent direction of the sample prediction guide line, and / or The second predicted spatial location information of the anchor point in the direction perpendicular to the bearing surface where the sample prediction guide line is located, and / or The third predicted spatial location information of the anchor point in a direction parallel to the tangent direction of the sample prediction guide line. in, The third predicted spatial location information is the equidistant information.
7. The method as described in claim 6, characterized in that, The first penalty term value includes: a first penalty term value for a first predicted spatial location, and / or, a first penalty term value for a second predicted spatial location. in, The first penalty term value for the first predicted spatial location is obtained as follows: On the bearing surface where the guide line is located in any sample prediction For each anchor point along the tangent direction of the sample prediction guide line The difference between the first predicted spatial position of the anchor point and the first predicted spatial position of the adjacent first anchor point in the opposite direction of the tangent direction of the anchor point is calculated to obtain the first difference value of the anchor point. The difference between the first predicted spatial position of the first anchor point and the first predicted spatial position of the adjacent second anchor point in the opposite direction of the tangent direction of the first anchor point is calculated to obtain the first-order difference value of the first anchor point. The absolute value of the difference between the first-order difference value of the anchor point and the first-order difference value of the first anchor point is calculated to obtain the first second-order difference value of the anchor point. The sign of the first second-order difference value is used to characterize the sign of the curvature of the first predicted spatial position at the anchor point, and the absolute value of the first second-order difference value is used to characterize the curvature of the first predicted spatial position at the anchor point. By counting the number of sign transformations of the first and second order differences between each adjacent anchor point, the inflection point information of the first predicted spatial position in the predicted guide line of this sample is obtained. The number of sign transformations is weighted using a first weighting coefficient to obtain a weighted number of sign transformations. The average curvature of the first predicted spatial position at all anchor points in the predicted guide line of this sample is calculated. The average value is summed with the number of weighted sign transformations to obtain the first penalty term value for the first predicted spatial position in the predicted guide line of the sample. The first penalty term value for the second predicted spatial location is obtained as follows: On the projection plane perpendicular to the bearing surface and used to project the second predicted spatial position, For each anchor point along the tangent direction of any sample prediction guide line The difference between the second predicted spatial position of the anchor point and the second predicted spatial position of the adjacent third anchor point in the opposite direction of the anchor point's tangent direction is calculated to obtain the first-order difference value of the anchor point. The difference between the second predicted spatial position of the third anchor point and the second predicted spatial position of the adjacent fourth anchor point in the opposite direction of the tangent direction of the third anchor point is calculated to obtain the first-order difference value of the third anchor point. The absolute value of the difference between the first-order difference value of the anchor point and the first-order difference value of the third anchor point is calculated to obtain the second-order difference value of the anchor point. The sign of the second-order difference value characterizes the sign of the curvature at the second predicted spatial location of the anchor point, and the absolute value of the second-order difference value characterizes the curvature at the second predicted spatial location of the anchor point. By counting the number of sign transformations of the second-order difference values between each adjacent anchor point, the inflection point information of the second predicted spatial position in the predicted guide line of this sample is obtained. The number of sign transformations is weighted using a second weighting coefficient to obtain the weighted number of sign transformations. The average curvature of the second predicted spatial location at all anchor points in the predicted guide line of this sample is calculated. The average value and the number of weighted sign transformations are summed to obtain the first penalty term value of the second prediction spatial position in the prediction guide line of the sample.
8. The method as described in claim 7, characterized in that, The second penalty value includes: the second penalty value for the first predicted spatial location, and / or, the second penalty value for the second predicted spatial location. in, The second penalty term for the first predicted spatial location is obtained as follows: Based on the first and second order difference values, the first curvature distribution of each first prediction spatial position in each sample prediction guide line of each sample image is statistically analyzed. Based on the first curvature distribution, a first constraint value is determined to constrain the absolute value of the first second-order difference value. For each anchor point in any sample prediction guide line, calculate the first difference between the absolute value of the first second-order difference of that anchor point and the first constraint value. Select the larger of the values 0 and the first difference as the constraint curvature of the first prediction spatial position at that anchor point. Calculate the average value of the constraint curvature at the first predicted spatial position at all anchor points in the sample prediction guide line to obtain the second penalty term value for the first predicted spatial position in the sample prediction guide line; The second penalty term value for the second predicted spatial location is obtained as follows: Based on the second second-order difference value, the second curvature distribution of each second prediction spatial location in the prediction guide line of each sample image is statistically analyzed. Based on the second curvature distribution, a second constraint value is determined to constrain the absolute value of the second second-order difference. For each anchor point in any sample prediction guideline, calculate the second difference between the absolute value of the second second-order difference of that anchor point and the second constraint value. Select the maximum of the values 0 and the second difference as the constraint curvature of the second prediction spatial position at that anchor point. Calculate the average value of the constraint curvature at the second predicted spatial position at all anchor points in the sample prediction guide line to obtain the second penalty term value for the second predicted spatial position.
9. A training device for a guide line detection model, characterized in that, The device includes: The sample prediction module is used to input sample image data into the guide line detection model to be trained, and the guide line detection model to be trained outputs predicted spatial location information to characterize at least one anchor point in at least one sample predicted guide line. The loss function calculation module is used to calculate the total loss function value based on the predicted spatial location information output by the guide line detection model to be trained. The adjustment module is used to adjust the model parameters of the guideline detection model to be trained based on the total loss function value until the expected result is achieved. in, The total loss function value includes at least: a first penalty term used to suppress the spatial inflection points of at least one sample prediction guideline, and a first loss function value used to characterize the difference between the predicted spatial location information and the expected spatial location information of each anchor point in the at least one sample prediction guideline. The first penalty term value is determined based on the number of spatial curvature sign transformations of at least one sample prediction guide line in the following manner: For any sample, predict the guide line. Based on the predicted spatial positions of each anchor point in the sample prediction guide line, the number of sign transformations of the curvature at each adjacent anchor point in the sample prediction guide line is counted to obtain the inflection point information of the predicted spatial positions in the sample prediction guide line. The number of sign transformations is weighted using weighting coefficients to obtain the weighted number of sign transformations. For each anchor point in the sample prediction guideline, the spatial curvature at that anchor point is calculated based on the predicted spatial position of that anchor point and its adjacent anchor points within the sample prediction guideline. The average spatial curvature at all anchor points in the predicted guide line of this sample is calculated. The average value is summed with the number of weighted sign transformations to obtain the first penalty term value of the predicted guideline for this sample.
10. An autonomous driving system, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor being configured to use the computer program to perform guideline detection based on a guideline detection model obtained by the training method of any one of claims 1 to 8.
Citation Information
Patent Citations
Prediction method, training method, device and equipment of lane line detection model
CN118053130A