Lane line detection model evaluation method and device, equipment and storage medium
By obtaining the labeled lane line points and model predicted lane line points on the target image, and calculating the recall rate, precision rate, actual curvature and predicted curvature, the problem of poor evaluation accuracy of the lane line detection model in the existing technology is solved, and the More accurate model performance evaluation.
Patent Information
- Application Number
- CN202310896840.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-20
- Publication Date
- 2025-01-21
AI Technical Summary
The existing lane line detection model evaluation methods have poor accuracy and cannot fully evaluate the model performance.
By obtaining the labeled lane line points and model predicted lane line points on the target image, the recall rate, precision rate, actual curvature and predicted curvature are calculated, and these indicators are combined to evaluate the lane line detection model.
The accuracy of lane line detection model evaluation is improved, and the lane line performance predicted by the model can be evaluated from multiple dimensions and local and overall levels.
Smart Images

Figure CN119339342A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of intelligent driving technology, and in particular, relates to an evaluation method, device, equipment and storage medium for a lane detection model. Background Art
[0002] Lane detection is an application of environmental perception. Lane detection algorithms are mainly used to detect lane lines on the road and extract their positions and directions. This technology is often used in autonomous driving, intelligent transportation systems, and driver assistance systems. The detected lane line information can be used to identify the number, width, and position of lanes, thereby helping autonomous vehicles or driver assistance systems to automatically keep the vehicle in the lane and improve driving safety and comfort.
[0003] The lane line detection model can be used to detect the lane line. Specifically, the lane line detection can input an image containing the lane line into a pre-trained lane line detection model, obtain the lane line points output by the lane line detection model, and use the lane line points to determine the position of the lane line.
[0004] Therefore, the performance of the lane line detection model will directly affect the accuracy of lane line detection. In order to ensure the accuracy of lane line detection, the performance of the lane line detection model needs to be evaluated before it is applied. Only a qualified lane line detection model can detect accurate lane lines.
[0005] However, in related technologies, the performance of the lane line detection model is usually characterized by only the ratio of the correct lane line points to all the lane line points in the label. This method of using a single indicator to evaluate the model has certain defects and cannot accurately evaluate the performance of the lane line detection model. Summary of the invention
[0006] The embodiments of the present application provide a lane line detection model evaluation method, device, equipment and storage medium, which can solve the problem of poor accuracy of existing lane line detection model evaluation methods.
[0007] In a first aspect, an embodiment of the present application provides a method for evaluating a lane detection model, the method comprising:
[0008] Acquire a target image, and N first lane line points and M second lane line points on the target image, wherein the target image includes at least one lane line, the N first lane line points are marked points representing the position of the at least one lane line, and the M second lane line points are points representing the position of the at least one lane line predicted by the lane line detection model, and N and M are positive integers;
[0009] Determining a recall rate and a precision rate of the lane line detection model according to the N first lane line points and the M second lane line points;
[0010] Determining an actual curvature and a predicted curvature of a target lane line according to the N first lane line points and the M second lane line points, wherein the target lane line is any lane line in the target image;
[0011] The lane line detection model is evaluated according to the recall rate, the precision rate, the actual curvature and the predicted curvature to obtain an evaluation result of the lane line detection model.
[0012] In some embodiments, determining the recall rate and precision rate of the lane line detection model according to the N first lane line points and the M second lane line points includes:
[0013] Selecting L third lane line points from the M second lane line points according to the N first lane line points, where L is a positive integer less than or equal to N and less than or equal to M;
[0014] The first quotient value with L as the dividend and N as the divisor is determined as the recall rate;
[0015] A second quotient value with L as the dividend and M as the divisor is determined as the accuracy rate.
[0016] In some embodiments, the selecting L third lane line points from the M second lane line points according to the N first lane line points includes:
[0017] For any second lane line point among the M second lane line points, if there is a first lane line point whose distance to the second lane line point is less than or equal to a preset first threshold, the second lane line point is determined as a third lane line point.
[0018] In some embodiments, determining the actual curvature and the predicted curvature of the target lane line according to the N first lane line points and the M second lane line points includes:
[0019] Acquire at least one fifth lane line point for representing the target lane line from the N first lane line points;
[0020] Acquire at least one sixth lane line point for representing the target lane line from the M second lane line points;
[0021] Determining an actual curvature of the target lane line according to the at least one fifth lane line point;
[0022] The predicted curvature of the target lane line is determined according to the at least one sixth lane line point.
[0023] In some embodiments, determining the actual curvature of the target lane line according to the at least one fifth lane line point includes:
[0024] When the number of the at least one fifth lane line point is greater than 3, determining at least one first curvature according to the at least one fifth lane line point, wherein each of the at least one first curvature is the curvature of a curve formed by connecting any three adjacent fifth lane line points among the at least one fifth lane line point;
[0025] An average value of the at least one first curvature is determined as the actual curvature.
[0026] In some embodiments, determining the predicted curvature of the target lane line according to the at least one sixth lane line point includes:
[0027] When the number of the at least one sixth lane line point is greater than 3, determining at least one second curvature according to the at least one sixth lane line point, wherein each of the at least one second curvature is the curvature of a curve formed by connecting any three adjacent sixth lane line points among the at least one sixth lane line point;
[0028] An average value of the at least one second curvature is determined as the predicted curvature.
[0029] In some embodiments, evaluating the lane line detection model according to the recall rate, the precision rate, the actual curvature, and the predicted curvature to obtain an evaluation result of the lane line detection model includes:
[0030] Calculating an absolute value of a difference between the actual curvature and the predicted curvature;
[0031] Determining the accuracy of the lane line detection model according to the N first lane line points and the M second lane line points;
[0032] When the lane line detection model satisfies all model evaluation conditions at the same time, determining the evaluation result of the lane line detection model as having good performance;
[0033] When the lane line detection model does not satisfy any of the following model evaluation conditions, determining the evaluation result of the lane line detection model as having poor performance;
[0034] The model evaluation conditions include:
[0035] The recall rate is greater than a preset recall rate threshold;
[0036] The accuracy is greater than a preset accuracy threshold;
[0037] The absolute value is less than or equal to a preset difference threshold;
[0038] The accuracy is greater than a preset accuracy threshold.
[0039] In a second aspect, an embodiment of the present application provides an evaluation device for a lane detection model, the device comprising:
[0040] an acquisition module, configured to acquire a target image, and N first lane line points and M second lane line points on the target image, wherein the target image includes at least one lane line, the N first lane line points are annotated points representing the position of the at least one lane line, and the M second lane line points are points representing the position of the at least one lane line predicted by the lane line detection model, and N and M are positive integers;
[0041] A first determination module, configured to determine a recall rate and a precision rate of the lane line detection model according to the N first lane line points and the M second lane line points;
[0042] A second determination module, configured to determine an actual curvature and a predicted curvature of a target lane line according to the N first lane line points and the M second lane line points, wherein the target lane line is any lane line in the target image;
[0043] An evaluation module is used to evaluate the lane line detection model according to the recall rate, the precision rate, the actual curvature and the predicted curvature to obtain an evaluation result of the lane line detection model.
[0044] In a third aspect, an embodiment of the present application provides a lane detection model evaluation device, the device comprising: a processor and a memory storing computer program instructions;
[0045] When the processor executes the computer program instructions, the lane line detection model evaluation method as described above is implemented.
[0046] In a fourth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the lane line detection model evaluation method as described above is implemented.
[0047] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes computer program instructions, and when the computer program instructions are executed by a processor, the lane line detection model evaluation method as described above is implemented.
[0048] In the present application, the lane line detection model is evaluated using the recall rate, precision rate of the model, the actual curvature of the lane line and the predicted curvature of the lane line detection model. Since the accuracy rate refers to the ratio of true positive examples to the number of samples predicted as positive examples, and the recall rate refers to the ratio of true positive examples to the number of samples that are actually positive examples, and the comparison result of the actual curvature and the predicted curvature can measure the degree of standardization and smoothness of the predicted overall lane line, compared with the prior art that only uses the accuracy rate of the lane line detection model to evaluate the lane line detection model, the present application can evaluate the performance of the lane line predicted by the model from multiple dimensions and from the local and overall aspects of the lane line, thereby improving the accuracy of the model evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0050] Figure 1 It is a flowchart of a method for evaluating a lane detection model provided in an embodiment of the present application;
[0051] Figure 2 It is a schematic diagram of the hardware structure of an evaluation device for a lane detection model provided in an embodiment of the present application;
[0052] Figure 3 It is a structural schematic diagram of an evaluation device for a lane detection model provided in one embodiment of the present application. DETAILED DESCRIPTION
[0053] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0054] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0055] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The embodiments will be described in detail below in conjunction with the accompanying drawings.
[0056] In related technologies, the performance of the lane detection model is usually characterized by the ratio of the correct lane points to all lane points in the label. However, in the process of predicting lanes using the lane detection model, the lanes usually need to be expanded to a certain width, which results in a certain error. When lanes have special working conditions such as large arc curves, whether the lanes are calculated by the number of pixels or the area, the error of the lanes will be magnified. Therefore, the performance of the lane detection model is often not accurate enough to only use the ratio of the correct lane points to all lane points in the label.
[0057] Specifically, in order to solve the problems of the prior art, the embodiments of the present application provide a method, device, equipment and storage medium for evaluating a lane detection model. The following first introduces the method for evaluating a lane detection model provided in the embodiments of the present application.
[0058] Figure 1 A schematic diagram of a process flow of a lane detection model evaluation method provided by an embodiment of the present application is shown. The method comprises the following steps:
[0059] S110, acquiring a target image, and N first lane line points and M second lane line points on the target image, wherein the target image includes at least one lane line, the N first lane line points are marked points representing the position of the at least one lane line, and the M second lane line points are points representing the position of the at least one lane line predicted by the lane line detection model, and N and M are positive integers.
[0060] In this embodiment, on a road, lane lines are usually used to mark the boundaries of lanes and the dividing lines between lanes. The target image refers to a road image captured by a camera showing lane lines. In the target image, the lane line is displayed as a line, which can be yellow or white. The lane line point refers to a discrete pixel point used to represent the lane line in the road image.
[0061] Lane line points are usually used to fit the shape and position of lane lines to help autonomous vehicles or driver assistance systems automatically keep the vehicle in the lane. The first lane line point is the accurate lane line point marked by the user on the target image; the second lane line point is the lane line point predicted by the lane line detection model.
[0062] S120, determining a recall rate and a precision rate of the lane line detection model according to the N first lane line points and the M second lane line points.
[0063] In this embodiment, the first lane line point marked by the user can be used as a standard lane line point, and the M second lane line points predicted by the lane line detection model are compared with the N first lane line points, and the performance of the lane line detection model is evaluated based on the comparison results.
[0064] Specifically, the recall rate and precision rate of the lane detection model can be used as indicator parameters to evaluate the accuracy of the lane detection model prediction. Among them, the recall rate refers to the proportion of positive samples correctly identified by the lane detection model, that is, the proportion of correct lane points detected by the lane detection model to all lane points. A high recall rate means that the lane detection model can detect more lane points well.
[0065] Precision refers to the proportion of samples that the lane detection model correctly identifies as positive, that is, the proportion of lane points correctly detected by the lane detection model to all predicted lane points. A high precision means that the lane detection model can accurately detect lane points.
[0066] S130, determining an actual curvature and a predicted curvature of a target lane line according to the N first lane line points and the M second lane line points, wherein the target lane line is any lane line in the target image.
[0067] In this embodiment, the target lane line is any lane line in the target image. The actual curvature of the target lane line can be determined by using the first lane line point representing the target lane line. The actual curvature represents the smoothness of the real target lane line. The predicted curvature of the target lane line is determined by using the second lane line point representing the target lane line. The predicted curvature represents the smoothness of the predicted target lane line. The actual curvature and the predicted curvature of the target lane line can be compared, and the performance of the lane line detection model can be evaluated based on the comparison result.
[0068] S140, evaluating the lane line detection model according to the recall rate, the precision rate, the actual curvature and the predicted curvature to obtain an evaluation result of the lane line detection model.
[0069] In this embodiment, the performance of the lane line detection model refers to how well the model predicts the lane line. The performance of the lane line detection model can be determined by multiple indicators such as recall rate, precision rate, actual curvature and predicted curvature.
[0070] Specifically, the recall rate can represent the proportion of lane line points detected by the lane line detection model to all lane line points, and the precision rate can represent the proportion of correct lane line points detected by the lane line detection model. The comparison result between the actual curvature and the predicted curvature can characterize the accuracy of the curvature of the lane line predicted by the lane line detection model. Therefore, the performance of the lane line detection model can be evaluated based on the above indicators to obtain the evaluation result of the lane line detection model.
[0071] For example, a precision threshold, a recall threshold, and a curvature difference threshold may be determined in advance. If the precision is less than or equal to the precision threshold, the recall is less than or equal to the recall threshold, and the absolute value of the difference between the actual curvature and the predicted curvature is less than or equal to the curvature difference threshold, the evaluation result of the lane line detection model may be considered to be qualified, otherwise, the evaluation result of the lane line detection model may be considered to be unqualified.
[0072] The present application evaluates the lane line detection model by utilizing the recall rate, precision rate of the model, the actual curvature of the lane line, and the predicted curvature of the lane line detection model. Since the accuracy rate refers to the ratio of true positive examples to the number of samples predicted as positive examples, and the recall rate refers to the ratio of true positive examples to the number of samples that are actually positive examples, and the comparison result of the actual curvature and the predicted curvature can measure the degree of standardization and smoothness of the predicted overall lane line, compared with the prior art that only uses the accuracy rate of the lane line detection model to evaluate the lane line detection model, the present application can evaluate the performance of the lane line predicted by the model from multiple dimensions and from the local and overall aspects of the lane line, thereby improving the accuracy of the evaluation.
[0073] As an optional embodiment, determining the recall rate and precision rate of the lane line detection model according to the N first lane line points and the M second lane line points includes:
[0074] Selecting L third lane line points from the M second lane line points according to the N first lane line points, where L is a positive integer less than or equal to N and less than or equal to M;
[0075] The first quotient value with L as the dividend and N as the divisor is determined as the recall rate;
[0076] A second quotient value with L as the dividend and M as the divisor is determined as the accuracy rate.
[0077] In this embodiment, the third lane line point is an accurate lane line point predicted by the lane line detection model. Since the first lane line point is an accurate lane line point marked by the user on the target image, and the second lane line point is a lane line point predicted by the lane line detection model, the second lane line points can be screened. For each second lane line point, if there is a first lane line point that almost overlaps with it, then the second lane line point can be predicted correctly by the lane line detection model and can be determined as the third lane line point.
[0078] In addition, M is the number of lane line points predicted by the lane line detection model, that is, the number of second lane line points; N is the number of lane line points marked by the user, that is, the number of first lane line points; L is the number of lane line points predicted correctly by the lane line detection model, that is, the number of third lane line points.
[0079] Since the recall rate refers to the proportion of positive samples correctly identified by the lane detection model, and the precision rate refers to the proportion of all samples predicted to be positive that are correctly identified by the lane detection model, the ratio of L and N can be determined as the recall rate of the lane detection model, and the ratio of L and M can be determined as the precision rate of the lane detection model.
[0080] As an optional embodiment, the selecting L third lane line points from the M second lane line points according to the N first lane line points includes:
[0081] For any second lane line point among the M second lane line points, if there is a first lane line point whose distance to the second lane line point is less than or equal to a preset first threshold, the second lane line point is determined as a third lane line point.
[0082] In this embodiment, a first threshold may be set in advance. For each second lane line point, if there is a first lane line point on the target image whose distance to the second lane line point is less than or equal to the first threshold, the second lane line point may be considered to be a lane line point correctly predicted by the lane line detection model, i.e., the third lane line point.
[0083] In addition, the third lane line point can be screened from the M second lane line points only by the lateral deviation, that is, for each second lane line point, if there is a first lane line point on the target image whose lateral deviation with the second lane line point is less than or equal to the first threshold, the second lane line point can be considered to be the lane line point predicted correctly by the lane line detection model, that is, the third lane line point.
[0084] For example, a two-dimensional coordinate system may be constructed on the target image, and the two-dimensional coordinates of each first lane line point and each second lane line point on the two-dimensional coordinate system may be determined. The distance between the lane line points is then calculated using the two-dimensional coordinates of the first lane line point and the second lane line point, and the lateral deviation between the lane line points is calculated using the horizontal coordinates of the first lane line point and the second lane line point.
[0085] As an optional embodiment, determining the actual curvature and the predicted curvature of the target lane line according to the N first lane line points and the M second lane line points includes:
[0086] Acquire at least one fifth lane line point for representing the target lane line from the N first lane line points;
[0087] Acquire at least one sixth lane line point for representing the target lane line from the M second lane line points;
[0088] Determining an actual curvature of the target lane line according to the at least one fifth lane line point;
[0089] The predicted curvature of the target lane line is determined according to the at least one sixth lane line point.
[0090] In this embodiment, the target image includes at least one lane line, and any lane line can be selected from the target image as the target lane line. Then, at least one fifth lane line point that is marked by the user and represents the target lane line is screened out from the N first lane line points, and at least one sixth lane line point that is predicted by the lane line detection model and represents the target lane line can also be screened out from the M second lane line points. At least one fifth lane line point can be connected by a smooth curve to obtain a first curve, and the average curvature of the first curve can be calculated as the actual curvature of the target lane line; at least one sixth lane line point can also be connected by a smooth curve to obtain a second curve, and the average curvature of the second curve can be calculated as the predicted curvature of the target lane line. In this way, the actual curvature of any lane line and the predicted curvature predicted by the model can be accurately calculated.
[0091] As an optional embodiment, determining the actual curvature of the target lane line according to the at least one fifth lane line point includes:
[0092] When the number of the at least one fifth lane line point is greater than 3, determining at least one first curvature according to the at least one fifth lane line point, wherein each of the at least one first curvature is the curvature of a curve formed by connecting any three adjacent fifth lane line points among the at least one fifth lane line point;
[0093] An average value of the at least one first curvature is determined as the actual curvature.
[0094] In this embodiment, in the process of calculating the average curvature of the marked target lane line using at least one fifth lane line point, if there are two fifth lane line points, the marked target lane line is a straight line, and thus the curvature of the target lane line is 0.
[0095] If the number of the fifth lane line points is greater than or equal to 3, at least one of the fifth lane line points may be connected by a smooth curve to obtain a first curve, and the average curvature of the first curve may be used as the actual curvature of the target lane line.
[0096] Specifically, in the process of calculating the average curvature of the first curve, a first curvature may be calculated for every three adjacent fifth lane line points in the first curve, and then the average value of all the first curvatures may be determined as the actual curvature of the target lane line.
[0097] For every three adjacent fifth lane line points, a curve segment formed by the three adjacent fifth lane line points may be intercepted, and the curvature at the middle fifth lane line point in the curve segment may be calculated as the first curvature corresponding to the curve segment.
[0098] For example, in the process of calculating the first curvature, a two-dimensional coordinate system can be constructed on the target image, and then for each curve segment composed of three adjacent fifth lane line points, the two-dimensional coordinates of the three adjacent fifth lane line points in the two-dimensional coordinate system are determined respectively.
[0099] The curve parameter equation system can be constructed:
[0100]
[0101] Among them, t is the independent variable of the curve parameter equation, x is the horizontal coordinate in the two-dimensional coordinate system, y is the vertical coordinate in the two-dimensional coordinate system, and x and y are both dependent variables of the curve parameter equation. a1, a2, a3, b1, b2, b3 are constant parameters of the curve parameter equation.
[0102] The two-dimensional coordinates of three adjacent fifth lane line points in the two-dimensional coordinate system can be substituted into the above curve parameter equations to solve a1, a2, a3, b1, b2, b3, and then the first-order derivative and second-order derivative of the dependent variable x and y with respect to the independent variable t are calculated respectively. The process is as follows:
[0103]
[0104]
[0105] From the above, we can see that the first-order derivative of x with respect to t is a2, the second-order derivative of x with respect to t is 2a3, the first-order derivative of y with respect to t is b2, and the second-order derivative of y with respect to t is 2b3. The derivatives can be substituted into the following curvature equation, and the formula is as follows:
[0106]
[0107] Wherein, κ is the first curvature of the curve segment formed by the three adjacent fifth lane line points, x' is the first-order derivative of x, x" is the second-order derivative of x, y' is the first-order derivative of y, and y" is the second-order derivative of y.
[0108] In the above formula, when a2, a3, b2, and b3 are known constants, the first curvature of each curve segment composed of three adjacent fifth lane line points can be calculated, and the average value of all first curvatures can be determined as the actual curvature of the target lane line.
[0109] As an optional embodiment, determining the predicted curvature of the target lane line according to the at least one sixth lane line point includes:
[0110] When the number of the at least one sixth lane line point is greater than 3, determining at least one second curvature according to the at least one sixth lane line point, wherein each of the at least one second curvature is the curvature of a curve formed by connecting any three adjacent sixth lane line points among the at least one sixth lane line point;
[0111] An average value of the at least one second curvature is determined as the predicted curvature.
[0112] In this embodiment, in the process of calculating the average curvature of the target lane line predicted by the model using at least one sixth lane line point, if there are two sixth lane line points, the target lane line predicted by the model is a straight line, and therefore the curvature of the target lane line is 0.
[0113] If the number of sixth lane line points is greater than or equal to 3, at least one sixth lane line point may be connected by a smooth curve to obtain a second curve, and the average curvature of the second curve may be used as the predicted curvature of the target lane line.
[0114] Specifically, in the process of calculating the average curvature of the second curve, a second curvature may be calculated for every three adjacent sixth lane line points in the second curve, and then the average value of all the second curvatures may be determined as the predicted curvature of the target lane line.
[0115] For every three adjacent sixth lane line points, a curve segment formed by the three adjacent sixth lane line points may be intercepted, and the curvature at the middle sixth lane line point in the curve segment may be calculated as the second curvature corresponding to the curve segment.
[0116] As an optional embodiment, the evaluating the lane line detection model according to the recall rate, the precision rate, the actual curvature, and the predicted curvature to obtain an evaluation result of the lane line detection model includes:
[0117] Calculating an absolute value of a difference between the actual curvature and the predicted curvature;
[0118] Determining the accuracy of the lane line detection model according to the N first lane line points and the M second lane line points;
[0119] When the lane line detection model satisfies all model evaluation conditions at the same time, determining the evaluation result of the lane line detection model as having good performance;
[0120] When the lane line detection model does not satisfy any of the following model evaluation conditions, determining the evaluation result of the lane line detection model as having poor performance;
[0121] The model evaluation conditions include:
[0122] The recall rate is greater than a preset recall rate threshold;
[0123] The accuracy is greater than a preset accuracy threshold;
[0124] The absolute value is less than or equal to a preset difference threshold;
[0125] The accuracy is greater than a preset accuracy threshold.
[0126] In this embodiment, the lane detection model is a classification model. For the classification model, the accuracy of the lane detection model refers to the ratio of the number of correctly classified samples to the total number of samples, the precision of the lane detection model refers to the ratio of true positive examples to all samples predicted as positive examples, the recall of the lane detection model refers to the ratio of true positive examples to all samples that are actually positive examples, and the absolute value of the difference between the actual curvature and the predicted curvature can measure the degree of standardization and smoothness of the predicted overall lane line. Therefore, the above recall rate, precision rate, accuracy rate and absolute value can evaluate the performance of the model from different dimensions, so as to obtain a more accurate evaluation result of the model.
[0127] Specifically, the recall rate threshold, precision rate threshold, difference threshold and accuracy rate threshold are all thresholds set in advance by the user. If the recall rate is greater than the preset recall rate threshold, it can be considered that the lane line detection model can detect enough lane line points; if the precision rate is greater than the preset accuracy rate threshold, it can be considered that the number of lane line points correctly detected by the lane line detection model accounts for a large proportion of all predicted lane line points; if the accuracy rate is greater than the preset accuracy rate threshold, it can be considered that the number of lane line points correctly detected by the lane line detection model accounts for a large proportion of all lane line points; if the absolute value is less than or equal to the preset difference threshold, it can be considered that the curvature of the lane line predicted by the model is basically the same as that of the correct lane line. Therefore, only when the above four model evaluation conditions are met at the same time can the performance of the model be considered good, otherwise the performance of the model is considered poor.
[0128] In the above method, the precision and recall rate can be used to intuitively compare the model performance and clearly understand the performance of the model in different classification situations, while the absolute value of the curvature difference can measure the standardization and smoothness of the overall lane line predicted by the model. At the same time, the application of the above indicators can not only evaluate the quality of the lane line predicted by the model from the local and overall aspects of the lane line, but also make a more objective judgment on the model performance from the prediction results.
[0129] Based on the lane line detection model evaluation method provided in the above embodiment, the present application also provides a specific implementation of the lane line detection model evaluation device. Please refer to the following embodiment.
[0130] See first Figure 2 The lane detection model evaluation device 200 provided in the embodiment of the present application includes the following modules:
[0131] An acquisition module 201 is used to acquire a target image, and N first lane line points and M second lane line points on the target image, wherein the target image includes at least one lane line, the N first lane line points are marked points representing the position of the at least one lane line, and the M second lane line points are points representing the position of the at least one lane line predicted by the lane line detection model, and N and M are positive integers;
[0132] A first determination module 202, configured to determine a recall rate and a precision rate of the lane line detection model according to the N first lane line points and the M second lane line points;
[0133] A second determination module 203, configured to determine an actual curvature and a predicted curvature of a target lane line according to the N first lane line points and the M second lane line points, wherein the target lane line is any lane line in the target image;
[0134] The evaluation module 204 is used to evaluate the lane detection model according to the recall rate, the precision rate, the actual curvature and the predicted curvature to obtain an evaluation result of the lane detection model.
[0135] The device can evaluate the lane line detection model by using the model's recall rate, precision rate, and the actual curvature of the lane line and the predicted curvature of the lane line detection model. Since the accuracy rate refers to the ratio of true positive examples to all samples predicted as positive examples, and the recall rate refers to the ratio of true positive examples to all samples that are actually positive examples, and the comparison result of the actual curvature and the predicted curvature can measure the standardization and smoothness of the predicted overall lane line, compared with the prior art that only uses the accuracy rate of the lane line detection model to evaluate the lane line detection model, the present application can evaluate the performance of the lane line predicted by the model from multiple dimensions and from the local and overall aspects of the lane line, thereby improving the accuracy of the model evaluation.
[0136] As an implementation of the present application, the first determining module 202 may further include:
[0137] a selection unit, configured to select L third lane line points from the M second lane line points according to the N first lane line points, wherein L is a positive integer less than or equal to N and less than or equal to M;
[0138] A first calculation module, used for determining a first quotient value with L as the dividend and N as the divisor as the recall rate;
[0139] The second calculation module is used to determine a second quotient value with L as the dividend and M as the divisor as the accuracy rate.
[0140] As an implementation of the present application, the above-mentioned selection unit can also be used for:
[0141] For any second lane line point among the M second lane line points, if there is a first lane line point whose distance to the second lane line point is less than or equal to a preset first threshold, the second lane line point is determined as a third lane line point.
[0142] As an implementation of the present application, the second determination module may further include:
[0143] A first acquisition unit, configured to acquire at least one fifth lane line point representing the target lane line from the N first lane line points;
[0144] A second acquisition unit, used to acquire at least one sixth lane line point for representing the target lane line from the M second lane line points;
[0145] A first determining unit, configured to determine an actual curvature of the target lane line according to the at least one fifth lane line point;
[0146] The second determining unit is used to determine the predicted curvature of the target lane line according to the at least one sixth lane line point.
[0147] As an implementation of the present application, the first determining unit may also be used to:
[0148] When the number of the at least one fifth lane line point is greater than 3, determining at least one first curvature according to the at least one fifth lane line point, wherein each of the at least one first curvature is the curvature of a curve formed by connecting any three adjacent fifth lane line points among the at least one fifth lane line point;
[0149] An average value of the at least one first curvature is determined as the actual curvature.
[0150] As an implementation of the present application, the second determining unit may also be used to:
[0151] When the number of the at least one sixth lane line point is greater than 3, determining at least one second curvature according to the at least one sixth lane line point, wherein each of the at least one second curvature is the curvature of a curve formed by connecting any three adjacent sixth lane line points among the at least one sixth lane line point;
[0152] An average value of the at least one second curvature is determined as the predicted curvature.
[0153] As an implementation of the present application, the evaluation module 204 may also be used to:
[0154] Calculating an absolute value of a difference between the actual curvature and the predicted curvature;
[0155] Determining the accuracy of the lane line detection model according to the N first lane line points and the M second lane line points;
[0156] When the lane line detection model satisfies all model evaluation conditions at the same time, determining the evaluation result of the lane line detection model as having good performance;
[0157] When the lane line detection model does not satisfy any of the following model evaluation conditions, determining the evaluation result of the lane line detection model as having poor performance;
[0158] The model evaluation conditions include:
[0159] The recall rate is greater than a preset recall rate threshold;
[0160] The accuracy is greater than a preset accuracy threshold;
[0161] The absolute value is less than or equal to a preset difference threshold;
[0162] The accuracy is greater than a preset accuracy threshold.
[0163] The lane line detection model evaluation device provided in the embodiment of the present invention can implement each step in the above method embodiment, and will not be described again here to avoid repetition.
[0164] Figure 3 A schematic diagram of the hardware structure of an evaluation device for a lane detection model provided in an embodiment of the present application is shown.
[0165] The lane detection model evaluation device may include a processor 301 and a memory 302 storing computer program instructions.
[0166] Specifically, the processor 301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0167] The memory 302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 302 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid-state memory.
[0168] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0169] The processor 301 implements any lane detection model evaluation method in the above embodiments by reading and executing computer program instructions stored in the memory 302 .
[0170] In one example, the lane line detection model evaluation device may further include a communication interface 303 and a bus 310. Figure 3 As shown, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 and communicate with each other.
[0171] The communication interface 303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0172] Bus 310 includes hardware, software or both, and the components of the evaluation device of the lane detection model are coupled to each other. For example, but not limitation, the bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnect (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 310 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0173] The lane line detection model evaluation device may be based on the above-mentioned embodiment, thereby realizing the evaluation method and apparatus combined with the above-mentioned lane line detection model.
[0174] In addition, in combination with the lane line detection model evaluation method in the above-mentioned embodiment, the embodiment of the present application may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any lane line detection model evaluation method in the above-mentioned embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here. Among them, the above-mentioned computer-readable storage medium may include a non-transitory computer-readable storage medium, such as a read-only memory (Read-Only Memory, referred to as ROM), a random access memory (Random Access Memory, referred to as RAM), a disk or an optical disk, etc., which are not limited here.
[0175] In addition, an embodiment of the present application further provides a computer program product, including computer program instructions, which can implement the steps and corresponding contents of the aforementioned method embodiment when the computer program instructions are executed by a processor.
[0176] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0177] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0178] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0179] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0180] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A lane detection model evaluation method, characterized in that: The method comprises: Acquire a target image, and N first lane line points and M second lane line points on the target image, wherein the target image includes at least one lane line, the N first lane line points are marked points representing the position of the at least one lane line, and the M second lane line points are points representing the position of the at least one lane line predicted by the lane line detection model, and N and M are positive integers; Determining a recall rate and a precision rate of the lane line detection model according to the N first lane line points and the M second lane line points; Determining an actual curvature and a predicted curvature of a target lane line according to the N first lane line points and the M second lane line points, wherein the target lane line is any lane line in the target image; The lane line detection model is evaluated according to the recall rate, the precision rate, the actual curvature and the predicted curvature to obtain an evaluation result of the lane line detection model.
2. The lane detection model evaluation method according to claim 1, characterized in that: The determining the recall rate and the precision rate of the lane line detection model according to the N first lane line points and the M second lane line points includes: Selecting L third lane line points from the M second lane line points according to the N first lane line points, where L is a positive integer less than or equal to N and less than or equal to M; The first quotient value with L as the dividend and N as the divisor is determined as the recall rate; A second quotient value with L as the dividend and M as the divisor is determined as the accuracy rate.
3. The lane detection model evaluation method according to claim 2, characterized in that: The selecting L third lane line points from the M second lane line points according to the N first lane line points includes: For any second lane line point among the M second lane line points, if there is a first lane line point whose distance to the second lane line point is less than or equal to a preset first threshold, the second lane line point is determined as a third lane line point.
4. The lane detection model evaluation method according to claim 1, characterized in that: The determining the actual curvature and the predicted curvature of the target lane line according to the N first lane line points and the M second lane line points includes: Acquire at least one fifth lane line point for representing the target lane line from the N first lane line points; Acquire at least one sixth lane line point for representing the target lane line from the M second lane line points; Determining an actual curvature of the target lane line according to the at least one fifth lane line point; The predicted curvature of the target lane line is determined according to the at least one sixth lane line point.
5. The lane detection model evaluation method according to claim 4, characterized in that: The determining the actual curvature of the target lane line according to the at least one fifth lane line point comprises: When the number of the at least one fifth lane line point is greater than 3, determining at least one first curvature according to the at least one fifth lane line point, wherein each of the at least one first curvature is the curvature of a curve formed by connecting any three adjacent fifth lane line points among the at least one fifth lane line point; An average value of the at least one first curvature is determined as the actual curvature.
6. The lane detection model evaluation method according to claim 1, characterized in that: The determining the predicted curvature of the target lane line according to the at least one sixth lane line point comprises: When the number of the at least one sixth lane line point is greater than 3, determining at least one second curvature according to the at least one sixth lane line point, wherein each of the at least one second curvature is the curvature of a curve formed by connecting any three adjacent sixth lane line points among the at least one sixth lane line point; An average value of the at least one second curvature is determined as the predicted curvature.
7. The lane detection model evaluation method according to claim 1, characterized in that: The evaluating the lane line detection model according to the recall rate, the precision rate, the actual curvature and the predicted curvature to obtain an evaluation result of the lane line detection model includes: Calculating an absolute value of a difference between the actual curvature and the predicted curvature; Determining the accuracy of the lane line detection model according to the N first lane line points and the M second lane line points; When the lane line detection model satisfies all model evaluation conditions at the same time, determining the evaluation result of the lane line detection model as having good performance; When the lane line detection model does not satisfy any of the following model evaluation conditions, determining the evaluation result of the lane line detection model as having poor performance; The model evaluation conditions include: The recall rate is greater than a preset recall rate threshold; The accuracy is greater than a preset accuracy threshold; The absolute value is less than or equal to a preset difference threshold; The accuracy is greater than a preset accuracy threshold.
8. A lane detection model evaluation device, characterized in that: The device comprises: an acquisition module, configured to acquire a target image, and N first lane line points and M second lane line points on the target image, wherein the target image includes at least one lane line, the N first lane line points are annotated points representing the position of the at least one lane line, and the M second lane line points are points representing the position of the at least one lane line predicted by the lane line detection model, and N and M are positive integers; A first determination module, configured to determine a recall rate and a precision rate of the lane line detection model according to the N first lane line points and the M second lane line points; A second determination module, configured to determine an actual curvature and a predicted curvature of a target lane line according to the N first lane line points and the M second lane line points, wherein the target lane line is any lane line in the target image; An evaluation module is used to evaluate the lane line detection model according to the recall rate, the precision rate, the actual curvature and the predicted curvature to obtain an evaluation result of the lane line detection model.
9. A lane detection model evaluation device, characterized in that: The lane detection model evaluation device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the lane line detection model evaluation method according to any one of claims 1 to 7 is implemented.
10. A computer storage medium, characterized in that: The computer storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the lane line detection model evaluation method according to any one of claims 1 to 7 is implemented.