A testing method and system for lane detection algorithms based on digital attacks
By adding digital adversarial perturbations to the lane detection dataset, the performance of the lane detection algorithm is evaluated using the projective gradient descent method. This solves the complexity and anti-interference problems of lane detection in autonomous driving, improves recognition accuracy and safety, and reduces R&D costs.
Patent Information
- Application Number
- CN202411862028.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-12-17
AI Technical Summary
Autonomous driving lane detection technology faces challenges such as complex and ever-changing traffic environments, lighting variations, lane line wear, dirt and aging, occlusion issues, and insufficient anti-interference capabilities, leading to detection difficulties and misjudgments.
The projective gradient descent method is used to add digital adversarial perturbations to the lane detection dataset. The performance of the lane detection algorithm is judged by the decrease fluctuation value of the F1 value and the anti-interference degree of the data evaluation index, and a safety evaluation method is provided.
It improves the recognition accuracy of lane line detection algorithms, enhances the model's anti-interference ability, reduces development time and R&D costs, and ensures the safety and data privacy of autonomous vehicles.
Smart Images

Figure CN119807045B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of lane line detection technology, and in particular relates to a testing method and system for lane line detection algorithms based on digital attacks. Background Technology
[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.
[0003] Lane detection technology is an important component of autonomous driving and intelligent transportation systems. It helps vehicles identify lane lines during driving, thereby maintaining the correct driving trajectory and ensuring driving safety. In the rapidly developing field of autonomous driving, in order to ensure that vehicles can drive normally, driverless vehicles need to have a series of functions such as automatic cruise control and lane keeping tracking. To achieve this function, the ability to accurately detect lane lines and the timeliness of detection play a crucial role.
[0004] However, the development of lane detection technology for autonomous driving faces many challenges:
[0005] 1. Complex and ever-changing traffic environment: Autonomous driving systems have difficulty adapting to complex and ever-changing traffic environments and may make mistakes in recognizing obstacles and other vehicles, leading to accidents;
[0006] 2. Lighting variations: Lighting variations in different seasons, time of day, and weather conditions can all affect lane line detection, greatly reducing the visibility of lane lines and making detection more 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 can make lane line detection difficult;
[0008] 4. Obstruction issue: Other vehicles, pedestrians or other objects may obstruct lane lines, especially in busy road sections, which poses a challenge 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, requiring strong anti-interference capability. Summary of the Invention
[0010] To address the technical problems mentioned above, this invention provides a testing method and system for lane detection algorithms based on digital attacks. It adds digital adversarial perturbations to the lane detection dataset using the projected gradient descent method. The performance of the lane detection algorithm is judged by the decrease and fluctuation of the F1 score and the anti-interference degree, thus providing a safety evaluation for autonomous driving lane detection algorithms. This method plays a crucial role in timely detection and handling of misjudgments or inability to correctly identify lanes in autonomous vehicles, timely detection and handling of data security issues, protection of autonomous driving data privacy, improvement of lane detection algorithm recognition accuracy, and enhancement of lane detection model performance. Furthermore, it significantly reduces the development time and R&D costs of autonomous driving lane detection algorithms.
[0011] To achieve the above objectives, the present invention adopts the following technical solution:
[0012] The first aspect of this invention provides a testing method for lane detection algorithms based on digital attacks, comprising:
[0013] Obtain an attack-free dataset and a lane detection model to be tested;
[0014] Digital adversarial interference was added to each image in the attack-free dataset using the projective gradient descent method to obtain the attacked dataset.
[0015] For both the attack-free dataset and the post-attack dataset, the lane detection model performs lane detection separately, obtaining two recognition results. Based on these two results, the decrease in F1 score and the anti-interference level are calculated to determine whether the lane detection model meets the requirements.
[0016] Furthermore, the interference resistance is:
[0017]
[0018] Where yi0 represents the true lane line of the i-th sample in the attack-free dataset, yi1 represents the lane line identified by the lane line detection model for the i-th sample in the attack-free 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 attack-free dataset, and δi represents the digital adversarial interference added to the i-th sample in the attack-free dataset.
[0019] Furthermore, the steps of the projected gradient descent method include:
[0020] For each sample in the attack-free dataset, one or more losses are selected as a weighted average of the keypoint estimation loss, location 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 samples into the standard lane detection model, obtain the output of the standard lane detection model, calculate the loss value according to the loss function, backpropagate the loss value with respect to the samples to obtain the gradient, and update the digital adversarial interference and samples;
[0022] After a set number of iterations, the resulting samples are the post-attack samples. Combining all the post-attack samples yields the post-attack dataset.
[0023] Furthermore, the standard lane line detection model is a globally correlated network.
[0024] A second aspect of the present invention provides a lane detection algorithm testing system based on digital attacks, comprising:
[0025] The data acquisition module is configured to acquire an attack-free dataset and a lane detection model to be tested.
[0026] The digital attack module is configured to add digital adversarial interference to each image in the non-attack dataset using the projective gradient descent method to obtain the attacked dataset.
[0027] The testing module is configured to: perform lane line detection on the non-attack dataset and the post-attack dataset respectively, obtain two recognition results, calculate the F1 value decrease and anti-interference degree based on the two recognition results, and determine whether the lane line detection model meets the requirements.
[0028] Furthermore, the interference resistance is:
[0029]
[0030] Where yi0 represents the true lane line of the i-th sample in the attack-free dataset, yi1 represents the lane line identified by the lane line detection model for the i-th sample in the attack-free 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 attack-free dataset, and δi represents the digital adversarial interference added to the i-th sample in the attack-free dataset.
[0031] Furthermore, the steps of the projected gradient descent method include:
[0032] For each sample in the attack-free dataset, one or more losses are selected as a weighted average of the keypoint estimation loss, location 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 samples into the standard lane detection model, obtain the output of the standard lane detection model, calculate the loss value according to the loss function, backpropagate the loss value with respect to the samples to obtain the gradient, and update the digital adversarial interference and samples;
[0034] After a set number of iterations, the resulting samples are the post-attack samples. Combining all the post-attack samples yields the post-attack dataset.
[0035] Furthermore, the standard lane line detection model is a globally correlated 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 above-described test method for a lane detection algorithm based on digital attacks.
[0037] A 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 the processor executes the program to implement the steps in the above-described test method for a lane detection algorithm based on digital attacks.
[0038] Compared with the prior art, the beneficial effects of the present invention are:
[0039] This invention adds digital adversarial perturbations to the lane detection dataset based on the projected gradient descent method. The performance of the lane detection algorithm is judged by the descent fluctuation value and anti-interference degree of the data evaluation index F1score, thus providing a safety assessment for autonomous driving lane detection algorithms. This is extremely important for timely detection and handling of misjudgments or inability to correctly identify lanes in autonomous vehicles, timely detection and handling of data security issues and protection of autonomous driving data privacy, improving the recognition accuracy of lane detection algorithms, and enhancing the performance of lane detection models. It significantly reduces the development time and R&D costs of autonomous driving lane detection algorithms, and has significant research significance and commercial application value in the fields of artificial intelligence, data security, and autonomous driving. Attached Figure Description
[0040] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0041] Figure 1 This is a flowchart of a lane detection algorithm test method based on digital attack according to Embodiment 1 of the present invention;
[0042] Figure 2This is a diagram illustrating the effect of adding digital noise to the CULane dataset according to Embodiment 1 of the present invention.
[0043] Figure 3 This is a schematic diagram of the structure of a computer device according to Embodiment 4 of the present invention. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
[0045] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0046] Example 1
[0047] To comprehensively evaluate and verify the overall performance of lane detection capabilities of autonomous vehicles and ensure their safe and stable operation, this embodiment provides a lane detection algorithm testing method based on digital attacks to comprehensively evaluate the lane detection capabilities of lane models.
[0048] This embodiment provides a testing method for lane detection algorithms based on digital attacks. It adds digital adversarial perturbations to the CULane lane detection dataset using the projected gradient descent (PGD) method, compares the recognition accuracy of the lane detection model before and after the attack, and judges the performance of the lane detection algorithm by the decrease fluctuation value of the F1 score and the anti-interference degree. This provides a safety evaluation for autonomous driving lane detection algorithms, playing a crucial role in timely detection and handling of misjudgments or inability to correctly identify lanes in autonomous vehicles, timely detection and handling of data security issues, protection of autonomous driving data privacy, improvement of lane detection algorithm recognition accuracy, and enhancement of model performance. It significantly reduces the development time and R&D costs of autonomous driving lane detection algorithms, and has significant research significance and commercial application value in the fields of artificial intelligence, data security, and autonomous driving.
[0049] This embodiment provides a testing method for lane detection algorithms based on digital attacks, such as... Figure 1 As shown, it includes the following steps:
[0050] S1: Model Training: The lane detection model GANet was trained based on the CULane dataset. The model was set to 60 epochs. The training environment was Ubuntu 20.04, PyTorch version 1.7, CUDA version 10.1, and CUDA Toolkit version 10.1.
[0051] S2: Clean Dataset Test: Call the test program to generate test annotation information based on the GANet network and CULane dataset, and complete the test on the attack-free dataset.
[0052] S3: Index Calculation: The lane detection index is calculated based on the GANet network (Global Association Network). The evaluation index is F1 score, thus obtaining the recognition accuracy of the GANet network based on the clean dataset.
[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 It consists of four parts: L point (Key point estimation), L quant (Position compensation), L offset (Starting point regression) and L aux (Feature aggregation), the mathematical expressions of which are shown in Formulas 1-1 to 1-5 respectively:
[0055]
[0056] Where, λ point , λ quant , λ offset and λ aux All are weights; the subscript yx indicates obtaining the value at coordinates (x, y); H′ and W′ are size parameters; and Y yx These are the predicted and actual values of key points, respectively; α and β are hyperparameters. This represents the predicted compensation amount at each location (y, x). Compared with the actual compensation amount δ yx The absolute error between them; It is the predicted offset, O yx This is the true offset; K represents the number of key points on each lane line, N represents the number of key points on each lane line, and M represents the number of samples of adjacent key points; Let be the true value of the offset between the i-th key point and the corresponding key point m on the lane line. The predicted value is the offset between the i-th key point and the key point m on the predicted lane line.
[0057] In this step, a digital attack perturbation is added using the PGD algorithm. The number of iterations of the PGD algorithm is pgd_iters = 20, the threshold is eps = 76, and the perturbation factor is alpha = 2. The algorithm principle is shown in formula 1-6, thereby making the loss function L total Inverse optimization alters the pixel values of the input image. Inverse optimization is applied to four different losses, causing a deviation in the output lane line position. The effect of adding digital noise to the CULane dataset is shown below. Figure 2 As shown.
[0058]
[0059] The specific steps are as follows:
[0060] S401: Initialization: For each image xi in the clean dataset (attack-free dataset), set the upper limit S of the perturbation, the number of iterations T, and the parameter α, etc., and initialize the perturbation δ. 0 =0, in L point (Key point estimation), L quant (Position compensation), L offset (Starting point regression) and L aux In (feature aggregation), one or more weighted values are selected as the applied loss function L(θ,x,y).
[0061] S402: Calculate the initial perturbed image x t =xi+δ 0 ;
[0062] S403: Iterative update. For each iteration t, perform the following steps:
[0063] The perturbated image x t The input x is fed into the standard lane detection model GANet to obtain the output y of the lane detection model GANet. Then, the loss value is calculated according to the loss function L(θ,x,y).
[0064] The loss function L(θ,x,y) is related to the perturbed image x. t Perform backpropagation to calculate the gradient, and obtain the gradient. And update the perturbation (digital countermeasures jamming) to
[0065] The perturbated image (sample) is updated based on the gradient, and the update formula is Equation 1-6.
[0066] S404: The final perturbed image x obtained after T iterations. TIt involves adding digital attack perturbations to the image and then outputting it. The final perturbation δi is the image xi.
[0067] S5: Metric Calculation: Based on any trained lane detection network (the lane detection model to be tested), detect the lane detection dataset before and after the attack, and calculate its recognition accuracy. Evaluation metrics include the decrease in F1-score (F1 value) P and the anti-interference degree D.
[0068] Regarding the F1 score and its decrease: Based on steps S3 and S5, the fluctuation range of the recognition accuracy of GANet for lane line detection in the CULane dataset before and after adding the digital attack is compared. The comparison results are shown in Table 1. As can be seen from Table 1, the recognition accuracy of the GANet model on the unattacked image is 78.78%, while the recognition accuracy on the image after adding the digital attack is 37.43%, a decrease of 41.35%. This provides a safety evaluation for the lane line recognition algorithm for autonomous driving and provides an important basis for the performance evaluation of the lane line detection algorithm.
[0069] Table 1. Comparison of identification accuracy before and after digital attacks
[0070]
[0071] The formula for calculating the anti-interference level is as follows: Where yi0 represents the true lane line of the i-th sample in the dataset, yi1 represents the predicted lane line of the i-th sample in the clean 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 value of the F1 score decrease magnitude P and the anti-interference degree D. The weights of the F1 score decrease magnitude P and the anti-interference degree D are obtained through extensive experiments. When the weighted value of the two is greater than a set threshold, the lane detection model is considered to have high recognition accuracy and meet the requirements.
[0073] This embodiment provides a testing method for lane detection algorithms based on digital attacks. The PGD algorithm is used to add digital attack textures to the CULane dataset, simulating malicious attacks such as noise pollution and data poisoning during autonomous vehicle operation. The recognition accuracy of the lane detection algorithm is verified based on different evaluation metrics. The changes in F1 score before and after the attack and the anti-interference degree (D) of the lane detection algorithm are compared to verify the performance of the autonomous driving lane detection algorithm. This provides a safety assessment for autonomous driving lane detection algorithms, significantly saving the R&D cost of autonomous vehicles, reducing the real-vehicle road test time, and improving the performance of lane detection algorithms.
[0074] Example 2
[0075] This embodiment provides a lane detection algorithm testing system based on digital attacks, which specifically includes:
[0076] The data acquisition module is configured to acquire an attack-free dataset and a lane detection model to be tested.
[0077] The digital attack module is configured to add digital adversarial interference to each image in the non-attack dataset using the projective gradient descent method to obtain the attacked dataset.
[0078] The testing module is configured to: perform lane line detection on the non-attack dataset and the post-attack dataset respectively, obtain two recognition results, calculate the F1 value decrease and anti-interference degree based on the two recognition results, and determine whether the lane line detection model meets the requirements.
[0079] The anti-interference level is:
[0080]
[0081] Where yi0 represents the true lane line of the i-th sample in the attack-free dataset, yi1 represents the lane line identified by the lane line detection model for the i-th sample in the attack-free 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 attack-free dataset, and δi represents the digital adversarial interference added to the i-th sample in the attack-free dataset.
[0082] The steps of the projective gradient descent method include:
[0083] For each sample in the attack-free dataset, one or more losses are selected as a weighted average of the keypoint estimation loss, location 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 samples into the standard lane detection model, obtain the output of the standard lane detection model, calculate the loss value according to the loss function, backpropagate the loss value with respect to the samples to obtain the gradient, and update the digital adversarial interference and samples;
[0085] After a set number of iterations, the resulting samples are the post-attack samples. Combining all the post-attack samples yields the post-attack dataset.
[0086] The standard lane line detection model is a globally interconnected network.
[0087] It should be noted that each module in this embodiment corresponds one-to-one with each step in Embodiment 1, and their specific implementation processes are the same, so they will not be repeated here.
[0088] Example 3
[0089] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the lane detection algorithm testing method based on digital attacks as described in Embodiment 1 above.
[0090] Example 4
[0091] This embodiment provides a computer device, such as... Figure 3 As shown, the device 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. The processor, communication interface, and computer-readable storage medium can 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, it implements the steps in the lane detection algorithm testing method based on digital attacks described in Embodiment 1 above.
[0092] Any references to memory, storage, database, or other media used in this application and 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. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0093] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
Claims
1. A testing method for lane detection algorithms based on digital attacks, characterized in that, include: Obtain an attack-free dataset and a lane detection model to be tested; Digital adversarial interference was added to each image in the attack-free dataset using the projective gradient descent method to obtain the attacked dataset. For both the non-attack dataset and the post-attack dataset, the lane detection model performs lane detection separately, obtaining two recognition results. Based on these two results, the decrease in F1 score and the anti-interference ability are calculated to determine whether the lane detection model meets the requirements. The anti-interference level is: ; in, This represents the true lane line of the i-th sample in the attack-free dataset. This represents the lane line identified by the lane line detection model for the i-th sample in the attack-free dataset. This represents the lane line detected by the lane line detection model for the i-th sample in the attacked dataset, where n is the number of samples in the unattacked dataset. This represents the digital adversarial interference added to the i-th sample in the attack-free dataset; The steps of the projection gradient descent method include: for each sample in the non-attack dataset, selecting one or more losses from keypoint estimation loss, location compensation loss, starting point regression loss, and feature aggregation loss as a weighted loss function; for each iteration, performing: inputting the sample into the standard lane detection model, obtaining the output of the standard lane detection model, and calculating the loss value according to the loss function; backpropagating the gradient of the loss value with respect to the sample, and updating the digital adversarial interference and the sample; after a set number of iterations, the obtained sample is the post-attack sample, and combining all the post-attack samples to obtain the post-attack dataset.
2. The lane detection algorithm testing method based on digital attacks as described in claim 1, characterized in that, The standard lane line detection model is a globally correlated network.
3. A lane detection algorithm testing system based on digital attacks, characterized in that, include: The data acquisition module is configured to acquire an attack-free dataset and a lane detection model to be tested. The digital attack module is configured to add digital adversarial interference to each image in the non-attack dataset using the projective gradient descent method to obtain the attacked dataset. The testing module is configured to: perform lane line detection on the non-attack dataset and the post-attack dataset respectively, obtain two recognition results, calculate the F1 value decrease and anti-interference degree based on the two recognition results, and determine whether the lane line detection model meets the requirements; The anti-interference level is: ; in, This represents the true lane line of the i-th sample in the attack-free dataset. This represents the lane line identified by the lane line detection model for the i-th sample in the attack-free dataset. This represents the lane line detected by the lane line detection model for the i-th sample in the attacked dataset, where n is the number of samples in the unattacked dataset. This represents the digital adversarial interference added to the i-th sample in the attack-free dataset; The steps of the projection gradient descent method include: for each sample in the non-attack dataset, selecting one or more losses from keypoint estimation loss, location compensation loss, starting point regression loss, and feature aggregation loss as a weighted loss function; for each iteration, performing: inputting the sample into the standard lane detection model, obtaining the output of the standard lane detection model, and calculating the loss value according to the loss function; backpropagating the gradient of the loss value with respect to the sample, and updating the digital adversarial interference and the sample; after a set number of iterations, the obtained sample is the post-attack sample, and combining all the post-attack samples to obtain the post-attack dataset.
4. The lane detection algorithm testing system based on digital attacks as described in claim 3, characterized in that, The standard lane line detection model is a globally correlated network.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the test method for a lane detection algorithm based on digital attacks as described in any one of claims 1-2.
6. A computer device comprising a computer-readable storage medium, a processor, and a computer program stored on the computer-readable storage medium and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the lane detection algorithm testing method based on digital attack as described in any one of claims 1-2.
Citation Information
Patent Citations
Black box anti-attack method for malicious code detection system
CN115062306A
Lane line detection model backdoor attack method
CN117875405A