Vehicle test traffic environment image generation method, device, equipment and medium

By using diffusion models to generate realistic traffic environment images, the problem of the inability to fully simulate complex traffic conditions in the prior art is solved, and the accuracy and efficiency of vehicle testing are improved.

CN118212314BActive Publication Date: 2025-04-08CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410230755.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-29
Publication Date
2025-04-08
Estimated Expiration
2044-02-29

AI Technical Summary

Technical Problem

In the prior art, when using computer simulation methods for vehicle testing, complex real-world traffic conditions cannot be fully simulated.

Method used

By obtaining real traffic environment images, a diffusion model is trained to generate test traffic environment images and the vehicles are tested using these images. According to the test results, the diffusion model is retrained until the preset conditions are met.

Benefits of technology

It provides a comprehensive and realistic simulation scenario for vehicle testing, improves the accuracy and authenticity of the test, improves the testing efficiency and reduces the testing cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118212314B_ABST
    Figure CN118212314B_ABST
Patent Text Reader

Abstract

The present application relates to the field of vehicle testing technology, and provides a method, device, equipment and medium for generating a vehicle test traffic environment image. The method obtains a diffusion model by training with a real traffic environment image, and generates a test traffic environment image using the diffusion model for vehicle testing. After the test, the generated test traffic environment image is judged based on the test result whether it is qualified. If not, the diffusion model is retrained until a trained diffusion model is obtained, and the trained diffusion model is used to provide a traffic environment image for vehicle testing. The method can provide a comprehensive and realistic simulation scene for the computer simulation test of the vehicle, and the simulation scene can be quickly iterated and optimized, which improves the accuracy and authenticity of the vehicle test, improves the test efficiency, and reduces the test cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle testing technology, and in particular to a method, device, equipment and medium for generating a traffic environment image for vehicle testing. Background Art

[0002] Existing vehicle performance and safety system testing technologies mainly rely on several methods: real-car road testing, closed-field testing, driving simulators, computer simulation, and hardware-in-the-Loop (HIL) testing. Among them, computer simulation allows for rapid evaluation of vehicle design and performance through software models. Although this method is cost-effective, it relies on the accuracy of the model and may not be able to fully simulate complex real-world traffic conditions. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a method, device, equipment and medium for generating a vehicle test traffic environment image to solve the problem in the prior art that when using computer simulation methods for vehicle testing, it is impossible to fully simulate complex real-world traffic conditions.

[0004] A first aspect of an embodiment of the present application provides a method for generating a vehicle test traffic environment image, comprising:

[0005] Acquire real traffic environment images;

[0006] A diffusion model for generating test traffic environment images is obtained by training with real traffic environment images;

[0007] Generate a test traffic environment image using a diffusion model, and use the test traffic environment image to test the vehicle;

[0008] In response to determining based on the test result that the test traffic environment image does not meet the preset condition, retraining to obtain an updated diffusion model;

[0009] Repeating the steps of generating a test traffic environment image using a diffusion model, testing a vehicle using the test traffic environment image, and retraining to obtain an updated diffusion model when it is determined based on the test result that the test traffic environment image does not meet the preset condition, until it is determined based on the test result that the test traffic environment image meets the preset condition, thereby obtaining a trained diffusion model;

[0010] Use the trained diffusion model to generate vehicle test traffic environment images.

[0011] A second aspect of an embodiment of the present application provides a vehicle test traffic environment image generation device, comprising:

[0012] An acquisition module is configured to acquire a real traffic environment image;

[0013] A training module is configured to use real traffic environment images to train a diffusion model for generating a test traffic environment image;

[0014] A testing module is configured to generate a test traffic environment image using a diffusion model and test the vehicle using the test traffic environment image;

[0015] The training module is further configured to, in response to determining based on the test result that the test traffic environment image does not meet the preset condition, retrain to obtain an updated diffusion model;

[0016] an iterative module configured to repeatedly perform the steps of generating a test traffic environment image using a diffusion model, testing a vehicle using the test traffic environment image, and retraining to obtain an updated diffusion model when it is determined based on the test result that the test traffic environment image does not meet the preset condition, until it is determined based on the test result that the test traffic environment image meets the preset condition, thereby obtaining a trained diffusion model;

[0017] The testing module is also configured to generate a vehicle testing traffic environment image using the trained diffusion model.

[0018] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0019] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0020] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application obtain a diffusion model by training with real traffic environment images, and use the diffusion model to generate a test traffic environment image for vehicle testing, and after the test, determine whether the generated test traffic environment image is qualified based on the test result. If not, retrain the diffusion model, thereby providing a comprehensive and realistic simulation scene for the computer simulation test of the vehicle, and the simulation scene can be quickly iterated and optimized, thereby improving the accuracy and authenticity of the vehicle test, improving the test efficiency, and reducing the test cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art 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 paying any creative work.

[0022] Figure 1 It is a flow chart of a method for generating a vehicle test traffic environment image provided in an embodiment of the present application.

[0023] Figure 2 It is a flowchart of the method for training a diffusion model provided in an embodiment of the present application.

[0024] Figure 3 It is a flowchart of the training method of the loss function of each operation provided in the embodiment of the present application.

[0025] Figure 4 It is a schematic diagram of a method provided in an embodiment of the present application for obtaining a rainy day test traffic environment image by training a real traffic environment image on a sunny day.

[0026] Figure 5 It is a flowchart of a method for obtaining a test traffic environment image after comprehensive conditions are changed by training with a real traffic environment image provided by an embodiment of the present application;

[0027] Figure 6 It is a flowchart of a method for determining that a test traffic environment image does not meet preset conditions based on test results provided in an embodiment of the present application.

[0028] Figure 7 It is a schematic diagram of a vehicle test traffic environment image generating device provided in an embodiment of the present application.

[0029] Figure 8 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0031] A method and device for generating a vehicle test traffic environment image according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0032] As mentioned above, existing vehicle performance and safety system testing technologies mainly rely on several methods: real vehicle road testing, closed field testing, driving simulators, computer simulation, and HIL testing.

[0033] Among them, real vehicle testing is the most traditional method, which involves driving the vehicle directly on public roads or specific test sites. The main advantage of this method is that it provides a realistic driving experience and environmental feedback, but it is also accompanied by high costs, safety risks, and limitations in environmental control. Closed field testing allows specific driving scenarios to be repeated in a controlled environment. This method is relatively safe and can simulate specific dangerous or complex scenarios, but it cannot fully replicate the unpredictability of the real world. Driving simulators use virtual reality technology to reproduce the driving experience. They are safe and low-cost, but lack realism, and the simulation of the driver's physiological and psychological reactions is usually not accurate enough. Computer simulation allows for rapid evaluation of vehicle design and performance through software models. Although this method is cost-effective, it relies on the accuracy of the model and may not fully simulate complex real-world traffic situations. HIL testing combines real hardware and software simulation to provide an intermediate solution. Although it simulates real situations to a certain extent, it is still limited by the authenticity of the simulation environment and the limitations of the hardware.

[0034] In other words, the existing vehicle testing technology still has the following defects:

[0035] 1) Limited scenario coverage. Most existing technologies have difficulty covering all possible driving scenarios, especially rare and extreme scenarios such as special weather conditions or rare types of traffic accidents.

[0036] 2) Cost and safety issues. Real vehicle testing and closed field testing are expensive and pose significant safety risks. Simulating dangerous scenarios in these tests may pose a threat to testers and equipment.

[0037] 3) Realism and accuracy. Although driving simulators and computer simulations have advantages in terms of safety and cost-effectiveness, they often lack sufficient realism and accuracy, especially in simulating complex environments and driver reactions.

[0038] 4) Hardware dependence and lack of flexibility. Although HIL testing combines the advantages of hardware and simulation, it is highly dependent on hardware, difficult to update, and has limitations in terms of rapid iteration and flexibility.

[0039] 5) Lack of comprehensive evaluation capabilities. Existing technologies usually focus on testing specific aspects and lack a comprehensive evaluation of the overall performance of the vehicle under various conditions.

[0040] In view of this, the embodiment of the present application provides a method for generating traffic environment images for vehicle testing, which uses advanced deep learning technology to generate various realistic traffic environment images and videos, thereby providing a comprehensive and diverse testing platform. Through a highly realistic and controllable simulation environment, the performance and safety system of the vehicle can be more effectively evaluated and optimized.

[0041] Furthermore, the embodiment of the present application also provides a method for generating a vehicle test traffic environment image, by training a diffusion model using a real traffic environment image, and using the diffusion model to generate a test traffic environment image for vehicle testing, and after the test is completed, judging whether the generated test traffic environment image is qualified based on the test result, if not, retraining the diffusion model until a trained diffusion model is obtained, and using the trained diffusion model to provide a traffic environment image for vehicle testing. This method can provide a comprehensive and realistic simulation scene for the computer simulation test of the vehicle, and the simulation scene can be quickly iterated and optimized, which improves the accuracy and authenticity of the vehicle test, improves the test efficiency, and reduces the test cost.

[0042] Figure 1 FIG. 1 is a flow chart of a method for generating a vehicle test traffic environment image provided by an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0043] In step S101, a real traffic environment image is acquired.

[0044] In step S102, a diffusion model for generating a test traffic environment image is obtained by training using a real traffic environment image.

[0045] In step S103, a test traffic environment image is generated using the diffusion model, and the vehicle is tested using the test traffic environment image.

[0046] In step S104 , in response to determining based on the test result that the test traffic environment image does not meet the preset condition, retraining is performed to obtain an updated diffusion model.

[0047] In step S105, the steps of generating a test traffic environment image using a diffusion model, testing a vehicle using the test traffic environment image, and retraining to obtain an updated diffusion model when it is determined based on the test results that the test traffic environment image does not meet the preset conditions are repeatedly performed until it is determined based on the test results that the test traffic environment image meets the preset conditions and a trained diffusion model is obtained.

[0048] In step S106, a vehicle test traffic environment image is generated using the trained diffusion model.

[0049] The vehicle test traffic environment image generation method provided in the embodiment of the present application can be executed by a server or a terminal with certain processing capabilities.

[0050] In the embodiment of the present application, the server or terminal may first obtain a real traffic environment image. The real traffic environment image may be a picture or video of different traffic environments in a real scene. Different traffic environments may include different road conditions, different traffic flows, different traffic participants, different weather environments, different lighting environments, different traffic participant behavior patterns, and environments when various emergency situations occur.

[0051] In the embodiment of the present application, the acquired real traffic environment image can be used to train a diffusion model for generating a test traffic environment image. The Diffusion model is a deep learning model. In the embodiment of the present application, the trained Diffusion model can be used to generate a realistic test traffic environment image. The training method and image generation method of the Diffusion model are described in detail below and will not be repeated here.

[0052] In the embodiment of the present application, after obtaining the test traffic environment image generated by the Diffusion model, the test traffic environment image can be used to test the vehicle. In one example, when using a computer simulation method to test the vehicle, the test traffic environment image generated by the Diffusion model can be used as a simulation environment to test various performance indicators of the vehicle in the traffic environment, such as the reaction time, decision accuracy, emergency handling capability, etc. of the autonomous driving system.

[0053] In the embodiment of the present application, after the test is completed, it can be determined based on the test results whether the test traffic environment image meets the preset conditions, that is, whether the test traffic environment image is qualified in simulating the real traffic environment image. If so, it can be considered that the Diffusion model obtained by the current training can meet the test requirements, and the Diffusion model can be used to continue the vehicle test. Furthermore, after each vehicle test, it can be executed to determine whether the test traffic environment image meets the preset conditions to achieve rapid optimization and update of the Diffusion model.

[0054] On the other hand, if it is determined based on the test results that the test traffic environment image does not meet the preset conditions, it can be considered that the test traffic environment image generated by the currently trained Diffusion model is not realistic enough. At this time, it is necessary to retrain to obtain an updated Diffusion model, and then use the updated Diffusion model to regenerate the test traffic environment image, and use the regenerated test traffic environment image to test the vehicle again, and then continue to judge whether the regenerated test traffic environment image meets the preset conditions based on the test results. When the judgment result is no, the steps of using the diffusion model to generate the test traffic environment image, using the test traffic environment image to test the vehicle, and retraining to obtain the updated diffusion model when it is determined based on the test results that the test traffic environment image does not meet the preset conditions are repeated until the judgment result is yes. At this time, a trained diffusion model can be obtained.

[0055] In an embodiment of the present application, the trained diffusion model can be used to generate traffic environment images required for vehicle testing, and the generated traffic environment images can be loaded onto a test platform, and then the performance of the vehicle can be tested on the test platform.

[0056] According to the technical solution provided by the embodiment of the present application, a diffusion model is obtained by training with real traffic environment images, and a test traffic environment image is generated using the diffusion model for vehicle testing. After the test, the generated test traffic environment image is judged to be qualified based on the test results. If not, the diffusion model is retrained until a trained diffusion model is obtained, and the trained diffusion model is used to provide a traffic environment image for vehicle testing. This method can provide a comprehensive and realistic simulation scene for computer simulation testing of vehicles, and the simulation scene can be quickly iterated and optimized, which improves the accuracy and authenticity of vehicle testing, improves test efficiency, and reduces test costs.

[0057] Figure 2 is a flow chart of the method for training a diffusion model provided in an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0058] In step S201, an initial diffusion model is obtained.

[0059] In step S202, the real traffic environment image is input into the initial diffusion model, and the noise adding operation is performed N times on the real traffic environment image until the real traffic environment image becomes a completely noisy image.

[0060] Wherein, N is a positive integer greater than 1.

[0061] In step S203, N denoising operations are performed on the completely noisy image to obtain the predicted noise of each operation, and the loss function of each operation is determined based on the predicted noise of each operation.

[0062] In step S204, the prediction model parameters of the initial diffusion model are adjusted to minimize the loss function of each operation.

[0063] In step S205, the predicted noise when the loss function is minimized for each operation is saved to obtain a trained diffusion model.

[0064] The Diffusion model learns the specific noise to be added or removed by gradually introducing noise and then gradually removing the noise, and generates the required image after adding or removing the specific noise. In an embodiment of the present application, an initial diffusion model can be first obtained when training the Diffusion model. In one example, the initial diffusion model can be a denoising diffusion probabilistic model (Denoising Diffusion Probabilistic Models, DDPM), which is a probability-based generation model that generates images by gradually adding and removing noise. Furthermore, some model parameters of the DDPM model can also be initialized, including defining the noise level, the number of iterations N, etc.

[0065] Next, we can input the real traffic environment image into the initial diffusion model and perform N noise addition operations on the real traffic environment image until the real traffic environment image becomes a completely noisy image. The real traffic environment image can be a traffic environment image after preprocessing. The preprocessing can include standardization and batch processing. The noise addition can be expressed as Indicates that, x t is the image after the tth noise addition, x t-1 For the image after the t-1th noise addition, α t is the noise ratio, ε is the added Gaussian noise, and t is greater than or equal to 1 and less than or equal to N. That is, at this stage, the model gradually adds noise to the original data until the data becomes completely noisy. This process is usually modeled as a series of Markov chain steps.

[0066] In an embodiment of the present application, after the real traffic environment image is made into a completely noisy image by adding noise, N denoising operations can be performed on the completely noisy image to obtain the predicted noise of each operation, and the loss function of each operation is determined based on the predicted noise of each operation. Among them, the predicted noise of each operation can be determined according to the prediction model parameters of the Diffusion model, such as noise ratio, noise adjustment step size, etc. The loss function of each operation can be calculated using the variational lower bound (Evidence Lower Bound, ELBO) method, or other similar methods, which are not limited here. Further, after each denoising operation is performed, the predicted noise of this time and the image after this denoising can be obtained.

[0067] Figure 3 is a flow chart of the training method of the loss function of each operation provided in the embodiment of the present application. Figure 3 As shown, the method comprises the following steps:

[0068] In step S301, the predicted noise in the t-th denoising operation is obtained.

[0069] In step S302, the noise added in the N-t+1th adding operation is obtained.

[0070] In step S303, the vector difference between the predicted noise in the t-th denoising operation and the noise added in the N-t+1-th adding operation is calculated, the vector difference is modulo to obtain the modulus length of the vector difference, and the cross entropy of the square of the modulus length is determined as the loss function of the t-th operation.

[0071] Wherein, t is a positive integer greater than or equal to 1 and less than or equal to N.

[0072] As mentioned above, the loss function of each operation can be calculated using the ELBO method. In the embodiment of the present application, the predicted noise ε in the t-th denoising operation can be first obtained. θ , and obtain the noise ε added in the N-t+1th adding operation. The tth denoising operation is the inverse operation of the N-t+1th adding operation. That is, in the N-t+1th adding operation, by t-1 Add noise to get image x t , and in the tth denoising operation, by t Perform denoising operation to get image x t-1 .

[0073] In the embodiment of the present application, after obtaining the noise ε and predicting the noise ε θAfter that, we can calculate the vector difference between the predicted noise in the t-th denoising operation and the noise added in the N-t+1-th adding operation, take the vector difference modulus to get the modulus length of the vector difference, and finally determine the cross entropy of the square of the modulus length as the loss function of the t-th operation. That is, the loss function of each operation can be expressed by the formula , where L is the loss function, E is the cross entropy, ε∈Ν(0,1) means that the noise ε is a random number between 0 and 1 that conforms to the Gaussian distribution, x0 is the initial image input to the model, that is, the real traffic environment image in the embodiment of the present application, ε θ (x t ,t) is the image x t Prediction noise when performing denoising.

[0074] In the embodiment of the present application, after calculating the loss function of each operation, the prediction model parameters of the Diffusion model can be adjusted to minimize the loss function of each operation, thereby completing the training of the Diffusion model. After the training is completed, the prediction noise when the loss function of each operation is minimized can be saved, and the image after each operation can also be saved.

[0075] In this way, various test traffic environment images can be obtained based on real traffic environment images. For example, the test traffic environment images of rainy and snowy days can be obtained based on the real traffic environment images of sunny days, and the rainfall, rainfall time, snowfall, snowfall time, etc. can be set as needed, so as to provide rich and realistic test traffic environment images for vehicle testing, improve the test accuracy and reduce the test cost.

[0076] Figure 4 Schematic diagram of a method for obtaining a rainy day test traffic environment image by training a real traffic environment image on a sunny day provided in an embodiment of the present application. Figure 4 As shown in the figure, the rightmost image x0 is a real traffic environment image on a sunny day. First, the operation of adding raindrop noise to the image x0 is performed N times in sequence. Each noise addition operation can be expressed as q(x t |x t-1 ) until a completely noisy image is obtained, as shown in the leftmost image x in the figure T It should be noted that in the complete noise image, only the distribution of raindrops is complete noise, while the images of roads, other vehicles, etc. remain unchanged.

[0077] Next, the completely noisy image can be subjected to N raindrop noise removal operations in sequence. Each noise removal operation can be expressed as p θ (x t-1 |x t). In the process of denoising, the noise distribution can be modified to obtain a variety of images corresponding to different rainy days, and the predicted noise of the images corresponding to different rainy days can be recorded. When using the Diffusion model to generate a rainy day test traffic environment image, a rainy day complete noise image is generated according to the corresponding sunny day real traffic environment image or text description, and then the saved predicted noise is used to perform a denoising operation on the rainy day complete noise image to obtain the required rainy day test traffic environment image. On the other hand, the corresponding added noise can also be calculated based on the saved predicted noise, so that the added noise is directly added to the input sunny day real traffic environment image to obtain the required rainy day test traffic environment image.

[0078] That is to say, in the process of simulating a rainy day scene, we can start from a clear weather image ( Figure 4 Starting from the rightmost figure in the figure, raindrop noise is gradually introduced ( Figure 4 The middle image in the figure) eventually forms a realistic rainy day scene ( Figure 4 In this process, the Diffusion model framework learns the distribution of image data at each stage and strives to minimize the differences in these distributions during the change process, thereby accurately capturing the transition from raindrop noise to real rainy day scenes. In this way, we can effectively learn and simulate traffic environments under complex weather conditions, providing a comprehensive and accurate simulation platform for vehicle testing.

[0079] It should be noted that in the simulation test, it is not limited to the change of weather environment, and other factors in the overall scene can be further enriched and refined. In addition to weather factors, such as simulation of rainy or snowy days, the method provided in the embodiment of the present application can also adjust and reconstruct a variety of other elements in the traffic environment. For example, different traffic densities, behavior patterns of various types of vehicles and pedestrians, road types (such as city streets, highways), and lighting conditions in specific time periods (such as day and night transitions) can be simulated. Figure 5 In the illustrated embodiment, the Diffusion model is used to perform comprehensive changes in conditions such as lighting, site (road -> forest), and weather.

[0080] In the Diffusion model framework, this scene enrichment is not just a simple visual change, but a deep learning of data distribution and environmental interaction. By analyzing and understanding how various environmental factors affect traffic flow and vehicle behavior, the model can generate test scenarios with high details and realistic interactive characteristics. The diversity and depth of this scene make the method provided in the embodiment of the present application a powerful tool for comprehensively evaluating and optimizing the performance and safety systems of vehicles, especially in the face of complex and changing real-world conditions.

[0081] Figure 61 is a flow chart of a method for determining that a test traffic environment image does not meet a preset condition based on a test result provided by an embodiment of the present application. Figure 6 As shown, the method comprises the following steps:

[0082] In step S601, a first test result of testing a vehicle using a test traffic environment image is obtained.

[0083] In step S602, a second test result is obtained.

[0084] Among them, the second test result is the result of testing the vehicle using a real traffic environment image similar to the test traffic environment image, or the test result of testing the vehicle using a test traffic environment image that is similar to the test traffic environment image and has been verified to be qualified.

[0085] In step S603 , in response to the difference between the first test result and the second test result being greater than a preset threshold, it is determined that the test traffic environment image does not satisfy a preset condition.

[0086] In an embodiment of the present application, when determining whether a test traffic environment image meets preset conditions based on the test results, a first test result of testing the vehicle using the test traffic environment image can be first obtained, and a second test result can be obtained, wherein the second test result is the result of testing the vehicle using a real traffic environment image similar to the test traffic environment image, or the test result of testing the vehicle using a test traffic environment image that is similar to the test traffic environment image and has been verified to be qualified.

[0087] Then, the first test result is compared with the second test result. When the difference between the first test result and the second test result is greater than a preset threshold, it is determined that the test traffic environment image does not meet the preset condition.

[0088] It should be noted that after the test traffic environment image is generated using the diffusion model, the image quality of the test traffic environment image can also be judged, and after determining that the image quality meets the preset quality requirements, the test traffic environment image can be used to test the vehicle. In some implementations, the image quality can be preliminarily judged by calculating the mean square error between the test traffic environment image and the real traffic environment image, calculating the mean structural similarity (Mean Structural Similarity Index Measure, SSIM) between the test traffic environment image and the real traffic environment image, and calculating the peak signal-to-noise ratio (Peak Signal-to-Noise Ratio, PSNR) of the test traffic environment image. After the judgment is qualified, the test traffic environment image is used to test the vehicle, and after the test is completed, it is judged again whether the test traffic environment image can meet the test requirements based on the test results.

[0089] In this way, continuous improvement and optimization of vehicle technology is promoted through detailed evaluation and feedback mechanisms.

[0090] In the embodiment of the present application, retraining to obtain an updated diffusion model may be to adjust the model parameters of the diffusion model and use the real traffic environment image to retrain to obtain the updated diffusion model. On the other hand, retraining to obtain an updated diffusion model may also be to update the real traffic environment image and use the updated real traffic environment image to retrain to obtain the updated diffusion model.

[0091] That is to say, when updating the model, the model parameters of the Diffusion model can be adjusted to update, or the training data of the Diffusion model can be replaced and the Diffusion model can be retrained to achieve the update. The model parameters of the diffusion model include at least one of the following: noise level, number of iterations, noise ratio, and noise adjustment step.

[0092] In an embodiment of the present application, when a diffusion model is used to generate a test traffic environment image, a real traffic environment image may be used as a model input to generate the test traffic environment image, or a text description may be used as a model input to generate the test traffic environment image.

[0093] When a test traffic environment image is generated by using a real traffic environment image as a model input, the real traffic environment image can be first obtained, and then the real traffic environment image is input into the diffusion model, and the corresponding added noise is calculated based on the predicted noise stored in the Diffusion model, and the added noise is added to the real traffic environment image to generate the test traffic environment image. The generated test traffic environment image includes at least one different environmental item from the real traffic environment image.

[0094] When a test traffic environment image is generated using a text description as a model input, the text description of the test traffic environment image can be first obtained, the text description can be input into a diffusion model, and a complete noise image can be first generated based on the text description. Then, the saved predicted noise can be obtained, and the predicted noise can be removed from the complete noise image to generate the test traffic environment image.

[0095] The technical solution provided in the embodiment of the present application can generate extremely realistic images and videos based on the Diffusion model, and can simulate a variety of traffic environments including extreme weather, different lighting conditions, and various emergency situations. This highly realistic simulation scenario greatly improves the accuracy of the test and ensures that the test results can truly reflect the performance of the vehicle in actual driving. At the same time, the technical solution provided in the embodiment of the present application can more accurately control and adjust the test scenario, thereby performing a more detailed and specific performance evaluation.

[0096] Furthermore, the technical solution provided by the embodiment of the present application can make the test cycle more efficient by allowing the test scenario to be quickly generated and adjusted. This ability to quickly iterate is essential for rapid response during vehicle development and improvement. At the same time, compared to building an actual test environment or using expensive simulators, the technical solution provided by the embodiment of the present application can achieve a wider range of and complex test scenario simulations at a lower cost.

[0097] Furthermore, the technical solution provided by the embodiment of the present application has a wide range of scenario applicability. Whether it is urban roads, rural trails or highways, it can generate various types of driving environments, enhancing the adaptability of the test. At the same time, the solution is easy to update and expand, and can conduct comprehensive performance testing on the vehicle. With the emergence of new driving environments and situations, the Diffusion model can be retrained to adapt to new test requirements, improving the flexibility and scalability of the system.

[0098] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0099] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0100] Figure 7 Schematic diagram of a vehicle test traffic environment image generation device provided in an embodiment of the present application. Figure 7 As shown, the device comprises:

[0101] The acquisition module 701 is configured to acquire a real traffic environment image.

[0102] The training module 702 is configured to use the real traffic environment image to train a diffusion model for generating a test traffic environment image.

[0103] The testing module 703 is configured to generate a test traffic environment image using a diffusion model, and use the test traffic environment image to test the vehicle.

[0104] The training module 702 is further configured to, in response to determining based on the test result that the test traffic environment image does not meet a preset condition, retrain to obtain an updated diffusion model.

[0105] The iteration module 704 is configured to repeatedly execute the steps of generating a test traffic environment image using a diffusion model, testing a vehicle using the test traffic environment image, and retraining to obtain an updated diffusion model when it is determined based on the test results that the test traffic environment image does not meet the preset conditions, until it is determined based on the test results that the test traffic environment image meets the preset conditions.

[0106] According to the technical solution provided by the embodiment of the present application, a diffusion model is obtained by training with real traffic environment images, and a test traffic environment image is generated using the diffusion model for vehicle testing. After the test, the generated test traffic environment image is judged to be qualified based on the test results. If not, the diffusion model is retrained until a trained diffusion model is obtained, and the trained diffusion model is used to provide a traffic environment image for vehicle testing. This method can provide a comprehensive and realistic simulation scene for computer simulation testing of vehicles, and the simulation scene can be quickly iterated and optimized, which improves the accuracy and authenticity of vehicle testing, improves test efficiency, and reduces test costs.

[0107] In an embodiment of the present application, a diffusion model for generating a test traffic environment image is obtained by training using a real traffic environment image, including: obtaining an initial diffusion model; inputting the real traffic environment image into the initial diffusion model, performing N noise addition operations on the real traffic environment image until the real traffic environment image becomes a completely noisy image, wherein N is a positive integer greater than 1; performing N denoising operations on the completely noisy image to obtain a predicted noise for each operation, and determining a loss function for each operation based on the predicted noise for each operation; adjusting the predicted model parameters of the initial diffusion model to minimize the loss function for each operation; and saving the predicted noise when the loss function of each operation is minimized to obtain a trained diffusion model.

[0108] In an embodiment of the present application, a loss function for each operation is determined based on the predicted noise of each operation, including: obtaining the predicted noise in the t-th denoising operation; obtaining the noise added in the N-t+1-th adding operation; calculating the vector difference between the predicted noise in the t-th denoising operation and the noise added in the N-t+1-th adding operation, taking the modulus of the vector difference to obtain the modulus length of the vector difference, and determining the cross entropy of the square of the modulus length as the loss function of the t-th operation; wherein t is a positive integer greater than or equal to 1 and less than or equal to N.

[0109] In an embodiment of the present application, determining that a test traffic environment image does not satisfy a preset condition based on a test result includes: obtaining a first test result of testing a vehicle using a test traffic environment image; obtaining a second test result, the second test result being a result of testing the vehicle using a real traffic environment image similar to the test traffic environment image, or a test result of testing the vehicle using a test traffic environment image that is similar to the test traffic environment image and has been verified to be qualified; in response to a difference between the first test result and the second test result being greater than a preset threshold, determining that the test traffic environment image does not satisfy the preset condition.

[0110] In an embodiment of the present application, retraining to obtain an updated diffusion model includes: adjusting model parameters of the diffusion model and using real traffic environment images to retrain to obtain an updated diffusion model; or updating the real traffic environment images and using the updated real traffic environment images to retrain to obtain an updated diffusion model.

[0111] In the embodiment of the present application, the model parameters of the diffusion model include at least one of the following: noise level, number of iterations, noise ratio, and noise adjustment step size.

[0112] In an embodiment of the present application, a diffusion model is used to generate a test traffic environment image, including: obtaining a real traffic environment image; inputting the real traffic environment image into a diffusion model to generate a test traffic environment image, wherein the test traffic environment image and the real traffic environment image include at least one different environmental item; or obtaining a text description of the test traffic environment image; inputting the text description into the diffusion model to generate a test traffic environment image.

[0113] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0114] Figure 8 Schematic diagram of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 8 of this embodiment includes: a processor 801, a memory 802, and a computer program 803 stored in the memory 802 and executable on the processor 801. When the processor 801 executes the computer program 803, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 801 executes the computer program 803, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0115] The electronic device 8 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 8 may include, but is not limited to, a processor 801 and a memory 802. Those skilled in the art will appreciate that Figure 8The electronic device 8 is merely an example and does not limit the electronic device 8 . The electronic device 8 may include more or fewer components than those shown in the figure, or different components.

[0116] The processor 801 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0117] The memory 802 may be an internal storage unit of the electronic device 8, for example, a hard disk or memory of the electronic device 8. The memory 802 may also be an external storage device of the electronic device 8, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 8. The memory 802 may also include both an internal storage unit of the electronic device 8 and an external storage device. The memory 802 is used to store computer programs and other programs and data required by the electronic device.

[0118] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0119] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0120] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for generating a vehicle test traffic environment image, characterized in that: include: Acquire real traffic environment images; Using the real traffic environment image to train a diffusion model for generating a test traffic environment image; Using the diffusion model to generate a test traffic environment image, and using the test traffic environment image to test the vehicle; In response to determining based on the test result that the test traffic environment image does not meet the preset condition, retraining to obtain an updated diffusion model; Repeating the steps of generating a test traffic environment image using a diffusion model, testing a vehicle using the test traffic environment image, and retraining to obtain an updated diffusion model when it is determined based on the test result that the test traffic environment image does not meet the preset condition, until it is determined based on the test result that the test traffic environment image meets the preset condition, thereby obtaining a trained diffusion model; Generate the vehicle test traffic environment image using the trained diffusion model; Wherein, determining that the test traffic environment image does not meet the preset condition based on the test result includes: Acquire a first test result of testing a vehicle using the test traffic environment image; Obtaining a second test result, where the second test result is a result of testing the vehicle using a real traffic environment image similar to the test traffic environment image, or a test result of testing the vehicle using a test traffic environment image that is similar to the test traffic environment image and has been verified to be qualified; In response to a difference between the first test result and the second test result being greater than a preset threshold, it is determined that the test traffic environment image does not satisfy a preset condition.

2. The method according to claim 1, characterized in that The step of using the real traffic environment image to train a diffusion model for generating a test traffic environment image comprises: Obtaining an initial diffusion model; Inputting the real traffic environment image into the initial diffusion model, performing N noise adding operations on the real traffic environment image until the real traffic environment image becomes a completely noisy image, wherein N is a positive integer greater than 1; Performing N denoising operations on the completely noisy image to obtain predicted noise for each operation, and determining a loss function for each operation based on the predicted noise for each operation; Adjusting the prediction model parameters of the initial diffusion model to minimize the loss function of each operation; The predicted noise when the loss function is minimized for each operation is saved to obtain the trained diffusion model.

3. The method according to claim 2, characterized in that The determining the loss function of each operation based on the predicted noise of each operation includes: Get the predicted noise in the t-th denoising operation; Get the noise added in the N-t+1th adding operation; Calculate the vector difference between the predicted noise in the t-th denoising operation and the noise added in the N-t+1-th adding operation, take the vector difference modulus to obtain the modulus length of the vector difference, and determine the cross entropy of the square of the modulus length as the loss function of the t-th operation; Wherein, t is a positive integer greater than or equal to 1 and less than or equal to N.

4. The method according to claim 1, characterized in that The retraining obtains an updated diffusion model, including: adjusting the model parameters of the diffusion model, and retraining the model using the real traffic environment image to obtain an updated diffusion model; or The real traffic environment image is updated, and the updated diffusion model is retrained using the updated real traffic environment image.

5. The method according to claim 1, characterized in that After generating a test traffic environment image using the diffusion model, the method further includes: Determining the image quality of the test traffic environment image; In response to determining that the image quality meets a preset quality requirement, a vehicle is tested using the test traffic environment image.

6. The method according to any one of claims 1 to 5, characterized in that Generate a test traffic environment image using the diffusion model, including: Acquire real traffic environment images; Inputting the real traffic environment image into a diffusion model to generate the test traffic environment image, wherein the test traffic environment image and the real traffic environment image include at least one different environmental item; or Obtain a text description of the test traffic environment image; The text description is input into a diffusion model to generate the test traffic environment image.

7. A vehicle test traffic environment image generation device, characterized in that: include: An acquisition module is configured to acquire a real traffic environment image; A training module, configured to use the real traffic environment image to train a diffusion model for generating a test traffic environment image; A testing module is configured to generate a test traffic environment image using the diffusion model, and use the test traffic environment image to test the vehicle; The training module is further configured to, in response to determining based on the test result that the test traffic environment image does not meet the preset condition, retrain to obtain an updated diffusion model; an iterative module, configured to repeatedly perform the steps of generating a test traffic environment image using a diffusion model, testing a vehicle using the test traffic environment image, and retraining to obtain an updated diffusion model when it is determined based on the test result that the test traffic environment image does not meet the preset condition, until it is determined based on the test result that the test traffic environment image meets the preset condition, thereby obtaining a trained diffusion model; The testing module is further configured to generate the vehicle testing traffic environment image using the trained diffusion model; Wherein, determining that the test traffic environment image does not meet the preset condition based on the test result includes: Acquire a first test result of testing a vehicle using the test traffic environment image; Obtaining a second test result, where the second test result is a result of testing the vehicle using a real traffic environment image similar to the test traffic environment image, or a test result of testing the vehicle using a test traffic environment image that is similar to the test traffic environment image and has been verified to be qualified; In response to a difference between the first test result and the second test result being greater than a preset threshold, it is determined that the test traffic environment image does not satisfy a preset condition.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Data processing method and device

    CN116665219A

  • Self-supervised image data set construction method, system and equipment based on diffusion generation

    CN117576515A