Lane line detection algorithm test method and system based on digital attack
By adding digital anti-perturbation using projection gradient descent method on the lane line detection dataset, the performance of the autonomous driving lane line detection algorithm is evaluated, and the problems of insufficient anti-interference ability are solved, and the identification accuracy and safety are improved.
Patent Information
- Application Number
- CN202411862028.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-17
AI Technical Summary
The autonomous driving lane line detection technology faces the problems of complex traffic environment, lighting changes, lane line wear, stains, aging, shading and insufficient anti-interference ability, which has affected the identification accuracy and safety.
The digital attack method based on the projection gradient descent method is adopted to add digital anti-perturbation to the lane line detection data set, and the performance of the lane line detection algorithm is evaluated by decreasing the floating value and anti-interference degree of F1 value, providing safety assessment and performance improvement.
Through digital attack methods, misjudgment problems of autonomous vehicles can be discovered and dealt with in a timely manner, the identification accuracy and anti-interference ability of lane line detection algorithms can be improved, and the development time and R&D costs can be reduced.
Smart Images

Figure CN119807045A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of lane line detection, and in particular to a lane line detection algorithm testing method and system based on digital attack. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] Lane detection technology is an important part of autonomous driving and intelligent transportation systems. It can help vehicles identify lane lines during driving, thereby maintaining the correct driving trajectory and driving safety. In the rapidly developing field of autonomous driving, in order to ensure that vehicles can drive normally, unmanned vehicles are required to have a series of functions such as automatic cruise driving and lane keeping tracking. To achieve this function, whether the lane lines can be accurately detected and the timeliness of the detection play a vital role.
[0004] However, the development of autonomous driving lane detection technology faces many challenges:
[0005] 1. Complex and changeable traffic environment: The autonomous driving system has difficulty adapting to the complex and changeable traffic environment, and may make mistakes in identifying obstacles and other vehicles, leading to accidents;
[0006] 2. Light changes: Light changes in different seasons, time periods and weather conditions may affect lane detection, greatly reducing the visibility of lanes and making detection difficult.
[0007] 3. Lane line wear, stains and aging: Over time, lane lines may become blurred or unclear due to wear, stains or other factors, which will make lane line detection difficult;
[0008] 4. Occlusion problem: Other vehicles, pedestrians, or other objects may block lane lines, especially in busy traffic sections, which will bring challenges to lane line detection;
[0009] 5. Anti-interference capability: Lane line detection also needs to face challenges such as interference from false lane lines, traffic signs and road markings, as well as changes in weather and road conditions, and requires strong anti-interference capabilities. Summary of the invention
[0010] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a lane line detection algorithm testing method and system based on digital attack. Based on the projected gradient descent method, digital adversarial disturbance is added to the lane line detection data set, and the performance of the lane line detection algorithm is judged by the decreasing floating value and anti-interference degree of the data evaluation index F1 value, thereby providing a safety evaluation for the autonomous driving lane line detection algorithm. It plays an extremely important role in timely discovering and handling the misjudgment or inability to correctly identify problems of autonomous driving vehicles, timely discovering and handling data security issues and protecting the privacy of autonomous driving data, improving the recognition accuracy of the lane line detection algorithm, and enhancing the performance of the lane line detection model, and greatly reduces the development time and R&D cost of the autonomous driving lane line detection algorithm.
[0011] In order to achieve the above object, the present invention adopts the following technical solution:
[0012] A first aspect of the present invention provides a lane detection algorithm testing method based on digital attack, which comprises:
[0013] Obtain a non-attack dataset and a lane detection model to be tested;
[0014] Using a projected gradient descent method to add digital adversarial interference to each image in the non-attacked data set to obtain a post-attack data set;
[0015] For the non-attack data set and the post-attack data set, the lane line detection model performs lane line detection respectively. After obtaining two recognition results, the F1 value decrease amplitude and anti-interference degree are calculated based on the two recognition results to determine whether the lane line detection model meets the requirements.
[0016] Furthermore, the anti-interference degree is:
[0017]
[0018] Among them, yi0 represents the real lane line of the i-th sample in the non-attack dataset, yi1 represents the lane line identified by the lane line detection model for the i-th sample in the non-attack dataset, yi2 represents the lane line identified by the lane line detection model for the i-th sample in the attacked dataset, n is the number of samples in the non-attack dataset, and δi represents the digital adversarial interference added to the i-th sample in the non-attack dataset.
[0019] Furthermore, the steps of the projected gradient descent method include:
[0020] For each sample in the non-attack dataset, one loss or a weighted combination of multiple losses is selected from key point estimation loss, position compensation loss, starting point regression loss, and feature aggregation loss as the loss function.
[0021] For each iteration, the following steps are performed: input the sample into the standard lane detection model, and after obtaining the output of the standard lane detection model, the loss value is calculated according to the loss function; the gradient of the loss value is back-propagated with respect to the sample, and the digital adversarial interference and sample are updated;
[0022] After a set number of iterations, the samples obtained are post-attack samples, and all post-attack samples are combined to obtain the post-attack data set.
[0023] Furthermore, the standard lane line detection model is a global association network.
[0024] A second aspect of the present invention provides a lane detection algorithm testing system based on digital attack, comprising:
[0025] A data acquisition module, configured to: acquire a non-attack data set and a lane line detection model to be tested;
[0026] A digital attack module is configured to: add digital adversarial interference to each image in the non-attack data set using a projected gradient descent method to obtain a post-attack data set;
[0027] The test module is configured as follows: for a non-attack data set and a post-attack data set, the lane line detection model performs lane line detection respectively, and after obtaining two recognition results, calculates the F1 value decrease amplitude and anti-interference degree based on the two recognition results to determine whether the lane line detection model meets the requirements.
[0028] Furthermore, the anti-interference degree is:
[0029]
[0030] Among them, yi0 represents the real lane line of the i-th sample in the non-attack dataset, yi1 represents the lane line identified by the lane line detection model for the i-th sample in the non-attack dataset, yi2 represents the lane line identified by the lane line detection model for the i-th sample in the attacked dataset, n is the number of samples in the non-attack dataset, and δi represents the digital adversarial interference added to the i-th sample in the non-attack dataset.
[0031] Furthermore, the steps of the projected gradient descent method include:
[0032] For each sample in the non-attack dataset, one loss or a weighted combination of multiple losses is selected from key point estimation loss, position compensation loss, starting point regression loss, and feature aggregation loss as the loss function.
[0033] For each iteration, the following steps are performed: input the sample into the standard lane detection model, and after obtaining the output of the standard lane detection model, the loss value is calculated according to the loss function; the gradient of the loss value is back-propagated with respect to the sample, and the digital adversarial interference and sample are updated;
[0034] After a set number of iterations, the samples obtained are post-attack samples, and all post-attack samples are combined to obtain the post-attack data set.
[0035] Furthermore, the standard lane line detection model is a global association network.
[0036] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the lane line detection algorithm testing method based on digital attack as described above.
[0037] The fourth aspect of the present invention provides a computer device, including a computer-readable storage medium, a processor, and a computer program stored on the computer-readable storage medium and executable on the processor, wherein when the processor executes the program, the steps in the lane line detection algorithm testing method based on digital attack as described above are implemented.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] The present invention adds digital adversarial disturbances to the lane line detection data set based on the projected gradient descent method, and judges the performance of the lane line detection algorithm through the declining floating value and anti-interference degree of the data evaluation index F1score, thereby providing a safety evaluation for the autonomous driving lane line detection algorithm. It is extremely important for timely discovering and handling misjudgment or inability to correctly identify problems of autonomous driving vehicles, timely discovering and handling data security issues and protecting autonomous driving data privacy, improving the recognition accuracy of the lane line detection algorithm, and enhancing the performance of the lane line detection model. It greatly reduces the development time and R&D cost of the autonomous driving lane line detection algorithm, and has important research significance and commercial application value in the fields of artificial intelligence, data security and autonomous driving. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0041] Figure 1 is a flow chart of a lane detection algorithm testing method based on digital attack according to Embodiment 1 of the present invention;
[0042] Figure 2This is a diagram showing the effect of adding digital noise to the CULane dataset according to the first embodiment of the present invention;
[0043] Figure 3 It is a structural diagram of a computer device according to a fourth embodiment of the present invention. DETAILED DESCRIPTION
[0044] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0045] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0046] Embodiment 1
[0047] In order to comprehensively evaluate and verify the comprehensive performance of the lane line detection capability of the autonomous driving vehicle and ensure the safe and smooth operation of the autonomous driving vehicle, this embodiment provides a lane line detection algorithm testing method based on digital attack to comprehensively evaluate the lane line model detection capability.
[0048] This embodiment provides a lane line detection algorithm testing method based on digital attack. Based on the projected gradient descent (PGD) method, digital adversarial disturbance is added to the lane line detection data set CULane, the recognition accuracy before and after the attack obtained by the lane line detection model is compared, and the performance of the lane line detection algorithm is judged by the decreased floating value and anti-interference degree of the data evaluation index F1score, thereby providing a safety evaluation for the autonomous driving lane line detection algorithm. It plays an extremely important role in timely discovering and handling the misjudgment or inability to correctly identify problems of autonomous driving vehicles, timely discovering and handling data security issues and protecting autonomous driving data privacy, improving the recognition accuracy of the lane line detection algorithm, and enhancing the performance of the model. It greatly reduces the development time and R&D cost of the autonomous driving lane line detection algorithm, and has important research significance and commercial application value in the fields of artificial intelligence, data security and autonomous driving.
[0049] This embodiment provides a lane detection algorithm testing method based on digital attack, such as Figure 1 As shown, the following steps are included:
[0050] S1: Model training: The lane detection model GANet is trained based on the CULane dataset. The model is set for 60 epochs. The training environment is Ubuntu 20.04, the pytorch version is 1.7, the cuda version is 10.1, and the CUDA Toolkit version is 10.1.
[0051] S2: Clean data set test: Call the test program to generate test annotation information based on the GANet network and CULane data set to complete the test of the non-attack data set.
[0052] S3: Index calculation: Lane detection index calculation is completed based on the GANet network (Global Association Network). The evaluation index is F1score, so as to obtain the recognition accuracy of the GANet network based on a pure data set.
[0053] S4: Add digital adversarial perturbations: Add digital adversarial perturbations to the CULane dataset. The basic principle is to add perturbations to the loss function of GANet.
[0054] GANet’s loss function L total There are four parts in total: point (Keypoint Estimation), L quant (Position compensation), L offset (Original point regression) and L aux (Feature aggregation), whose mathematical expressions are shown in Formula 1-1 to Formula 1-5 respectively:
[0055]
[0056] Among them, λ point , quant , offset and λ aux are weights; the subscript yx indicates the value at the coordinate (x, y); H′ and W′ are size parameters; and Y yx are the predicted value and true value of the key points respectively; α and β are hyperparameters; Represents the predicted compensation amount at each position (y, x) The actual compensation value δ yx The absolute error between is the prediction offset, O yx is the real offset; K represents the number of key points on each lane line, N represents the number of key points on the lane line, and M represents the number of samples of adjacent key points; is the true value of the offset between the i-th key point and the key point m on the corresponding lane line, is the predicted value of the offset between the i-th key point and the predicted key point m on the lane line.
[0057] In this step, the PGD algorithm is used to add digital attack disturbances. The number of iterations of the PGD algorithm is pgd_iters = 20, the threshold eps = 76, and the disturbance factor alpha = 2. The algorithm principle formula 1-6 is shown, so that the loss function L total Reverse optimization is performed to change the pixel values of the input image. Reverse optimization is performed on four different losses, which causes deviations in the positions of the output lane lines. The effect of adding digital noise to the CULane dataset is shown in the figure below. Figure 2 shown.
[0058]
[0059] The specific steps are as follows:
[0060] S401: Initialization: For each image xi in the pure data set (no attack data set), set the upper limit S of the perturbation, the number of iterations T, and the parameter α, and initialize the perturbation δ 0 is 0, at L point (Keypoint Estimation), L quant (Position compensation), L offset (Original point regression) and L aux (Feature Aggregation) selects one or more weighted ones as the application loss function L(θ,x,y).
[0061] S402: Calculate the initial perturbed image x t =xi+δ 0 ;
[0062] S403: Iterative update. For each iteration t, the following steps are performed:
[0063] The perturbed image x t The input x is input into the standard lane detection model GANet to obtain the output y of the lane detection model GANet, and then the loss value is calculated according to the loss function L(θ,x,y).
[0064] The loss function L(θ,x,y) is about the perturbed image x t Perform back propagation to find the gradient and get the gradient And update the disturbance (digital countermeasure interference) as
[0065] The perturbed image (sample) is updated according to the gradient, and the updating formula is Formula 1-6.
[0066] S404: After T iterations, the final perturbed image x TIt is to add the image after digital attack disturbance and output as the final perturbation δi of image xi.
[0067] S5: Index calculation: Based on any trained lane detection network (lane detection model to be tested), the lane detection dataset before and after the attack is tested, and its recognition accuracy is calculated. The evaluation indicators include the F1-score (F1 value) decrease P and the anti-interference degree D.
[0068] Regarding F1score and its decrease: Based on step S3 and step S5, the fluctuation range of GANet’s recognition accuracy for lane line detection in the CULane dataset before and after adding digital attacks is compared. The comparison results are shown in Table 1. From Table 1, it can be seen that the recognition accuracy of the GANet model on non-attacked images is 78.78%, and the recognition accuracy on images after adding digital attacks is 37.43%, a decrease of 41.35%, which provides a safety evaluation for the autonomous driving lane line recognition algorithm and provides an important basis for the performance detection of the lane line detection algorithm.
[0069] Table 1. Comparison of accurate identification before and after digital attack
[0070]
[0071] For the anti-interference degree, the calculation formula is: Among them, yi0 represents the real lane line of the i-th sample in the dataset, yi1 represents the predicted lane line of the i-th sample in the pure dataset, yi2 represents the predicted lane line of the i-th sample in the dataset after the attack, and n is the number of samples in the dataset.
[0072] S6: Determine whether the lane detection model meets the requirements based on the weighted values of the F1 value drop P and the anti-interference degree D. The weights of the F1 value drop P and the anti-interference degree D are obtained through a large number of experiments. When the weighted values of the two are greater than the set threshold, it is considered that the recognition accuracy of the lane detection model is high and meets the requirements.
[0073] This embodiment provides a lane line detection algorithm testing method based on digital attacks, which uses the PGD algorithm to add digital attack textures to the CULane data set, simulates malicious attacks such as noise pollution and data poisoning during the driving process of an autonomous driving vehicle, verifies the recognition accuracy of the lane line detection algorithm based on different evaluation indicators, and compares the changes in the F1score value before and after the attack and the anti-interference degree D of the lane line detection algorithm, thereby verifying the performance of the autonomous driving lane line detection algorithm, providing a safety evaluation for the autonomous driving lane line detection algorithm, greatly saving the research and development cost of autonomous driving vehicles, reducing the actual road test time of autonomous driving vehicles, and improving the performance of the lane line detection algorithm.
[0074] Embodiment 2
[0075] This embodiment provides a lane detection algorithm testing system based on digital attack, which specifically includes:
[0076] A data acquisition module, configured to: acquire a non-attack data set and a lane line detection model to be tested;
[0077] A digital attack module is configured to: add digital adversarial interference to each image in the non-attack data set using a projected gradient descent method to obtain a post-attack data set;
[0078] The test module is configured as follows: for a non-attack data set and a post-attack data set, the lane line detection model performs lane line detection respectively, and after obtaining two recognition results, calculates the F1 value decrease amplitude and anti-interference degree based on the two recognition results to determine whether the lane line detection model meets the requirements.
[0079] The anti-interference degree is:
[0080]
[0081] Among them, yi0 represents the real lane line of the i-th sample in the non-attack dataset, yi1 represents the lane line identified by the lane line detection model for the i-th sample in the non-attack dataset, yi2 represents the lane line identified by the lane line detection model for the i-th sample in the attacked dataset, n is the number of samples in the non-attack dataset, and δi represents the digital adversarial interference added to the i-th sample in the non-attack dataset.
[0082] The steps of projected gradient descent method include:
[0083] For each sample in the non-attack dataset, one loss or a weighted combination of multiple losses is selected from key point estimation loss, position compensation loss, starting point regression loss, and feature aggregation loss as the loss function.
[0084] For each iteration, the following steps are performed: input the sample into the standard lane detection model, and after obtaining the output of the standard lane detection model, the loss value is calculated according to the loss function; the gradient of the loss value is back-propagated with respect to the sample, and the digital adversarial interference and sample are updated;
[0085] After a set number of iterations, the samples obtained are post-attack samples, and all post-attack samples are combined to obtain the post-attack data set.
[0086] The standard lane detection model is a global association network.
[0087] It should be noted here that the various modules in this embodiment correspond one-to-one to the various steps in Example 1, and the specific implementation process is the same, which will not be repeated here.
[0088] Embodiment 3
[0089] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the lane detection algorithm testing method based on digital attack as described in the first embodiment above are implemented.
[0090] Embodiment 4
[0091] This embodiment provides a computer device, such as Figure 3 As shown, it includes a display device, an input device, a computer-readable storage medium (volatile memory and non-volatile storage medium), a processor, a communication interface (i.e., a network interface), and a computer program stored on the computer-readable storage medium and executable on the processor, wherein the processor, the communication interface, and the computer-readable storage medium may be connected via a bus or other means. The communication interface is used to receive and send data, and when the processor executes the program, the steps in the lane detection algorithm testing method based on digital attack as described in the first embodiment above are implemented.
[0092] Among them, any reference to memory, storage, database or other media provided by the present application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0093] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
Claims
1. A lane detection algorithm testing method based on digital attack, characterized in that: include: Obtain a non-attack dataset and a lane detection model to be tested; Using a projected gradient descent method to add digital adversarial interference to each image in the non-attacked data set to obtain a post-attack data set; For the non-attack data set and the post-attack data set, the lane line detection model performs lane line detection respectively. After obtaining two recognition results, the F1 value decrease amplitude and anti-interference degree are calculated based on the two recognition results to determine whether the lane line detection model meets the requirements.
2. A lane detection algorithm testing method based on digital attack as claimed in claim 1, characterized in that: The anti-interference degree is: Among them, yi0 represents the real lane line of the i-th sample in the non-attack dataset, yi1 represents the lane line identified by the lane line detection model for the i-th sample in the non-attack dataset, yi2 represents the lane line identified by the lane line detection model for the i-th sample in the attacked dataset, n is the number of samples in the non-attack dataset, and δi represents the digital adversarial interference added to the i-th sample in the non-attack dataset.
3. A lane detection algorithm testing method based on digital attack as claimed in claim 1, characterized in that: The steps of the projected gradient descent method include: For each sample in the non-attack dataset, one loss or a weighted combination of multiple losses is selected from key point estimation loss, position compensation loss, starting point regression loss, and feature aggregation loss as the loss function. For each iteration, the following steps are performed: input the sample into the standard lane detection model, and after obtaining the output of the standard lane detection model, the loss value is calculated according to the loss function; the gradient of the loss value is back-propagated with respect to the sample, and the digital adversarial interference and sample are updated; After a set number of iterations, the samples obtained are post-attack samples, and all post-attack samples are combined to obtain the post-attack data set.
4. A lane detection algorithm testing method based on digital attack as claimed in claim 3, characterized in that: The standard lane detection model is a global association network.
5. A lane detection algorithm testing system based on digital attack, characterized in that: include: A data acquisition module, configured to: acquire a non-attack data set and a lane line detection model to be tested; A digital attack module is configured to: add digital adversarial interference to each image in the non-attack data set using a projected gradient descent method to obtain a post-attack data set; The test module is configured as follows: for a non-attack data set and a post-attack data set, the lane line detection model performs lane line detection respectively, and after obtaining two recognition results, calculates the F1 value decrease amplitude and anti-interference degree based on the two recognition results to determine whether the lane line detection model meets the requirements.
6. A lane detection algorithm testing system based on digital attack as claimed in claim 5, characterized in that: The anti-interference degree is: Among them, yi0 represents the real lane line of the i-th sample in the non-attack dataset, yi1 represents the lane line identified by the lane line detection model for the i-th sample in the non-attack dataset, yi2 represents the lane line identified by the lane line detection model for the i-th sample in the attacked dataset, n is the number of samples in the non-attack dataset, and δi represents the digital adversarial interference added to the i-th sample in the non-attack dataset.
7. A lane detection algorithm testing system based on digital attack as claimed in claim 5, characterized in that: The steps of the projected gradient descent method include: For each sample in the non-attack dataset, one loss or a weighted combination of multiple losses is selected from key point estimation loss, position compensation loss, starting point regression loss, and feature aggregation loss as the loss function. For each iteration, the following steps are performed: input the sample into the standard lane detection model, and after obtaining the output of the standard lane detection model, the loss value is calculated according to the loss function; the gradient of the loss value is back-propagated with respect to the sample, and the digital adversarial interference and sample are updated; After a set number of iterations, the samples obtained are post-attack samples, and all post-attack samples are combined to obtain the post-attack data set.
8. A lane detection algorithm testing system based on digital attack as claimed in claim 7, characterized in that: The standard lane detection model is a global association network.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in a lane line detection algorithm testing method based on digital attack as described in any one of claims 1 to 4 are implemented.
10. A computer device comprising a computer-readable storage medium, a processor, and a computer program stored in the computer-readable storage medium and executable on the processor, characterized in that: When the processor executes the program, the steps in the lane line detection algorithm testing method based on digital attack as described in any one of claims 1-4 are implemented.
Citation Information
Patent Citations
Black box anti-attack method for malicious code detection system
CN115062306A
Lane line detection model backdoor attack method
CN117875405A
Target detection network robustness improvement method based on disturbance amplitude adaptive control
CN118196591A
Test method for electromagnetic interference rejection test of low-noise amplifier and related equipment
CN118837643A
Training method for robust neural network based on feature matching
US20230089335A1