An intelligent test system for DMS driver distraction and driving

Through the intelligent test system, image interference video and timing interference video are generated, which solves the problems of large manpower and material consumption and long test cycles of existing DMS testing methods, and achieves the effect of rapid, economical and comprehensive evaluation of the performance of the DMS system.

CN119512970BActive Publication Date: 2025-04-25JUNJIE INTELLIGENT (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510067704.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-04-25
Estimated Expiration
2045-01-16

AI Technical Summary

Technical Problem

The existing DMS driver monitoring system testing methods have problems such as large manpower and material consumption and long test cycles, and it is difficult to comprehensively evaluate the performance of the system under various conditions.

Method used

An intelligent test system for distraction and driving of DMS drivers is proposed. The original video and identification tags are obtained through the video preparation module. The interference policy module generates image interference policies and timing interference policies. The test execution module executes system tests. The image processing module and timing processing module perform interference processing on the video, and generates image interference video and timing interference video to test the performance of the DMS system.

Benefits of technology

The rapid generation of large amounts of video data through software simulation reduces the labor and material cost and cycle of the test, and can simulate and evaluate the performance of DMS in a variety of complex environments in a short time, improves the efficiency and economics of the test, and enhances the comprehensiveness and robustness of the test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512970B_ABST
    Figure CN119512970B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of vehicle-mounted vision technology. The present invention discloses an intelligent test system for driver distraction and driving of a DMS, including: a video preparation module for obtaining original videos and corresponding identification tags; an interference strategy module for generating image interference strategies and timing interference strategies; a test execution module for executing system tests; an initial test module for using original videos for system tests; an image processing module for applying image interference strategies to generate image interference videos; a first test module for using image interference videos for system tests; a timing processing module for applying timing interference strategies to generate timing interference videos; a second test module for using timing interference videos for system tests; and a result output module for outputting system test results. The human and material costs of the test are reduced, the test cycle is shortened, and the recognition accuracy and robustness of the DMS in a variety of complex environments are comprehensively evaluated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle-mounted vision technology, and more specifically, to a DMS driver distraction and driving intelligent testing system. Background Art

[0002] The Driver Monitoring System (DMS) is one of the important technologies in the field of automotive safety. DMS uses monitoring video to determine the driver's status, such as fatigue and distraction, and issues warnings in a timely manner to reduce the probability of traffic accidents. The system integrates advanced image recognition, behavior analysis and other technologies, and can work effectively in various driving environments, thereby improving the safety performance of the vehicle; therefore, it has high requirements for the reliability of the DMS system, and it is necessary to conduct systematic testing of the DMS;

[0003] However, the existing DMS testing methods mainly include real vehicle testing and video simulation testing. The real vehicle test installs equipment on a real vehicle, and asks the driver to simulate various actions to trigger the DMS system, and directly records the detection effect of the DMS. Although this method can intuitively demonstrate the performance of the DMS, it requires a lot of manpower and material resources, and the test cycle is long. Although the video simulation test requires less manpower and material resources, due to the complex and changeable environment in the real car, it is difficult to fully evaluate the performance of the DMS system through video simulation. Therefore, both of the above methods have certain limitations and cannot efficiently and accurately evaluate the performance of the DMS system under various conditions. Summary of the invention

[0004] In order to overcome the problem that the prior art requires a lot of manpower and material resources and has a long testing cycle, the present invention proposes a DMS driver distraction and driving intelligent testing system to solve the above problems.

[0005] The present invention provides the following technical solutions:

[0006] A DMS driver distraction and driving intelligent testing system, comprising:

[0007] Video preparation module, used to obtain original video and corresponding identification tags;

[0008] The interference strategy module is used to generate a number of image interference strategies to form an image interference strategy set, and is also used to generate a number of timing interference strategies to form a timing interference strategy set;

[0009] A test execution module, used to execute a system test, wherein the system test is to input a video into a driver monitoring system and obtain an output label of the driver monitoring system;

[0010] The initial test module is used to control the test execution module to use the original video to perform system testing, and record the obtained output label as the original label, and determine whether the original label is the same as the recognition label. If they are the same, the original video is sent to the image processing module;

[0011] An image processing module, used for applying each image interference strategy in the image interference strategy set to the original video, and generating a corresponding image interference video for each image interference strategy;

[0012] The first test module is used to control the test execution module to use the image interference video to perform system testing, and record the obtained output label as the first label, and determine whether the first label is the same as the identification label. If they are the same, the image interference video is sent to the timing processing module;

[0013] A timing processing module, used for applying each timing interference strategy in the timing interference strategy set to the image interference video, and generating a corresponding timing interference video for each timing interference strategy;

[0014] A second test module is used to control the test execution module to use the timing interference video to perform system testing, and record the obtained output label as a second label;

[0015] The result output module is used to output the results of all system tests.

[0016] Preferably, the image interference strategy includes a resolution ratio, a blur weight, a noise strategy and a brightness ratio; the noise strategy includes a noise ratio and a noise deviation; and the method for generating the image interference strategy includes:

[0017] Get any integer value within the preset resolution ratio value range as the resolution ratio;

[0018] Obtain any integer value within the preset fuzzy weight value range as the fuzzy weight;

[0019] Obtain any value within a preset noise ratio value range as the noise ratio, and obtain any integer value within a preset noise deviation value range as the noise deviation;

[0020] Get any value within the preset brightness ratio value range as the brightness ratio;

[0021] The resolution ratio, blur weight, noise ratio, noise bias and brightness ratio are combined to obtain an image perturbation strategy.

[0022] Preferably, the timing interference strategy includes a sampling interval and a planned ratio; and the method for generating the timing interference strategy includes:

[0023] Get any integer value within the preset sampling interval value range as the sampling interval;

[0024] Get any value within the preset planning ratio value range as the planning ratio;

[0025] Combining the sampling interval and the planning ratio results in a timing interference strategy.

[0026] Preferably, the step of generating the image interference video includes:

[0027] Obtain an image interference strategy from the image interference strategy set, obtain the original video, and use the video frame extraction technology to decompose the original video into discrete frame images;

[0028] For each frame image, the resolution of the frame image is adjusted according to the resolution ratio in the image interference strategy; the frame image is blurred according to the fuzzy weight in the image interference strategy, and the frame image is noise processed according to the noise strategy in the image interference strategy; the brightness of the frame image is adjusted according to the brightness ratio in the image interference strategy;

[0029] The frame images are reassembled to obtain the image interference video.

[0030] Preferably, the step of blurring the frame image according to the blur weight in the image interference strategy includes:

[0031] Decompose the frame image into three color channels of red, green and blue to obtain three corresponding decomposed images;

[0032] Create a size of The fuzzy convolution kernel is used to obtain the fuzzy weight in the interference strategy , set the sum of all the position weights of the blurred convolution kernel to 1, and set the center position weight of the blurred convolution kernel to , and the weights of the non-central positions of the blurred convolution kernel are uniformly set, where is the preset kernel size;

[0033] For the three decomposed images, traverse each pixel in the image and record the traversed pixel as the target pixel;

[0034] For each target pixel, align the center of the convolution kernel with the target pixel, calculate the sum of the products of the target pixel and its surrounding pixel values ​​and the corresponding elements of the blur convolution kernel, and use the calculated sum of the products as the new value of the target pixel;

[0035] The three decomposed images are combined into one image as an image after blurring the frame image.

[0036] Preferably, the step of performing noise processing on the frame image according to the noise strategy in the image interference strategy includes:

[0037] Get the noise ratio and noise deviation in the noise strategy, and get the resolution of the frame image ,in Indicates the number of horizontal pixels of the frame image. Indicates the number of vertical pixels of the frame image;

[0038] Obtain the horizontal range and vertical range of noise insertion according to the face position in the frame image;

[0039] Get the noise ratio, multiply the number of pixels in the frame image by the noise ratio to get the number of noise points ;

[0040] Randomly select between horizontal and vertical ranges pixels as target pixels;

[0041] The noise deviation is added or subtracted from the RGB value of the target pixel to complete the noise processing of the frame image.

[0042] Preferably, the step of obtaining the horizontal range and vertical range of noise insertion according to the face position in the frame image includes:

[0043] Get the frame image and use face recognition technology to get the face bounding box quadruple in the frame image ,in Indicates the horizontal position of the pixel corresponding to the upper left corner of the bounding box, Indicates the vertical position of the pixel corresponding to the upper left corner of the bounding box, represents the width of the bounding box, Indicates the height of the bounding box;

[0044] Set the horizontal range to [ 1 α ( x 1 + w ) + x − ( x 1 + w ) α ] , the vertical range is set to [ y 1 α ,( y 1 + h ) + y − ( y 1 + h ) α ] ,in is the preset range factor, and .

[0045] Preferably, the step of generating the timing interference video includes:

[0046] S1. Obtain a timing interference strategy from the timing interference strategy set, obtain an image interference video, use video frame extraction technology to decompose the image interference video into discrete frame images, copy and grayscale the frame image to obtain a grayscale image corresponding to the frame image, and all grayscale images form a grayscale image sequence in video time order;

[0047] S2. Get the sampling interval in the timing interference strategy , Planned Ratio ,

[0048] S3, at the beginning of the grayscale image sequence, every Take two consecutive grayscale images at each position to form an image pair;

[0049] S4. Get any image pair and record the previous image as image , the latter image is recorded as image ;

[0050] S5. Calculate image With image If the percentage of pixels that change is greater than the planned percentage, , then delete the image The corresponding frame image completes the processing of the image pair;

[0051] S6, repeating steps S4 to S5 until all image pairs are processed;

[0052] S7, recombining the frame images to obtain a time-series interference video.

[0053] Preferably, the calculation image With image The steps of changing the pixel ratio include:

[0054] Calculate the number of changed pixels. The calculation formula for the number of changed pixels is as follows:

[0055] ,

[0056] In the formula, Indicates the number of changed pixels, Indicates the number of pixels in the horizontal direction that the image interferes with the video. Indicates the number of pixels in the vertical direction that the image interferes with the video. Representing images Middle Line The grayscale value of the pixel in the column, Representing images Middle Line The grayscale value of the pixel in the column, Represents a judgment function. If the condition in the brackets is true, the function value is 1, otherwise the function value is 0. Indicates a preset rate of change threshold;

[0057] The percentage of changed pixels is obtained by dividing the number of changed pixels by the total number of pixels in image A.

[0058] Preferably, the results of the system test include the original video, the original video label, the image interference video, the image interference strategy corresponding to the image interference video, the first label, the timing interference video, the timing interference strategy corresponding to the timing interference video and the second label.

[0059] The present invention provides a DMS driver distraction and driving intelligent testing system, which has the following beneficial effects:

[0060] By introducing image interference strategy and timing interference strategy, this technical solution can quickly generate a large amount of video data through software simulation. Compared with real vehicle testing, this method greatly reduces the manpower and material costs of testing, and also shortens the testing cycle. In this way, the performance of DMS in a variety of complex environments can be simulated and evaluated in a short time, improving the efficiency and economy of the test. At the same time, by applying image and timing interference strategies to the original video, it is possible to simulate various complex situations that may be encountered in a real driving environment, such as low light, high noise, video quality degradation and frame loss. This makes the testing of DMS not limited to an ideal or single environment, but can more comprehensively evaluate the recognition accuracy and robustness of the system in various complex environments. Through this method, potential problems and deficiencies of DMS can be more effectively discovered, providing a basis for the optimization and improvement of the system, thereby enhancing the comprehensiveness of the test and the robustness evaluation. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 A schematic diagram of a module of a DMS driver distraction and driving intelligent testing system of the present invention;

[0062] Figure 2 The present invention is a schematic diagram of the steps for generating a timing interference video of a DMS driver distraction and driving intelligent testing system. DETAILED DESCRIPTION

[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Example 1

[0064] See also Figure 1 and Figure 2 In this embodiment, a DMS driver distraction and driving intelligent testing system includes:

[0065] Video preparation module, used to obtain original video and corresponding identification tags;

[0066] In this embodiment, the original video can be a driver video taken in an experimental environment by setting up a high-definition camera, or a real driver video in history. The identification tags include but are not limited to distraction, fatigue, using a mobile phone, and smoking; each tag corresponds to the corresponding driver status.

[0067] The interference strategy module is used to generate a number of image interference strategies to form an image interference strategy set, and is also used to generate a number of timing interference strategies to form a timing interference strategy set;

[0068] The image interference strategy includes a resolution ratio, a blur weight, a noise strategy and a brightness ratio; the noise strategy includes a noise ratio and a noise deviation; and the method for generating the image interference strategy includes:

[0069] Get any integer value within the preset resolution ratio value range as the resolution ratio;

[0070] Obtain any integer value within the preset fuzzy weight value range as the fuzzy weight;

[0071] Obtain any value within a preset noise ratio value range as the noise ratio, and obtain any integer value within a preset noise deviation value range as the noise deviation;

[0072] Get any value within the preset brightness ratio value range as the brightness ratio;

[0073] The resolution ratio, blur weight, noise ratio, noise bias and brightness ratio are combined to obtain an image perturbation strategy.

[0074] The timing interference strategy includes a sampling interval and a planned ratio; the method for generating the timing interference strategy includes:

[0075] Get any integer value within the preset sampling interval value range as the sampling interval;

[0076] Get any value within the preset planning ratio value range as the planning ratio;

[0077] Combining the sampling interval and the planning ratio results in a timing interference strategy.

[0078] In this embodiment, firstly, a series of selectable parameter ranges are set according to experience or experiments, such as the selection range of the resolution ratio is set to 70% to 90%, the selection range of the fuzzy weight is set to 0.5 to 0.9, the selection range of the noise ratio is set to 10% to 40%, the noise deviation is set to 1 to 100, and the selection range of the brightness ratio is set to 50% to 150%. Then, by randomly selecting specific values ​​from these preset ranges or directly manually setting specific values ​​within the range, for example, in a specific embodiment, the resolution ratio can be determined to be 80%, the fuzzy weight is determined to be 4 / 9, the noise ratio and the noise deviation are determined to be 15% and 25 respectively, and the brightness ratio is determined to be 120%. In this way, an image interference strategy is obtained, and multiple image interference strategies are combined to obtain an image interference strategy set. In the subsequent process, the original image is processed according to these image interference strategies. By setting the image interference strategy, including but not limited to adjusting the resolution ratio of the video, applying different degrees of blur effects, introducing noise, and adjusting the brightness, we can simulate the video effects in different environments. For example, by reducing the resolution ratio and increasing the noise, we can simulate low-light or low-quality video shooting environments; at the same time, by processing the original video to generate a large amount of video data simulating real-life scenes, we can effectively increase the amount of test data and improve the test results.

[0079] For the timing interference strategy, the parameter selection range is also preset, such as the sampling interval selection range is 2 to 10, and the planning ratio selection range is 0% to 50%. Similarly, specific values ​​are randomly selected from these preset ranges or directly set manually within the range. For example, a specific timing interference strategy can be a sampling interval of 600ms and a planning ratio of 25%. In this way, a timing interference strategy is obtained, and multiple timing interference strategies are combined to obtain a timing interference strategy set. In the subsequent process, the original image is processed according to these timing interference strategies. By setting the timing interference strategy and extracting frames from the video, the situation of frame loss in reality can be simulated. At the same time, the amount of test data is increased, and the comprehensiveness of the test is improved.

[0080] A test execution module, used to execute a system test, wherein the system test is to input a video into a driver monitoring system and obtain an output label of the driver monitoring system;

[0081] In this embodiment, the function of the execution module is to input the video into the driver monitoring system to be tested, and at the same time record the judgment result of the driver monitoring system on the input video, that is, the output label.

[0082] The initial test module is used to control the test execution module to use the original video to perform system testing, and record the obtained output label as the original label, and determine whether the original label is the same as the recognition label. If they are the same, the original video is sent to the image processing module;

[0083] In this embodiment, the original video is first used for testing. If the driver monitoring system fails to correctly identify the original video, the test of the original video is completed. The test can be ended or replaced with a new original video for subsequent testing. If the driver monitoring system correctly identifies it, the original video is subsequently processed to obtain more test data.

[0084] An image processing module, used for applying each image interference strategy in the image interference strategy set to the original video, and generating a corresponding image interference video for each image interference strategy;

[0085] Obtain an image interference strategy from the image interference strategy set, obtain the original video, and use the video frame extraction technology to decompose the original video into discrete frame images;

[0086] For each frame image, the resolution of the frame image is adjusted according to the resolution ratio in the image interference strategy; the frame image is blurred according to the fuzzy weight in the image interference strategy, and the frame image is noise processed according to the noise strategy in the image interference strategy; the brightness of the frame image is adjusted according to the brightness ratio in the image interference strategy;

[0087] The frame images are reassembled to obtain the image interference video.

[0088] The step of blurring the frame image according to the blur weight in the image interference strategy comprises:

[0089] Decompose the frame image into three color channels of red, green and blue to obtain three corresponding decomposed images;

[0090] Create a size of The fuzzy convolution kernel is used to obtain the fuzzy weight in the interference strategy , set the sum of all the position weights of the blurred convolution kernel to 1, and set the center position weight of the blurred convolution kernel to , and the weights of the non-central positions of the blurred convolution kernel are uniformly set, where is the preset kernel size;

[0091] For the three decomposed images, traverse each pixel in the image and record the traversed pixel as the target pixel;

[0092] For each target pixel, align the center of the convolution kernel with the target pixel, calculate the sum of the products of the target pixel and its surrounding pixel values ​​and the corresponding elements of the blur convolution kernel, and use the calculated sum of the products as the new value of the target pixel;

[0093] The three decomposed images are combined into one image as an image after blurring the frame image.

[0094] The step of performing noise processing on the frame image according to the noise strategy in the image interference strategy comprises:

[0095] Get the noise ratio and noise deviation in the noise strategy, and get the resolution of the frame image ,in Indicates the number of horizontal pixels of the frame image. Indicates the number of vertical pixels of the frame image;

[0096] Obtain the horizontal range and vertical range of noise insertion according to the face position in the frame image;

[0097] Get the noise ratio, multiply the number of pixels in the frame image by the noise ratio to get the number of noise points ;

[0098] Randomly select between horizontal and vertical ranges pixels as target pixels;

[0099] The noise deviation is added or subtracted from the RGB value of the target pixel to complete the noise processing of the frame image.

[0100] The step of obtaining the horizontal range and vertical range of noise insertion according to the face position in the frame image includes:

[0101] Get the frame image and use face recognition technology to get the face bounding box quadruple in the frame image ,in Indicates the horizontal position of the pixel corresponding to the upper left corner of the bounding box, Indicates the vertical position of the pixel corresponding to the upper left corner of the bounding box, represents the width of the bounding box, Indicates the height of the bounding box;

[0102] Set the horizontal range to [ 1 α ( x 1 + w ) + x − ( x 1 + w ) α ] , the vertical range is set to [ y 1 α ,( y 1 + h ) + y − ( y 1 + h ) α ] ,in is the preset range factor, and .

[0103] In this embodiment, the video is processed by dividing the video into frames, processing each frame image, and then merging the frame images. The technology of dividing and merging the video frames belongs to the existing technology and will not be described in detail here. For the divided video image frames, the resolution is first adjusted, which is usually achieved by compressing the number of horizontal and vertical pixels of the image in proportion to the resolution ratio. Then, the color image is decomposed into three color channels of R, G, and B. This can be done by existing technology. After the decomposition, the pixel value of each channel is usually between 0 and 255, which is equivalent to the pixel value of the grayscale image and is easier to process.

[0104] In this embodiment, the blur processing takes a 3x3 blur convolution kernel as an example: assuming the blur weight is 5 / 9, the weight of the center position of the convolution kernel is set to 5 / 9, and the weight of the non-center position is set uniformly to ensure that the sum of all weights of the convolution kernel is 1, that is, the generated blur convolution kernel is: [ 1 18 1 18 1 18 1 18 5 9 1 18 1 18 1 18 1 18 ] It should be noted that the larger the center weight is set, the weaker the blur effect is. The larger the convolution kernel is, the stronger the blur effect is. For each color channel, each pixel in the image is traversed to perform blur operations. For example, for the target pixel, the center of the blur convolution kernel is placed on the point, and the weighted sum of the surrounding pixels including the target pixel and the blur convolution kernel is calculated. Through this step, the pixel value of the target pixel is close to the pixel value of the surrounding pixels, thereby producing a blur effect. Then, the images of the three color channels are merged to blur the image while retaining the color.

[0105] In this embodiment, the noise processing takes 1080P resolution video as an example: the video frame image usually has 1920 horizontal pixels and 1080 vertical pixels. Next, the existing face recognition technology is used to analyze the frame image, and the bounding box of each detected face is obtained. According to the range coefficient such as 2 and the position of the bounding box in the image, the bounding box is expanded in all directions to ensure that the noise is not limited to the face area, but is introduced within a certain range around the face. Since this range is usually the key area of ​​concern for the driver monitoring system, the effect of noise introduction is improved. At the same time, it should be noted that the larger the range coefficient, the smaller the expansion of the bounding box. Then obtain the noise ratio and noise deviation in the noise strategy. For example, if the noise ratio is 0.1 and the noise deviation is 30, the number of noise points is calculated as Then the value of each color channel of the target pixel will change randomly within the range of plus or minus 30, thus forming noise.

[0106] Finally, the brightness ratio is obtained, and the brightness of the entire image is adjusted according to the brightness ratio to simulate the video shooting effect under different lighting conditions. The frame images after the above processing are reassembled into a video. Assuming that the frame rate of the original video is 30fps, the processed frames are reassembled at the same frame rate to generate an image interference video that simulates the changes in the real environment.

[0107] The first test module is used to control the test execution module to use the image interference video to perform system testing, and record the obtained output label as the first label, and determine whether the first label is the same as the identification label. If they are the same, the image interference video is sent to the timing processing module;

[0108] In this embodiment, the image interference video obtained after processing is used for testing. Similarly, if the driver monitoring system fails to correctly identify the image interference video, the test of the image interference video is completed, the test can be ended, or a new image interference video can be replaced for subsequent testing. If the driver monitoring correctly identifies it, the image interference video is subsequently processed to obtain more test data.

[0109] A timing processing module, used for applying each timing interference strategy in the timing interference strategy set to the image interference video, and generating a corresponding timing interference video for each timing interference strategy;

[0110] The step of generating the timing interference video includes:

[0111] S1. Obtain a timing interference strategy from the timing interference strategy set, obtain an image interference video, use video frame extraction technology to decompose the image interference video into discrete frame images, copy and grayscale the frame image to obtain a grayscale image corresponding to the frame image, and all grayscale images form a grayscale image sequence in video time order;

[0112] S2. Get the sampling interval in the timing interference strategy , Planned Ratio ,

[0113] S3, at the beginning of the grayscale image sequence, every Take two consecutive grayscale images at each position to form an image pair;

[0114] S4. Get any image pair and record the previous image as image , the latter image is recorded as image ;

[0115] S5. Calculate image With image If the percentage of pixels that change is greater than the planned percentage, , then delete the image The corresponding frame image completes the processing of the image pair;

[0116] S6, repeating steps S4 to S5 until all image pairs are processed;

[0117] S7, recombining the frame images to obtain a time-series interference video.

[0118] The calculated image With image The steps of changing the pixel ratio include:

[0119] Calculate the number of changed pixels. The calculation formula for the number of changed pixels is as follows:

[0120] ,

[0121] In the formula, Indicates the number of changed pixels, Indicates the number of pixels in the horizontal direction that the image interferes with the video. Indicates the number of pixels in the vertical direction that the image interferes with the video. Representing images Middle Line The grayscale value of the pixel in the column, Representing images Middle Line The grayscale value of the pixel in the column, Represents a judgment function. If the condition in the brackets is true, the function value is 1, otherwise the function value is 0. Indicates a preset rate of change threshold;

[0122] The percentage of changed pixels is obtained by dividing the number of changed pixels by the total number of pixels in image A.

[0123] In this example, video frame extraction technology is used to extract all frames, and each frame image is converted into a grayscale image. In this way, we get a grayscale image sequence, which is arranged in the time order of the video. Select a temporal interference strategy, including determining the sampling interval and the planned ratio. For example, the sampling interval is set to 5 and the planned ratio is 40%. According to the set sampling interval of 5, two consecutive grayscale images are selected and combined into multiple image pairs. It should be noted that the smaller the sampling interval and the planned ratio are set, the more frames are usually extracted. For example, if the video has 100 frames, a sequence of image pairs [(1, 2), (7, 8), (13, 14), ...] will be created. For each image pair, calculate the percentage of changed pixels. First, the number of changed pixels needs to be calculated. Taking image A and image B as an example, the pixel change amount is calculated using the formula; when calculating, the change rate from the pixel in image A to the pixel in image B exceeds a preset change threshold such as 20%, it is considered a changed pixel. Next, the total number of pixels in image A is used as the denominator and the number of changed pixels is used as the numerator to calculate the percentage of changed pixels. If this ratio exceeds the planned ratio, such as 30%, image B in the image pair will be deleted; otherwise, it will be retained. After the above processing, the remaining frames will be reassembled into a video. This step completes the generation of the temporal interference video.

[0124] Through the above method, we can obtain a video with timing interference. This video increases the diversity and complexity of video data by simulating the common picture jumping and frame loss phenomena in the real environment, which has a positive effect on testing the comprehensiveness and robustness of the driver monitoring system.

[0125] A second test module is used to control the test execution module to use the timing interference video to perform system testing, and record the obtained output label as a second label;

[0126] In this embodiment, the processed time-series interference video is used for testing, and the test results are recorded.

[0127] The result output module is used to output the results of all system tests. Example 2

[0128] See also Figure 1 Based on Example 1, the results of the system test include the original video, the original video label, the image interference video, the image interference strategy corresponding to the image interference video, the first label, the timing interference video, the timing interference strategy corresponding to the timing interference video and the second label.

[0129] In this example, the output of the system test results includes but is not limited to charts, text, etc. By analyzing the system test results, the staff can clearly see under what circumstances the driver monitoring system performs well and under what circumstances. For example, if the system's performance in image interference videos is significantly reduced, it may mean that the system is more sensitive to changes in image quality and needs to further optimize its robustness to image quality fluctuations. If the recognition accuracy rate decreases in time-series interference videos, it indicates that the system's ability to handle frame rate changes and frame loss needs to be strengthened.

[0130] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0131] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only one, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0132] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0133] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A DMS driver distraction and driving intelligent testing system, characterized in that: include: A video preparation module is used to obtain the original video and the corresponding identification label, where the identification label is the driver status; The interference strategy module is used to generate a number of image interference strategies to form an image interference strategy set, and is also used to generate a number of timing interference strategies to form a timing interference strategy set; The image interference strategy includes resolution ratio, blur weight, noise strategy and brightness ratio; The noise strategy includes a noise ratio and a noise deviation; The method for generating the image interference strategy includes: Get any integer value within the preset resolution ratio value range as the resolution ratio; Obtain any integer value within the preset fuzzy weight value range as the fuzzy weight; Obtain any value within a preset noise ratio value range as the noise ratio, and obtain any integer value within a preset noise deviation value range as the noise deviation; Get any value within the preset brightness ratio value range as the brightness ratio; The resolution ratio, blur weight, noise ratio, noise deviation and brightness ratio are combined to obtain an image interference strategy; The timing interference strategy includes a sampling interval and a planned ratio; the method for generating the timing interference strategy includes: Get any integer value within the preset sampling interval value range as the sampling interval; Get any value within the preset planning ratio value range as the planning ratio; The sampling interval and the planning ratio are combined to obtain a timing interference strategy; A test execution module, used to execute a system test, wherein the system test is to input the original video into the driver monitoring system and obtain an output label of the driver monitoring system; The initial test module is used to control the test execution module to use the original video to perform system testing, and record the obtained output label as the original label, and determine whether the original label is the same as the recognition label. If they are the same, the original video is sent to the image processing module; An image processing module, used for applying each image interference strategy in the image interference strategy set to the original video, and generating a corresponding image interference video for each image interference strategy; The step of generating the image interference video includes: Obtain an image interference strategy from the image interference strategy set, obtain the original video, and use the video frame extraction technology to decompose the original video into discrete frame images; For each frame image, the resolution of the frame image is adjusted according to the resolution ratio in the image interference strategy; the frame image is blurred according to the fuzzy weight in the image interference strategy, and the frame image is noise processed according to the noise strategy in the image interference strategy; the brightness of the frame image is adjusted according to the brightness ratio in the image interference strategy; Recombining the frame images to obtain the image interference video; The first test module is used to control the test execution module to use the image interference video to perform system testing, and record the obtained output label as the first label, and determine whether the first label is the same as the identification label. If they are the same, the image interference video is sent to the timing processing module; A timing processing module, used for applying each timing interference strategy in the timing interference strategy set to the image interference video, and generating a corresponding timing interference video for each timing interference strategy; A second test module is used to control the test execution module to use the timing interference video to perform system testing, and record the obtained output label as a second label; The result output module is used to output the results of all system tests.

2. The DMS driver distraction and driving intelligent testing system according to claim 1, characterized in that: The step of blurring the frame image according to the blur weight in the image interference strategy comprises: Decompose the frame image into three color channels of red, green and blue to obtain three corresponding decomposed images; Create a blur convolution kernel of size n×n, obtain the blur weight ε in the image interference strategy, set the sum of all position weights of the blur convolution kernel to 1, set the weight of the center position of the blur convolution kernel to ε, and set the weight of the non-center position of the blur convolution kernel uniformly, where n is the preset kernel size; For the three decomposed images, traverse each pixel in the image and record the traversed pixel as the target pixel; For each target pixel, align the center of the convolution kernel with the target pixel, calculate the sum of the products of the target pixel and its surrounding pixel values ​​and the corresponding elements of the blur convolution kernel, and use the calculated sum of the products as the new value of the target pixel; The three decomposed images are combined into one image as an image after blurring the frame image.

3. The DMS driver distraction and driving intelligent testing system according to claim 2, characterized in that: The step of performing noise processing on the frame image according to the noise strategy in the image interference strategy comprises: Obtain the noise ratio and noise deviation in the noise strategy, and obtain the resolution x×y of the frame image, where x represents the number of horizontal pixels of the frame image, and y represents the number of vertical pixels of the frame image; Obtain the horizontal range and vertical range of noise insertion according to the face position in the frame image; Get the noise ratio, and multiply the number of pixels in the frame image by the noise ratio to get the number of noise points z; Randomly select z pixels in the horizontal range and vertical range as target pixels; The noise deviation is added or subtracted from the RGB value of the target pixel to complete the noise processing of the frame image.

4. The DMS driver distraction and driving intelligent testing system according to claim 3, characterized in that: The step of obtaining the horizontal range and vertical range of noise insertion according to the face position in the frame image includes: Get the face frame image using face recognition technology to get the face bounding box quadruple (x1, y1, w, h) in the frame image, where x1 represents the horizontal position of the pixel corresponding to the upper left corner of the bounding box, y1 represents the vertical position of the pixel corresponding to the upper left corner of the bounding box, w represents the width of the bounding box, and h represents the height of the bounding box; Set the horizontal range to The vertical range is set to Wherein α is a preset range coefficient, and α>

1.

5. The DMS driver distraction and driving intelligent testing system according to claim 4, characterized in that: The step of generating the timing interference video includes: S1. Obtain a timing interference strategy from the timing interference strategy set, obtain an image interference video, use video frame extraction technology to decompose the image interference video into discrete frame images, copy and grayscale the frame image to obtain a grayscale image corresponding to the frame image, and all grayscale images form a grayscale image sequence in video time order; S2, obtain the sampling interval F and the planned ratio Q in the timing interference strategy, S3, taking two consecutive grayscale images at every F positions at the beginning of the grayscale image sequence to form an image pair; S4, obtain any image pair, record the first image as image A, and record the second image as image B; S5, calculating the ratio of changed pixels between image A and image B. If the ratio of changed pixels is greater than the planned ratio Q, deleting the frame image corresponding to image A, and completing the processing of the image pair; S6, repeating steps S4 to S5 until all image pairs are processed; S7, recombining the frame images to obtain a time-series interference video.

6. The DMS driver distraction and driving intelligent testing system according to claim 5, characterized in that: The step of calculating the percentage of changed pixels between image A and image B comprises: Calculate the number of changed pixels. The calculation formula for the number of changed pixels is as follows: Where BH represents the number of changed pixels, M represents the number of pixels in the horizontal direction of the image interfering with the video, N represents the number of pixels in the vertical direction of the image interfering with the video, and A i,j Represents the grayscale value of the pixel in the i-th row and j-th column of image A, B i,j represents the gray value of the pixel in the i-th row and j-th column in image B, P() represents the judgment function, the function value is 1 if the condition in the brackets is true, otherwise the function value is 0, and δ represents the preset change rate threshold; The percentage of changed pixels is obtained by dividing the number of changed pixels by the total number of pixels in image A.

7. The DMS driver distraction and driving intelligent testing system according to claim 6, characterized in that: The results of the system test include original video, original video label, image interference video, image interference strategy corresponding to the image interference video, first label, timing interference video, timing interference strategy corresponding to the timing interference video and second label.

Citation Information

Patent Citations

  • Visual monitoring method, device and system, vehicle and readable storage medium

    CN116758520A

  • Monitoring apparatus and method for driver

    KR1020090125899A