Automatic traffic regulation compliance determination method and device for autonomous driving testing

By using semantic maps and vehicle projection areas in autonomous driving tests to determine whether the autonomous driving system complies with traffic rules, the problem of inaccurate judgment results in the prior art is solved, and more efficient and reliable automated judgment of traffic compliance is achieved.

CN115662118BActive Publication Date: 2025-03-11INST OF SOFTWARE - CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211274635.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-18
Publication Date
2025-03-11
Estimated Expiration
2042-10-18

AI Technical Summary

Technical Problem

The prior art methods are not rich enough when judging whether an autonomous driving system complies with traffic rules, resulting in inaccurate judgment results.

Method used

An automated method for determining traffic compliance for autonomous driving tests is proposed. By obtaining the scene map of autonomous driving tests, a semantic map is drawn, and whether the target traffic elements are included based on the vehicle projection area is judged, and traffic compliance is evaluated.

Benefits of technology

It improves the accuracy and reliability of traffic compliance judgment results, realizes automated judgment, improves judgment efficiency, and reduces calculation complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115662118B_ABST
    Figure CN115662118B_ABST
Patent Text Reader

Abstract

The present invention discloses an automated traffic regulation compliance determination method and device for autonomous driving testing, and belongs to the field of autonomous driving technology. The method comprises: obtaining a scene map of the autonomous driving test, and drawing a semantic map based on the scene map, wherein different traffic elements in the scene map correspond to different colors in the semantic map; performing an autonomous driving test, and calculating the vehicle projection area of ​​the test object in the semantic map based on the world coordinates and bounding box of the test object; judging whether the vehicle projection area contains the target traffic element based on the color of the traffic element; judging whether the test object complies with traffic rules based on the judgment result of whether the vehicle projection area contains the target traffic element; and evaluating the traffic regulation compliance of the test object according to the statistics of the test object's compliance with traffic rules during the autonomous driving test. The present invention improves the accuracy and reliability of the traffic regulation compliance determination results, and improves the determination efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of autonomous driving, and relates to a method and device for automatically determining traffic regulation compliance for autonomous driving testing. Background Art

[0002] The autonomous driving system is a very complex system that includes a series of intelligent algorithms such as environmental perception, perception fusion, path planning, vehicle control, etc. How to ensure and detect the compliance of the autonomous driving system with traffic regulations is an urgent problem that needs to be solved.

[0003] Autonomous driving simulation testing has the characteristics of high testing efficiency, strong repeatability, low cost, and process safety. It can help R&D personnel and automotive certification agencies to optimize and verify autonomous driving systems. Its principle is to digitally restore the application scenarios of autonomous driving through mathematical modeling, establish a system model that is as close to the real world as possible, replace the real controller with an algorithm, and then combine sensor simulation and other technologies to complete the autonomous driving simulation test. When performing autonomous driving simulation tests, computer equipment collects data and calculates various indicators to evaluate the performance of the autonomous driving system. For safety and reliability reasons, compliance with traffic rules is also an important factor in measuring the performance of the autonomous driving system.

[0004] However, the relevant technology only obtains the driving data related to the autonomous driving system itself to determine whether it complies with traffic regulations, such as obtaining the driving speed of the autonomous driving system to determine whether it is speeding, etc. The method for determining compliance with traffic regulations is not rich enough, and the judgment result is not accurate enough. Summary of the invention

[0005] To solve the above problems, the present invention proposes a method and device for automated determination of traffic regulations compliance for autonomous driving tests, which more comprehensively considers the traffic regulations that may be involved in the driving process of the autonomous driving system, enriches the method for determining whether the autonomous driving system complies with traffic regulations, and improves the accuracy and reliability of the results of the traffic regulations compliance determination; and, the present invention automatically determines the traffic regulations compliance of the autonomous driving system by computer equipment, thereby improving the determination efficiency.

[0006] To achieve the above purpose, the technical contents of the present invention include:

[0007] A method for automatically determining traffic regulations compliance for autonomous driving testing, the method comprising:

[0008] Obtaining a scene map for an autonomous driving test, and drawing a semantic map based on the scene map, wherein different traffic elements in the scene map correspond to different colors in the semantic map;

[0009] Execute the autonomous driving test, and calculate a vehicle projection area of ​​the test object in the semantic map based on the world coordinates and bounding box of the test object;

[0010] Based on the color of the traffic element, determining whether the vehicle projection area includes a target traffic element;

[0011] Based on the determination result of whether the vehicle projection area includes the target traffic element, determining whether the test subject complies with traffic regulations;

[0012] According to the statistics of the test subject's compliance with traffic rules during the autonomous driving test, the traffic rule compliance of the test subject is evaluated, and the traffic rule compliance is used to indicate the degree of compliance of the test subject with the traffic rules.

[0013] Optionally, the calculating, based on the world coordinates and bounding box of the test object, a vehicle projection area of ​​the test object in the semantic map includes:

[0014] Obtaining the world coordinates of the test object, where the world coordinates refer to coordinates in a three-dimensional world coordinate system;

[0015] Performing coordinate system transformation on the world coordinates to obtain image coordinates of the test object, where the image coordinates refer to coordinates in a two-dimensional image coordinate system;

[0016] The bounding box of the test object is obtained, and the vehicle projection area is obtained in combination with the image coordinates of the test object.

[0017] Optionally, performing coordinate system transformation on the world coordinates to obtain image coordinates of the test object includes:

[0018] Obtain the number of pixels corresponding to the target distance in the scene map in the semantic map;

[0019] Acquire a plane reference point of the three-dimensional world coordinate system, where the plane reference point corresponds to the origin of the two-dimensional image coordinate system;

[0020] Calculating a plane offset of the test object relative to the plane reference point based on the world coordinates of the test object;

[0021] The number of pixels and the plane offset are multiplied to obtain the image coordinates of the test object.

[0022] Optionally, judging whether the vehicle projection area includes a target traffic element based on the color of the traffic element includes:

[0023] Clipping the semantic map to obtain a determination region, wherein the area of ​​the determination region is smaller than the area of ​​the semantic map;

[0024] Binarizing the determination area according to the color of the traffic element to obtain a binarized matrix, wherein the binarization includes setting the pixel point corresponding to the color of the target traffic element to 1;

[0025] Determine whether there is a target pixel point with a value of 1 in the binary matrix, and if the target pixel point exists, obtain the image coordinates of the target pixel point;

[0026] Determine whether the image coordinates of the target pixel point are in the vehicle projection area; if the image coordinates of the target pixel point are in the vehicle projection area, determine that the vehicle projection area contains the target traffic element; if the image coordinates of the target pixel point are not in the vehicle projection area, determine that the vehicle projection area does not contain the target traffic element.

[0027] Optionally, clipping the semantic map to obtain a determination area includes:

[0028] Obtaining image coordinates of vertices of the vehicle projection area;

[0029] Based on the image coordinates of the vertices, respectively calculating the minimum value and the maximum value of the vehicle projection area under the abscissa axis and the ordinate axis of the two-dimensional image coordinate system;

[0030] The minimum value and the maximum value are used as four vertices of the determination area, and the semantic map is clipped according to the four vertices to obtain the determination area.

[0031] Optionally, the target traffic element includes a solid lane line, and the traffic rule includes prohibiting driving on the solid lane line; and / or, the target traffic element includes a guide line, and the traffic rule includes prohibiting driving on the guide line; and / or, the target traffic element includes a grid line, and the traffic rule includes prohibiting driving on the grid line; and / or, the target traffic element includes a non-lane area, and the traffic rule includes prohibiting driving on the non-lane area;

[0032] The step of judging whether the test object complies with traffic rules based on the judgment result of whether the vehicle projection area includes the target traffic element comprises:

[0033] If the vehicle projection area includes any one of the solid lane line, the guide line, the grid line, and the non-lane area, it is determined that the test object does not comply with traffic regulations.

[0034] Optionally, the target traffic element includes a dashed lane line, and the traffic rule includes that the duration of pressing the dashed lane line is prohibited from exceeding a target duration;

[0035] The step of judging whether the test object complies with traffic rules based on the judgment result of whether the vehicle projection area includes the target traffic element comprises:

[0036] If the vehicle projection area includes the dashed lane line, the current time frame is recorded as the target time frame; wherein the vehicle projection area includes the dashed lane line in the target time frame;

[0037] Calculating the continuous duration of the target time frame;

[0038] If the continuous duration is less than or equal to the target duration, it is determined that the duration for which the test subject presses the dashed lane line does not exceed the target duration, and the test subject complies with the traffic rules corresponding to the dashed lane line;

[0039] If the continuous duration is greater than the target duration, it is determined that the duration for which the test subject presses the dashed lane line exceeds the target duration, and the test subject does not comply with traffic regulations.

[0040] Optionally, the target traffic element includes a dashed lane line, and the traffic rule includes prohibiting crossing from a solid lane line side of the dashed lane line to a dashed lane line side of the dashed lane line;

[0041] The step of judging whether the test object complies with traffic rules based on the judgment result of whether the vehicle projection area includes the target traffic element comprises:

[0042] If the vehicle projection area includes the virtual and solid lane lines, then obtaining a lane change direction vector corresponding to the virtual and solid lane lines, wherein the lane change direction vector is perpendicular to the virtual and solid lane lines and points from a virtual lane line side of the virtual and solid lane lines to a solid lane line side;

[0043] Recording the current time frame as a lane-changing time frame; wherein the vehicle projection area in the lane-changing time frame includes the virtual and solid lane lines;

[0044] Calculating a motion direction vector of the test object based on a first time frame and a last time frame of consecutive time frames in the lane change time frame, the motion direction vector pointing from the image coordinates of the test object in the first time frame to the image coordinates of the test object in the last time frame;

[0045] Calculating the angle between the moving direction vector and the lane changing direction vector;

[0046] If the angle between the motion direction vector and the lane change direction vector is less than 90 degrees, it is determined that the test object crosses from the dashed lane line side of the dashed lane line to the solid lane line side of the dashed lane line, and the test object complies with the traffic rules corresponding to the dashed lane line;

[0047] If the angle between the movement direction vector and the lane change direction vector is greater than or equal to 90 degrees, it is determined that the test object crosses from the solid lane line side of the virtual and solid lane line to the dashed lane line side, and the test object does not comply with traffic regulations.

[0048] Optionally, the target traffic element includes a zebra crossing, and the traffic rule includes giving way to pedestrians on the zebra crossing;

[0049] The step of judging whether the test object complies with traffic rules based on the judgment result of whether the vehicle projection area includes the target traffic element comprises:

[0050] If the vehicle projection area includes the zebra crossing, obtaining the pedestrian projection area of ​​the pedestrian in the semantic map;

[0051] Determine whether the image coordinates of the target pixel point are in the pedestrian projection area;

[0052] If the image coordinates of the target pixel point are not in the pedestrian projection area, it is determined that the pedestrian projection area does not include the zebra crossing, and the test subject complies with the traffic rules corresponding to the zebra crossing;

[0053] If the image coordinates of the target pixel point are in the pedestrian projection area, determining that the pedestrian projection area includes the zebra crossing, and acquiring the motion state of the test object;

[0054] If the motion state of the test object is a parking state, it is determined that the test object gives way to pedestrians at the zebra crossing and the test object complies with the traffic rules corresponding to the zebra crossing;

[0055] If the motion state of the test object is a driving state, it is determined whether the test object is in front of the pedestrian; wherein, if the test object is in front of the pedestrian, it is determined that the test object did not give way to pedestrians on the zebra crossing and the test object did not comply with traffic rules; if the test object is not in front of the pedestrian, it is determined that the test object gave way to pedestrians on the zebra crossing and the test object complied with traffic rules corresponding to the zebra crossing.

[0056] Optionally, the determining whether the test object is in front of the pedestrian includes:

[0057] Recording the current time frame as an overlapping time frame; wherein, in the overlapping time frame, both the vehicle projection area and the pedestrian projection area include the zebra crossing;

[0058] In the overlapping time frame, converting the world coordinates of the test object into local coordinates based on a local coordinate system, wherein the local coordinate system has the world coordinates of the pedestrian as an origin and the direction of movement of the pedestrian as an x-axis;

[0059] If the value of the local coordinate of the test object on the x-axis of the local coordinate system is greater than or equal to the target value, it is determined that the test object is in front of the pedestrian;

[0060] If the value of the local coordinate of the test object on the x-axis of the local coordinate system is smaller than the target value, it is determined that the test object is not in front of the pedestrian.

[0061] Optionally, the target traffic element includes a traffic light triggering area, and the traffic rule includes driving in the traffic light triggering area according to traffic light signals;

[0062] The step of judging whether the test object complies with traffic rules based on the judgment result of whether the vehicle projection area includes the target traffic element comprises:

[0063] If the vehicle projection area includes the traffic light triggering area, obtaining a traffic light signal corresponding to the traffic light triggering area;

[0064] When the traffic light signal is red, obtaining the stop line and intersection area corresponding to the traffic light signal, and obtaining the motion state of the test object;

[0065] If the motion state of the test object is a stopped state, it is determined whether the vehicle projection area includes the stop line or the intersection area; if the stop line and the intersection area are not included, it is determined that the test object complies with the traffic rules corresponding to the traffic light triggering area; if the stop line or the intersection area is included, it is determined that the test object does not comply with the traffic rules;

[0066] If the motion state of the test object is a driving state, the driving direction of the test object is calculated; if the driving direction is straight, left turn or U-turn, it is determined that the test object does not comply with traffic regulations; if the driving direction is a right turn, it is determined that the test object complies with the traffic regulations corresponding to the traffic light triggering area.

[0067] Optionally, calculating the driving direction of the test object includes:

[0068] Obtaining a first trajectory point and a last trajectory point of the test object in the intersection area, and using a direction vector from the first trajectory point to the last trajectory point as a first direction vector;

[0069] Obtain two trajectory points of the test object before entering the intersection area, and use the direction vector from the trajectory point at the previous moment to the trajectory point at the subsequent moment as the second direction vector;

[0070] If the rotation direction of the first direction vector relative to the second direction vector is clockwise, and the rotation angle is less than 90 degrees, the driving direction of the test object is a right turn.

[0071] Optionally, after acquiring the traffic light signal corresponding to the traffic light triggering area, the method further includes:

[0072] When the traffic light signal is yellow, obtaining the intersection area corresponding to the traffic light signal;

[0073] Calculate a first average speed and a second average speed, wherein the first average speed is the average speed of the test object in t time frames before entering the intersection area, and the second average speed is the average speed of the test object in t time frames in the intersection area, where t is a positive integer;

[0074] If the first average speed is greater than the second average speed, it is determined that the test subject has decelerated in the intersection area and the test subject complies with the traffic rules corresponding to the traffic light triggering area;

[0075] If the first average speed is less than or equal to the second average speed, it is determined that the test object does not decelerate in the intersection area and the test object does not comply with traffic regulations.

[0076] Optionally, the target traffic element includes a traffic sign triggering area, and the traffic rule includes driving in the traffic sign triggering area according to the traffic sign;

[0077] The step of judging whether the test object complies with traffic rules based on the judgment result of whether the vehicle projection area includes the target traffic element comprises:

[0078] If the vehicle projection area includes the traffic sign trigger area, then the traffic sign corresponding to the traffic sign trigger area is obtained; wherein the traffic sign includes any one of the following: a speed limit sign containing a speed limit value, a stop sign, and a yield sign;

[0079] Recording the current time frame as a mark time frame; wherein the vehicle projection area in the mark time frame includes the traffic sign triggering area;

[0080] Acquiring the vehicle behavior of the test object within the marker time frame;

[0081] If the vehicle behavior is consistent with the traffic sign corresponding to the traffic sign trigger area, it is determined that the test subject is driving in the traffic sign trigger area according to the traffic sign, and the test subject complies with the traffic rules corresponding to the traffic sign trigger area;

[0082] If the vehicle behavior is inconsistent with the traffic sign corresponding to the traffic sign trigger area, it is determined that the test object does not drive in the traffic sign trigger area according to the traffic sign and the test object does not comply with traffic regulations.

[0083] Optionally, the evaluating the traffic regulation compliance of the test subject according to statistics of the test subject's compliance with traffic regulations during the autonomous driving test includes:

[0084] Divide the traffic rules into important traffic rules and minor traffic rules;

[0085] Counting the compliance of the test subject with the important traffic rules and the minor traffic rules during the autonomous driving test;

[0086] If the test subject fully complies with the important traffic rules and the minor traffic rules, determining that the traffic rule compliance of the test subject is excellent;

[0087] If the test subject does not comply with the important traffic rules, or the number of times the test subject does not comply with the minor traffic rules is greater than a set threshold, then determining that the traffic rule compliance of the test subject is poor;

[0088] If the test subject fully complies with the important traffic rules but does not comply with the minor traffic rules, and the number of times of not complying with the minor traffic rules is less than or equal to a set threshold, it is determined that the traffic regulation compliance of the test subject is medium.

[0089] An automatic traffic regulation compliance determination device for autonomous driving testing, the device comprising:

[0090] A map acquisition module, used to acquire a scene map for an autonomous driving test, and to draw a semantic map based on the scene map, wherein different traffic elements in the scene map correspond to different colors in the semantic map;

[0091] An autonomous driving test module, configured to execute the autonomous driving test and calculate a vehicle projection area of ​​the test object in the semantic map based on the world coordinates and bounding box of the test object;

[0092] A first judgment module, used for judging whether the vehicle projection area includes a target traffic element based on the color of the traffic element;

[0093] A second judgment module, configured to judge whether the test subject complies with traffic rules based on a judgment result of whether the vehicle projection area includes the target traffic element;

[0094] The compliance determination module is used to evaluate the traffic regulation compliance of the test subject according to the statistics of the test subject's compliance with traffic regulations during the automatic driving test, and the traffic regulation compliance is used to indicate the degree of compliance of the test subject with the traffic regulations.

[0095] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned method for automatically determining traffic regulations compliance for autonomous driving testing.

[0096] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the above-mentioned method for automated determination of traffic regulations compliance for autonomous driving testing.

[0097] A computer program product, when the computer program product is run on a computer device, enables the computer device to execute the above-mentioned method for automatically determining traffic regulations compliance for autonomous driving testing.

[0098] Compared with the prior art, the present invention has at least the following advantages:

[0099] 1. The present invention enriches the method of judging whether the automatic driving system complies with traffic rules, and realizes the automatic judgment of traffic rules compliance. Compared with the related art that only obtains the driving data related to the automatic driving system itself to judge whether it complies with traffic rules, the present invention not only obtains the driving data related to the automatic driving system itself (such as vehicle projection area, trajectory points, driving speed, etc.) during the automatic driving test, but also obtains the scene data related to the location of the automatic driving system (such as lane lines, traffic light triggering areas, zebra crossings, traffic light signals, etc.), and combines various data to judge whether the automatic driving system complies with traffic rules, and more comprehensively considers the traffic rules that may be involved in the driving process of the automatic driving system, enriches the method of judging whether the automatic driving system complies with traffic rules, and improves the accuracy and reliability of the traffic rules compliance judgment results. In addition, since the automatic driving test will generate a large amount of data, the present invention obtains the relevant data by the computer equipment and calculates and judges whether the automatic driving system complies with traffic rules, making full use of the data generated by the automatic driving test, realizing the automatic judgment of the traffic rules compliance of the automatic driving system, and improving the judgment efficiency of traffic rules compliance;

[0100] 2. The present invention performs data calculation and judgment based on a two-dimensional image coordinate system, thereby reducing the computational complexity. That is, the present invention draws a two-dimensional semantic map based on a high-precision map of a three-dimensional scene, draws different traffic elements in different colors, and obtains the vehicle projection area of ​​the test object equipped with an autonomous driving system in the semantic map, and judges whether the vehicle projection area contains specific traffic elements based on the color of the traffic elements, so as to further judge whether the autonomous driving system complies with the traffic rules corresponding to the specific traffic elements. Since the calculation of the above judgment process maps various data into a two-dimensional image coordinate system, dimensionality reduction calculation is realized, which effectively reduces the computational complexity and reduces the processing overhead of computer equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0101] Figure 1 Flowchart of the automated method for determining traffic regulations compliance for autonomous driving testing.

[0102] Figure 2 Schematic diagram of the vehicle projection area and judgment area.

[0103] Figure 3 Schematic diagram of determining the positional relationship between image coordinates and vehicle projection area.

[0104] Figure 4 Schematic diagram of judging the relative positions of the test object and pedestrians.

[0105] Figure 5 Schematic diagram of traffic light triggering area, stop line and intersection area.

[0106] Figure 6 Schematic diagram of the statistical types of traffic regulations.

[0107] Figure 7 Block diagram of an automated traffic regulations compliance determination device for autonomous driving testing. DETAILED DESCRIPTION

[0108] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only specific embodiments of the present invention, not all 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.

[0109] The automatic determination method of traffic regulation compliance in the present invention is as follows: Figure 1 As shown, the process includes the following steps (steps 1 to 5).

[0110] Step 1: Obtain the scene map of the autonomous driving test and draw a semantic map based on the scene map. Different traffic elements in the scene map correspond to different colors in the semantic map.

[0111] Before executing the autonomous driving test, the computer device first obtains the scene map used in the current autonomous driving test, which is usually a high-precision map of a three-dimensional scene. The complexity of calculation based on the three-dimensional map is relatively high. Therefore, the computer device in the present invention draws a two-dimensional semantic map based on the three-dimensional scene map to reduce the calculation complexity. Among them, when drawing the semantic map, the computer device draws different traffic elements in the scene map in different colors to distinguish traffic elements in the semantic map. Optionally, traffic elements include but are not limited to: road areas (such as carriageways, sidewalks, etc.), road traffic markings (such as solid lane lines, dotted lane lines, virtual and solid lane lines, stop lines, guide lines, mesh lines, zebra crossings, etc.), traffic light trigger areas, etc.

[0112] In one example, the above step 1 includes the following sub-steps (steps 1.1 to 1.3).

[0113] Step 1.1: Draw the map area layer of the semantic map.

[0114] For example, paint the layer base color as light gray.

[0115] Step 1.2: Draw the road area in the map area layer.

[0116] The computer device obtains the bounding box of each traffic area (the road area and traffic light trigger area mentioned above, etc.) from the high-precision map of the three-dimensional scene (i.e., the scene map), and then draws the areas corresponding to different bounding boxes in different colors in the semantic map. For example, the sidewalk is drawn in dark gray, the carriageway is drawn in black, the traffic light trigger area is drawn in orange, and the other areas are the background color of the layer (such as light gray). For another example, the sidewalk is drawn in dark gray, the motor vehicle lane is drawn in black, the non-motor vehicle lane is drawn in dark gray, the traffic light trigger area is drawn in orange, and the other areas are the background color of the layer (such as light gray).

[0117] Step 1.3: Draw road traffic markings in the road area.

[0118] The computer equipment obtains the type and location of each road traffic marking from the high-precision map of the three-dimensional scene (i.e., the scene map), and then draws the corresponding locations of different types of road traffic markings in different colors in the semantic map. For example, the solid lane line is drawn in yellow, the dotted lane line is drawn in red, the dotted and solid lane lines are drawn in purple, the guide line is drawn in green, the stop line is drawn in blue, and the zebra crossing is drawn in brown. Optionally, when drawing solid lane lines, the computer device first obtains discrete points of the solid lane lines from the scene map, and then connects the discrete points into solid lines (straight lines or curves) in the semantic map, and draws the connecting lines in corresponding colors (such as yellow); when drawing dotted lane lines, the computer device first obtains discrete points of the dotted lane lines from the scene map, but for the convenience of detection, the computer device also connects the discrete points into solid lines (straight lines or curves) in the semantic map, and draws the connecting lines in corresponding colors (such as red); when drawing solid and virtual lane lines, the computer device can draw the solid lane lines and dotted lane lines in the solid and virtual lane lines separately according to the above method, but the solid lane lines and the dotted lane lines need to be drawn in the same color (such as purple).

[0119] Step 2: Perform an autonomous driving test and calculate the vehicle projection area of ​​the test object in the semantic map based on the world coordinates and bounding box of the test object.

[0120] The computer device can obtain driving data related to the autonomous driving system itself and scene data related to the location of the autonomous driving system during the execution of the autonomous driving test, and judge whether the autonomous driving system complies with traffic rules in real time based on these data; or the computer device can also obtain all operating data during the execution of the autonomous driving test, and judge whether the autonomous driving system complies with traffic rules offline based on these operating data after the autonomous driving test is completed. Among them, an important data in the driving data related to the autonomous driving system itself is the vehicle projection area of ​​the test object (the test vehicle equipped with the autonomous driving system in the present invention) in the semantic map. The calculation method of the vehicle projection area is introduced below.

[0121] In one example, the above step 2 includes the following sub-steps (steps 2.1 to 2.3).

[0122] Step 2.1: Get the world coordinates of the test object. The world coordinates refer to the coordinates in the three-dimensional world coordinate system.

[0123] The computer device performs the autonomous driving test. Since the autonomous driving test is implemented based on a three-dimensional scene map, when acquiring the position information, what can be directly acquired is the coordinates of each object in the three-dimensional world coordinate system, that is, the world coordinates. In the present invention, during the autonomous driving test, the computer device acquires the world coordinates of the test object in real time or at intervals (such as 0.1 seconds, etc.). Of course, the computer device can also acquire the world coordinates of non-test objects (such as pedestrians, obstacles, non-test vehicles, etc.) at the same time.

[0124] Optionally, since the test object and the non-test object have a certain volume, when acquiring the world coordinates, the computer device determines a reference point from the test object and the non-test object, and uses the world coordinates of the reference point as the world coordinates of the test object and the non-test object. For example, the world coordinates of the center point of the test object and the non-test object can be used as the world coordinates of the test object and the non-test object.

[0125] Step 2.2: Perform coordinate system transformation on the world coordinates to obtain the image coordinates of the test object. The image coordinates refer to the coordinates in the two-dimensional image coordinate system.

[0126] Since the subsequent calculations are based on the semantic map, the computer device needs to perform a coordinate system transformation to achieve dimensionality reduction after obtaining the world coordinates. In the present invention, the computer device transforms the world coordinates in the three-dimensional world coordinate system into image coordinates in the two-dimensional image coordinate system. The computer device performs a coordinate system transformation on the world coordinates of the test object to obtain the image coordinates of the test object; if the computer device also obtains the world coordinates of the non-test object in step 2.1, then when executing step 2.2, the world coordinates of the non-test object can also be simultaneously transformed to obtain the image coordinates of the non-test object. Optionally, the conversion of world coordinates into image coordinates (i.e., the above-mentioned coordinate system transformation processing) can be achieved through a coordinate transformation function, which can be pre-constructed, such as constructing a coordinate transformation function before step 1, and directly calling the pre-constructed coordinate transformation function when performing the coordinate system transformation processing in step 2.2.

[0127] In one example, taking the coordinate system transformation of the world coordinates of the test object as an example, the above step 2.2 includes the following sub-steps (steps 2.2.1 to 2.2.4). It should be understood that the process of coordinate system transformation of the world coordinates of the non-test object is consistent with the following steps 2.2.3 and 2.2.4 (steps 2.2.1 and 2.2.2 do not need to be repeated), and the present invention will not be repeated here.

[0128] Step 2.2.1: Get the number of pixels corresponding to the target distance in the scene map in the semantic map.

[0129] In the present invention, the target distance is determined according to the length unit of the scene map. For example, if the length in the scene map is in meters, the target distance is one meter, so the computer device calculates the number of pixels pixels_per_meter corresponding to the one-meter distance in the scene map in the semantic map.

[0130] Step 2.2.2: Obtain a plane reference point of the three-dimensional world coordinate system, wherein the plane reference point corresponds to the origin of the two-dimensional image coordinate system.

[0131] When performing the autonomous driving test, a simulated world is constructed based on the scene map, and the computer device obtains the world coordinates of all points in the simulated world. The world coordinates of each point include the coordinate values ​​of the three coordinate axes x, y, and z of the three-dimensional world coordinate system. The present invention uses the x-axis and y-axis of the three-dimensional world coordinate system as planes to count the minimum value x_min of the world coordinates of all points on the x-axis and the minimum value y_min on the y-axis. Among them, (x_min, y_min) constitutes the plane reference point of the three-dimensional world coordinate system, which corresponds to the origin (0, 0) of the two-dimensional image coordinate system.

[0132] Step 2.2.3: Calculate the plane offset of the test object relative to the plane reference point based on the world coordinates of the test object.

[0133] From the world coordinates of the test object, the coordinate values ​​(x, y) of the x-axis and y-axis of the test object in the three-dimensional world coordinate system can be obtained, and the plane offset (x-x_min, y-y_min) of the test object relative to the plane reference point (x_min, y_min) of the three-dimensional world coordinate system can be further calculated.

[0134] Step 2.2.4: Perform product processing on the number of pixel points and the plane offset to obtain the image coordinates of the test object.

[0135] In the present invention, the two-dimensional image coordinate system is based on pixels. The number of pixels per meter in the scene map corresponding to the number of pixels per meter in the semantic map is calculated by step 2.2.1. The image coordinates of the test object based on the two-dimensional image coordinate system are obtained by performing a product process on the plane offset (x-x_min, y-y_min) and the number of pixels per meter. Exemplarily, the calculation formula of the image coordinates (x_picture, y_picture) of the test object is as follows.

[0136] x_picture=pixels_per_meter*(x-x_min)

[0137] y_picture=pixels_per_meter*(y-y_min)

[0138] Optionally, the coordinate conversion function can be implemented as the above calculation formula. If the coordinate conversion function is pre-constructed before step 1, the above steps 2.2.1 and 2.2.2 are performed before step 1. After step 2.2.2, the computer device constructs the coordinate conversion function, that is, constructs the above calculation formula, wherein (x, y) is the independent variable in the coordinate conversion function, and (x_picture, y_picture) is the dependent variable in the coordinate conversion function; after obtaining the world coordinates, the computer device directly substitutes (x, y) in the world coordinates into the above calculation formula to obtain the image coordinates.

[0139] Step 2.3: Get the bounding box of the test object, and combine it with the image coordinates of the test object to obtain the vehicle projection area of ​​the test object in the semantic map.

[0140] The bounding box of the test object is used to detect and identify the test object. Usually, the bounding box is a polygon formed by the vertices of the test object. For example, if the test object is a test vehicle, the bounding box of the test object is a rectangle. Optionally, if the world coordinates of the test object in step 2.1 above are the world coordinates of the center point of the test object, then the image coordinates of the test object are also the image coordinates of the center point of the test object; and the center point of the test object corresponds to the center point of the bounding box of the test object. If the bounding box of the test object is a rectangular bounding box, then based on the image coordinates of the test object and the size of the bounding box of the test object, the image coordinates of the vertices of the bounding box of the test object can be calculated, which are p1, p2, p3, and p4 respectively. Based on this, the vehicle projection area of ​​the test object in the semantic map is a closed area Region1=(p1, p2, p3, p4, p1) surrounded by the image coordinates of the above four vertices.

[0141] Step 3: Determine whether the vehicle projection area contains the target traffic element based on the color of the traffic element.

[0142] When drawing the semantic map in step 1, different traffic elements are drawn in different colors, and the computer device can judge whether the vehicle projection area corresponding to the test object contains a specific target traffic element according to the color. In the present invention, when judging whether the target traffic element is included, the corresponding pixel points in the semantic map can be assigned values ​​based on the color of the traffic element to digitize the pixel points, which helps the computer device to quickly identify the target traffic element.

[0143] Optionally, the target traffic element can be one traffic element or multiple traffic elements. When the target traffic element is one traffic element, the computer device can binarize the pixels, that is, let the pixel value corresponding to the color of the target traffic element be 1, and let the pixel value corresponding to the color of other traffic elements be 0. When the target traffic element is multiple traffic elements, if the traffic rules corresponding to these multiple traffic elements are similar (such as all prohibiting crossing the line), the computer device can perform the above-mentioned binarization processing on the pixels, that is, let the pixel value corresponding to the color of these multiple traffic elements be 1; if the traffic rules corresponding to these multiple traffic elements are not related (such as one prohibiting crossing the line and the other giving way to pedestrians), the computer device can perform multi-valued processing on the pixels, that is, let the pixel value corresponding to the color of these multiple traffic elements be different values ​​other than 0, and let the pixel value corresponding to other traffic elements be 0.

[0144] In one example, taking the binarization of pixels as an example, the above step 3 includes the following sub-steps (steps 3.1 to 3.4).

[0145] Step 3.1: Crop the semantic map to obtain the decision region, where the area of ​​the decision region is smaller than the area of ​​the semantic map.

[0146] This example only performs binarization processing on specific areas in the semantic map, which can avoid wasting the processing resources of the computer equipment and improve the processing speed. Therefore, the semantic map needs to be cropped before the binarization process to narrow the scope of the binarization process. This example refers to the binarized area as the judgment area. In order to ensure accuracy while minimizing the area of ​​the judgment area as much as possible, optionally, the above step 3.1 includes: obtaining the image coordinates of the vertices of the vehicle projection area; based on the image coordinates of the vertices, respectively calculating the minimum and maximum values ​​of the vehicle projection area under the horizontal and vertical axes of the two-dimensional image coordinate system; using the minimum and maximum values ​​as the four vertices of the judgment area, and cropping the semantic map according to the four vertices to obtain the judgment area.

[0147] For example, Figure 2As shown, the vertices of the vehicle projection area corresponding to the test object are p1(x1, y1), p2(x2, y2), p3(x3, y3), and p4(x4, y4); based on the image coordinates of the vertices, it can be calculated that the minimum value of the vehicle projection area under the x-axis in the two-dimensional image coordinate system is x1, the maximum value is x3, and the minimum value under the y-axis is y2, and the maximum value is y4; then the computer device can determine the four vertices of the judgment area based on the minimum and maximum values ​​of the vehicle projection area under these two coordinate axes, which are Q1(x1, y2), Q2(x3, y2), Q3(x3, y4), and Q4(x1, y4), respectively, and the semantic map is clipped according to these four vertices to obtain the judgment area Region2 = (Q1, Q2, Q3, Q4, Q1).

[0148] Step 3.2: Binarize the determination area according to the color of the traffic element to obtain a binary matrix. The binarization includes setting the pixel points corresponding to the color of the target traffic element to 1.

[0149] The computer device performs binarization processing on the pixels in the determination area according to the color of the traffic element, assigns the pixel corresponding to the color of the target traffic element in the determination area to 1, and assigns the pixel corresponding to the color of other traffic elements to 0, thereby converting the determination area into a binary matrix. For example, the target traffic element includes a solid lane line, and the solid lane line is drawn in yellow when drawing the semantic map in step 1. When the computer device performs binarization processing on the determination area in step 3.2, the pixel corresponding to yellow is set to 1, and the pixel corresponding to other colors is set to 0; if there is no yellow pixel in the determination area, the value of all the pixels in the obtained binary matrix is ​​0; if all the pixels in the determination area are yellow, the value of all the pixels in the obtained binary matrix is ​​1.

[0150] One thing that needs to be explained is that the calculation of the position of the above-mentioned determination area needs to be based on the vehicle projection area of ​​the test object. During the autonomous driving test, the position of the test object usually changes continuously, so that the vehicle projection area also changes continuously, and the determination area also changes continuously with the vehicle projection area. If the semantic map is first cropped to obtain the determination area, and then the determination area is binarized to obtain a binarized matrix, although the processing speed can be improved and the processing overhead can be reduced to a certain extent by reducing the area of ​​the binarization processing, the binarization processing needs to be performed multiple times due to the continuous change of the position of the determination area, which may also cause unnecessary processing overhead.

[0151] Based on this, in order to avoid the computer device from performing multiple binarization processes, the present invention also proposes another way to obtain the binarization matrix corresponding to the determination area, that is, the above steps 3.1 to 3.2 can be replaced by: binarizing the semantic map according to the color of the traffic element to obtain the binarization matrix corresponding to the semantic map, the binarization process includes setting the pixel point corresponding to the color of the target traffic element to 1; according to the position of the determination area in the semantic map, extracting the corresponding pixel points from the binarization matrix corresponding to the semantic map to form the binarization matrix corresponding to the determination area. In other words, the computer device can first perform binarization processing on the complete semantic map, and then extract the corresponding data based on the different positions of the determination area in the semantic map to obtain the binarization matrix corresponding to the determination area. Among them, the description of the calculation method of the determination area, the process of binarization processing, etc., please refer to the above steps 3.1 to 3.2, and the present invention will not be repeated here.

[0152] Step 3.3: Determine whether there is a target pixel point with a value of 1 in the binary matrix, and if there is a target pixel point, obtain the image coordinates of the target pixel point.

[0153] The present invention refers to the pixel point with a value of 1 as the target pixel point. The computer device first determines whether the target pixel point exists in the binary matrix corresponding to the determination area. If the target pixel point exists in the binary matrix, the computer device obtains the image coordinates of the target pixel point in the semantic map. If the target pixel point does not exist in the binary matrix, it can be determined that the determination area does not contain the target traffic element, and the computer device assumes that the test object complies with the traffic rules corresponding to the target traffic element.

[0154] Step 3.4: Determine whether the image coordinates of the target pixel are within the vehicle projection area.

[0155] When the target pixel exists in the binary matrix corresponding to the judgment area, the computer device obtains the image coordinates of the target pixel, and then further determines whether the image coordinates are in the vehicle projection area corresponding to the test object. If the image coordinates of the target pixel are in the vehicle projection area, it is determined that the vehicle projection area contains the target traffic element, and the computer device needs to further determine whether the test object complies with the traffic rules corresponding to the target traffic element through the following step 4; if the image coordinates of the target pixel are not in the vehicle projection area, it is determined that the vehicle projection area does not contain the target traffic element, and it is assumed that the test object complies with the traffic rules corresponding to the target traffic element.

[0156] The present invention does not limit the specific implementation method of step 3.4. Optionally, the above step 3.4 includes: directing a ray from the image coordinates of the target pixel point in the target direction to obtain a target ray, and the target direction can be set to any direction (such as horizontal direction, vertical direction, etc.); calculating the number of intersections between the target ray and the vehicle projection area corresponding to the test object; if the number of intersections is an even number, the image coordinates of the target pixel point are not in the vehicle projection area; if the number of intersections is an odd number, the image coordinates of the target pixel point are in the vehicle projection area.

[0157] For example, Figure 3 As shown, there are three target pixels with values ​​of 1 in the determination area Region2 = (Q1, Q2, Q3, Q4, Q1), which are A, B, and C respectively; the computer device draws rays from the target pixels in the horizontal direction, and obtains three target rays respectively AO1, BO1, and CO1; the vehicle projection area is Region1 = (p1, p2, p3, p4, p1); the number of intersections between AO1 and the vehicle projection area is an even number 2, then the target pixel A is not in the vehicle projection area; the number of intersections between BO1 and the vehicle projection area is an odd number 1, then the target pixel B is in the vehicle projection area; the number of intersections between CO1 and the vehicle projection area is an even number 0, then the target pixel C is not in the vehicle projection area.

[0158] Step 4: Based on the judgment result of whether the vehicle projection area contains the target traffic element, it is judged whether the test object complies with the traffic regulations.

[0159] Based on the judgment of the above step 3.4, if the vehicle projection area includes the target traffic element, the computer device needs to further judge whether the test object complies with the traffic rules corresponding to the target traffic element; if the vehicle projection area does not include the target traffic element, it is assumed that the test object complies with the traffic rules corresponding to the target traffic element. The present invention is aimed at different target traffic elements and combines the characteristics of the traffic rules corresponding to the target traffic elements to set different methods for judging whether the test object complies with the traffic rules. Some exemplary embodiments are provided below. It should be understood that these embodiments do not constitute a limitation of the present invention. In actual applications, other matching judgment methods can also be set in combination with the target traffic elements and their corresponding traffic rules.

[0160] Optionally, the target traffic element and the traffic rule include at least one of the following situations: the target traffic element includes a solid lane line, and the traffic rule includes prohibiting pressing the solid lane line; the target traffic element includes a guide line, and the traffic rule includes prohibiting pressing the guide line; the target traffic element includes a grid line, and the traffic rule includes prohibiting pressing the grid line; the target traffic element includes a non-lane area, and the traffic rule includes prohibiting driving in the non-lane area. Based on this, the above step 4 includes: if the vehicle projection area includes any one of the solid lane line, guide line, grid line, and non-lane area, it is determined that the test object does not comply with the traffic rules.

[0161] Optionally, the target traffic element includes a dotted lane line, and the traffic rules include that the duration of pressing the dotted lane line is prohibited from exceeding a set target duration (such as 5 seconds, 10 seconds, etc.); the above step 4 includes: if the vehicle projection area includes the dotted lane line, recording the current time frame as the target time frame, that is, the vehicle projection area includes the dotted lane line within the target time frame; calculating the continuous duration of the target time frame; if the continuous duration is less than or equal to the target duration, determining that the duration of the test object pressing the dotted lane line does not exceed the target duration, and the test object complies with the traffic rules corresponding to the dotted lane line; if the continuous duration is greater than the target duration, determining that the duration of the test object pressing the dotted lane line exceeds the target duration, and the test object does not comply with the traffic rules.

[0162] In the above method, when calculating the continuous duration of the target time frame, the target time frames within an interval of N (N is a positive integer, such as N is 10, etc.) can be regarded as continuous time frames. For example, N is 5, and the computer device obtains the 3rd, 4th, 6th, 7th, 11th, and 18th time frames as the target time frames. Since the 4th time frame and the 6th time frame are separated by 1 time frame (less than 5 time frames), the 7th time frame and the 11th time frame are separated by 3 time frames (less than 5 time frames), and the 11th time frame and the 18th time frame are separated by 6 time frames (greater than 5 time frames), the 3rd, 4th, 6th, 7th, and 11th time frames in the target time frame are regarded as continuous time frames, and the computer device obtains the duration between the 3rd time frame and the 11th time frame, and uses the duration as the continuous duration of the target time frame.

[0163] Optionally, the target traffic elements include virtual and solid lane lines, and the traffic rules include prohibiting crossing from the solid lane line side of the virtual and solid lane lines to the virtual and solid lane lines; the above step 4 includes: if the vehicle projection area includes virtual and solid lane lines, obtaining the lane change direction corresponding to the virtual and solid lane lines; calculating the movement direction of the test object; if the movement direction is consistent with the lane change direction, determining that the test object crosses from the virtual and solid lane line side to the solid lane line side, and the test object complies with the traffic rules corresponding to the virtual and solid lane lines; if the movement direction is inconsistent with the lane change direction, determining that the test object crosses from the solid lane line side of the virtual and solid lane lines to the virtual and solid lane line side, and the test object does not comply with the traffic rules.

[0164] Among them, the lane changing direction corresponding to the virtual and solid lane lines can be indicated by a lane changing direction vector, which is perpendicular to the virtual and solid lane lines and points from the virtual and solid lane lines to the solid lane lines; the movement direction of the test object can be indicated by a movement direction vector, and the calculation process of the movement direction vector includes: recording the current time frame as the lane changing time frame, that is, the vehicle projection area in the lane changing time frame includes the virtual and solid lane lines; based on the first time frame and the last time frame of the continuous time frames in the lane changing time frame, calculate the movement direction vector of the test object, and the movement direction vector points from the image coordinates of the test object in the first time frame to the image coordinates of the test object in the last time frame. Based on this, whether the direction of movement is consistent with the direction of lane change and whether the test object complies with traffic rules can be judged by the following method: calculate the angle between the direction of movement vector and the direction of lane change vector; if the angle between the direction of movement vector and the direction of lane change vector is less than 90 degrees, the direction of movement is consistent with the direction of lane change, that is, it is determined that the test object crosses from the dotted lane line side of the virtual and real lane line to the solid lane line side, and the test object complies with the traffic rules corresponding to the virtual and real lane lines; if the angle between the direction of movement vector and the direction of lane change vector is greater than or equal to 90 degrees, the direction of movement is inconsistent with the direction of lane change, that is, it is determined that the test object crosses from the solid lane line side of the virtual and real lane line to the dotted lane line side, and the test object does not comply with traffic rules. Among them, the judgment of continuous time frames in the lane change time frame can refer to the judgment of continuous time frames in the above-mentioned target time frame, and the present invention will not be elaborated here.

[0165] Optionally, the target traffic element includes a zebra crossing, and the traffic rules include giving way to pedestrians on the zebra crossing; the above step 4 includes: if the vehicle projection area includes the zebra crossing, then obtaining the pedestrian projection area of ​​the pedestrian in the semantic map; judging whether the image coordinates of the target pixel point are in the pedestrian projection area; if the image coordinates of the target pixel point are in the pedestrian projection area, then determining that the pedestrian projection area includes the zebra crossing, and obtaining the motion state of the test object; if the motion state of the test object is a parking state, then determining that the test object gives way to pedestrians on the zebra crossing, and the test object obeys the traffic rules corresponding to the zebra crossing; if the motion state of the test object is a driving state, then determining whether the test object is in front of the pedestrian, and determining whether the test object obeys the traffic rules based on the judgment result; if the image coordinates of the target pixel point are not in the pedestrian projection area, then determining that the pedestrian projection area does not include the zebra crossing, and the test object obeys the traffic rules corresponding to the zebra crossing. Among them, the calculation method of the pedestrian projection area can refer to the calculation method of the vehicle projection area in the above step 4, and the present invention will not be repeated here.

[0166] Among them, whether the test object is in front of the pedestrian and whether the test object obeys the traffic rules can be judged by the following method: record the current time frame as an overlapping time frame, that is, the vehicle projection area and the pedestrian projection area both include zebra crossings in the overlapping time frame; in the overlapping time frame, convert the world coordinates of the test object into local coordinates based on a local coordinate system, and the local coordinate system takes the world coordinates of the pedestrian as the origin and the movement direction of the pedestrian as the x-axis, such as Figure 4 As shown (the local coordinate system can be a three-dimensional coordinate system or a two-dimensional coordinate system, Figure 4 The two-dimensional coordinate system is used as an example for the convenience of description only, which does not constitute a limitation of the present application); if the value of the local coordinate of the test object in the x-axis of the local coordinate system is greater than or equal to the target value, the test object is in front of the pedestrian, and it is determined that the test object did not give way to pedestrians on the zebra crossing, and the test object did not obey the traffic rules; if the value of the local coordinate of the test object in the x-axis of the local coordinate system is less than the target value, the test object is not in front of the pedestrian, and it is determined that the test object gave way to pedestrians on the zebra crossing, and the test object obeyed the traffic rules corresponding to the zebra crossing. Optionally, the target value can be zero or an integer less than zero. For example, the absolute value of the target value is equal to half of the long side or short side of the bounding box of the test object. In this way, setting the target value can take into account the volume of the test object, so that the judgment result is more accurate. Among them, the calculation method of the movement direction of the pedestrian can refer to the calculation method of the movement direction of the above-mentioned test object, and the present invention will not be elaborated here.

[0167] Optionally, the target traffic element includes a traffic light triggering area, and the traffic rule includes driving in the traffic light triggering area according to the traffic light signal; the above step 4 includes: if the vehicle projection area includes the traffic light triggering area (such as Figure 5401 as shown), then obtain the traffic light signal corresponding to the traffic light triggering area; when the traffic light signal is red, obtain the stop line corresponding to the traffic light signal (such as Figure 5 402) and intersection areas (such as Figure 5 403 as shown), and obtain the motion state of the test object; if the motion state of the test object is a stopped state, determine whether the vehicle projection area of ​​the test object contains a stop line or an intersection area. If not, the test object obeys the traffic rules corresponding to the traffic light trigger area; if included, the test object does not obey the traffic rules; if the motion state of the test object is a driving state, calculate the driving direction of the test object. If the driving direction is straight, left turn or U-turn, the test object does not obey the traffic rules; if the driving direction is a right turn, the test object obeys the traffic rules corresponding to the traffic light trigger area.

[0168] Among them, the calculation process of the test object's driving direction can be calculated by the following method: obtain the first trajectory point and the last trajectory point of the test object in the intersection area, and use the direction vector pointing from the first trajectory point to the last trajectory point as the first direction vector; obtain the two trajectory points of the test object before entering the intersection area, and use the direction vector pointing from the trajectory point at the previous moment to the trajectory point at the next moment as the second direction vector; if the rotation direction of the first direction vector relative to the second direction vector is clockwise, and the rotation angle is less than 90 degrees, the test object's driving direction is a right turn, otherwise the test object's driving direction is straight, left turn or U-turn.

[0169] In addition, in this example, when the traffic light signal obtained by the computer device is yellow, the intersection area corresponding to the traffic light signal is obtained; the average speed of the test object within t (t is a positive integer) time frames before entering the intersection area (first average speed), and the average speed within t time frames in the intersection area (second average speed) are calculated; if the first average speed is greater than the second average speed, it is determined that the test object slows down in the intersection area and the test object complies with the traffic rules corresponding to the traffic light triggering area; if the first average speed is less than or equal to the second average speed, it is determined that the test object does not slow down in the intersection area and the test object does not comply with traffic rules.

[0170] Optionally, the target traffic element includes a traffic sign trigger area, and the traffic rules include driving in the traffic sign trigger area according to the traffic sign; the above step 4 includes: if the vehicle projection area includes the traffic sign trigger area, obtaining the traffic sign corresponding to the traffic sign trigger area, wherein the traffic sign includes but is not limited to a speed limit sign (including a speed limit value), a stop sign, a yield sign, etc.; recording the current time frame as a sign time frame, that is, the vehicle projection area includes the traffic sign trigger area within the sign time frame; obtaining the vehicle behavior of the test object within the sign time frame; if the vehicle behavior is consistent with the traffic sign corresponding to the traffic sign trigger area, determining that the test object is driving in the traffic sign trigger area according to the traffic sign, and the test object complies with the traffic rules corresponding to the traffic sign trigger area; if the vehicle behavior is inconsistent with the traffic sign corresponding to the traffic sign trigger area, determining that the test object is not driving in the traffic sign trigger area according to the traffic sign, and the test object does not comply with the traffic rules.

[0171] Exemplarily, the traffic sign is a speed limit sign, and the vehicle behavior obtained by the computer device within the sign time frame is the driving speed of the test object. If the driving speed is less than or equal to the speed limit value indicated by the speed limit sign, the vehicle behavior is consistent with the traffic sign, otherwise the vehicle behavior is inconsistent with the traffic sign; alternatively, the traffic sign is a yield sign, and the vehicle behavior obtained by the computer device within the sign time frame is the driving speed of the test object. If the driving speed continues to decrease within the sign time frame, the vehicle behavior is consistent with the traffic sign, otherwise the vehicle behavior is inconsistent with the traffic sign; alternatively, the traffic sign is a stop sign, and the vehicle behavior obtained by the computer device within the sign time frame is the motion state of the test object. If the motion state is a stop state, the vehicle behavior is consistent with the traffic sign, otherwise the vehicle behavior is inconsistent with the traffic sign.

[0172] Step 5: Evaluate the test subject's compliance with traffic rules based on statistics of the test subject's compliance with traffic rules during the autonomous driving test. Traffic rule compliance is used to indicate the test subject's degree of compliance with traffic rules.

[0173] The computer device counts the test subject's compliance with traffic rules during the autonomous driving test, and evaluates the test subject's compliance with traffic rules based on the statistical results to indicate the test subject's degree of compliance with traffic rules. Optionally, the test subject's compliance with traffic rules can be expressed in the form of grades, scores, etc. For example, multiple levels of traffic rule compliance are pre-established, and a correspondence is established between different levels and compliance with traffic rules. After the statistical results are obtained, the test subject's compliance level with traffic rules is determined based on the correspondence. The present invention does not limit the specific content counted by the computer device. Optionally, the number of times, types, durations, frequencies, etc. of the test subject's failure to comply with traffic rules can be counted. For example, Figure 6As shown, traffic rules can be divided into different types. During the autonomous driving test, the computer device counts the test subject's compliance with traffic rules according to the type. It should be understood that in addition to judging whether the test subject complies with traffic rules in the manner of steps 1 to 4 above, the computer device in the present invention can also judge in combination with traditional methods or other methods, for example, Figure 6 As shown, the computer device can also determine whether a reasonable speed is maintained by obtaining the driving speed of the test object, determine whether a reasonable vehicle distance is maintained by obtaining the distance between the test object and a non-test vehicle, determine whether an illegal right-side overtaking is performed by obtaining the motion trajectory of the test object and the relative position relationship between the test object and the non-test object, etc.

[0174] In one example, the above step 5 includes: dividing important traffic rules and minor traffic rules from traffic rules; counting the compliance of the test object with important traffic rules and minor traffic rules during the automatic driving test; if the test object fully complies with the important traffic rules and minor traffic rules, then determining that the test object's traffic compliance is excellent; if the test object does not comply with the important traffic rules, or the number of times it does not comply with the minor traffic rules is greater than a set threshold, then determining that the test object's traffic compliance is poor; if the test object fully complies with the important traffic rules but does not comply with the minor traffic rules, and the number of times it does not comply with the minor traffic rules is less than or equal to the set threshold, then determining that the test object's traffic compliance is medium. Exemplarily, assuming that the number of times the test object does not comply with the important traffic rules is k1 (k1 is a natural number), the number of times it does not comply with the minor traffic rules is k2 (k2 is a natural number), and the set threshold is k0 (k0 is a positive integer), the calculation formula for the test object's traffic compliance M is as follows.

[0175]

[0176] Optionally, the basis for the division of the above-mentioned important traffic rules and minor traffic rules includes, but is not limited to: the degree of danger expected to be caused when not complying with traffic rules, the test duration associated with traffic rules, the complexity of traffic rules, etc. For example, according to the degree of danger expected to be caused when not complying with traffic rules, traffic rules such as giving way to pedestrians on zebra crossings and prohibiting crossing from the solid lane line side of the dashed lane line to the dashed lane line side of the dashed lane line can be classified as important traffic rules, and traffic rules such as prohibiting crossing the solid lane line, prohibiting crossing the guide line, prohibiting the duration of crossing the dashed lane line exceeding the set target duration, and prohibiting speeding can be classified as minor traffic rules. For another example, according to the test duration associated with traffic rules, if the test subject mainly drives on the carriageway (including solid lane lines, dashed lane lines, etc.) during the autonomous driving test and only passes through one intersection (including zebra crossings, traffic light triggering areas, etc.), then traffic rules such as prohibiting the solid lane lines from being pressed and the duration of pressing dashed lane lines from exceeding the set target duration can be classified as important traffic rules, and traffic rules such as giving way to pedestrians on zebra crossings and driving in traffic light triggering areas according to traffic light signals can be classified as secondary traffic rules. Of course, in actual applications, multiple classification bases can also be combined to classify important traffic rules and secondary traffic rules, and the present invention does not limit this.

[0177] In summary, the present invention enriches the method of judging whether the automatic driving system complies with traffic rules, and realizes the automatic determination of traffic rules compliance. Compared with the related art that only obtains the driving data related to the automatic driving system itself to judge whether it complies with traffic rules, the present invention not only obtains the driving data related to the automatic driving system itself (such as vehicle projection area, trajectory points, driving speed, etc.) during the automatic driving test, but also obtains the scene data related to the location of the automatic driving system (such as lane lines, traffic light triggering areas, zebra crossings, traffic light signals, etc.), and combines various data to judge whether the automatic driving system complies with traffic rules, and more comprehensively considers the traffic rules that may be involved in the automatic driving system during driving, enriches the method of judging whether the automatic driving system complies with traffic rules, and improves the accuracy and reliability of the traffic rules compliance judgment results. In addition, since the automatic driving test will generate a large amount of data, the present invention obtains the relevant data by the computer device and calculates and judges whether the automatic driving system complies with traffic rules, making full use of the data generated by the automatic driving test, realizing the automatic determination of the traffic rules compliance of the automatic driving system, and improving the efficiency of the determination of traffic rules compliance.

[0178] In addition, the present invention performs data calculation and judgment based on a two-dimensional image coordinate system, thereby reducing the computational complexity. That is, the present invention draws a two-dimensional semantic map based on a high-precision map of a three-dimensional scene, draws different traffic elements in different colors, and obtains the vehicle projection area of ​​the test object equipped with an autonomous driving system in the semantic map, and judges whether the vehicle projection area contains specific traffic elements based on the color of the traffic elements, so as to further judge whether the autonomous driving system complies with the traffic rules corresponding to the specific traffic elements. Since the calculation of the above judgment process maps various data into a two-dimensional image coordinate system, dimensionality reduction calculation is realized, which effectively reduces the computational complexity and reduces the processing overhead of computer equipment.

[0179] Please refer to Figure 7 , which shows a block diagram of an automatic traffic regulations compliance determination device for autonomous driving testing provided by an embodiment of the present invention. The automatic traffic regulations compliance determination device can be a computer device, or can be set in a computer device. Figure 7 As shown, the device 700 includes: a map acquisition module 710, an automatic driving test module 720, a first judgment module 730, a second judgment module 740 and a compliance judgment module 750.

[0180] A map acquisition module 710 is used to acquire a scene map for an autonomous driving test, and to draw a semantic map based on the scene map, wherein different traffic elements in the scene map correspond to different colors in the semantic map;

[0181] The autonomous driving test module 720 is used to perform the autonomous driving test and calculate the vehicle projection area of ​​the test object in the semantic map based on the world coordinates and bounding box of the test object;

[0182] A first judgment module 730 is used to judge whether the vehicle projection area includes a target traffic element based on the color of the traffic element;

[0183] A second judgment module 740 is used to judge whether the test object complies with traffic regulations based on the judgment result of whether the vehicle projection area includes the target traffic element;

[0184] The compliance determination module 750 is used to evaluate the traffic regulation compliance of the test subject according to the statistics of the test subject's compliance with traffic regulations during the autonomous driving test, and the traffic regulation compliance is used to indicate the degree of compliance of the test subject with the traffic regulations.

[0185] Optionally, the autonomous driving test module 720 is used to: obtain the world coordinates of the test object, where the world coordinates refer to the coordinates in a three-dimensional world coordinate system; perform coordinate system transformation on the world coordinates to obtain the image coordinates of the test object, where the image coordinates refer to the coordinates in a two-dimensional image coordinate system; obtain the bounding box of the test object, and obtain the vehicle projection area in combination with the image coordinates of the test object.

[0186] Optionally, the autonomous driving test module 720 is also used to: obtain the number of pixel points corresponding to the target distance in the scene map in the semantic map; obtain the plane reference point of the three-dimensional world coordinate system, the plane reference point corresponding to the origin of the two-dimensional image coordinate system; based on the world coordinates of the test object, calculate the plane offset of the test object relative to the plane reference point; and perform product processing on the number of pixel points and the plane offset to obtain the image coordinates of the test object.

[0187] Optionally, the first judgment module 730 is used to: crop the semantic map to obtain a judgment area, the area of ​​the judgment area is smaller than the area of ​​the semantic map; binarize the judgment area according to the color of the traffic element to obtain a binarization matrix, the binarization includes setting the pixel point corresponding to the color of the target traffic element to 1; determine whether there is a target pixel point with a value of 1 in the binarization matrix, and if the target pixel point exists, obtain the image coordinates of the target pixel point; determine whether the image coordinates of the target pixel point are in the vehicle projection area; wherein, if the image coordinates of the target pixel point are in the vehicle projection area, it is determined that the vehicle projection area contains the target traffic element; if the image coordinates of the target pixel point are not in the vehicle projection area, it is determined that the vehicle projection area does not contain the target traffic element.

[0188] Optionally, the first judgment module 730 is also used to: obtain the image coordinates of the vertices of the vehicle projection area; based on the image coordinates of the vertices, respectively calculate the minimum value and the maximum value of the vehicle projection area on the horizontal axis and the vertical axis of the two-dimensional image coordinate system; use the minimum value and the maximum value as the four vertices of the judgment area, and crop the semantic map according to the four vertices to obtain the judgment area.

[0189] Optionally, the target traffic element includes a solid lane line, and the traffic rule includes prohibiting crossing the solid lane line; and / or, the target traffic element includes a guide line, and the traffic rule includes prohibiting crossing the guide line; and / or, the target traffic element includes a grid line, and the traffic rule includes prohibiting crossing the grid line; and / or, the target traffic element includes a non-lane area, and the traffic rule includes prohibiting driving in the non-lane area; the second judgment module 740 is used to: if the vehicle projection area includes any one of the solid lane line, the guide line, the grid line, and the non-lane area, it is determined that the test object does not comply with the traffic rules.

[0190] Optionally, the target traffic element includes a dotted lane line, and the traffic rules include that the duration of pressing the dotted lane line is prohibited from exceeding a target duration; the second judgment module 740 is used to: if the vehicle projection area includes the dotted lane line, record the current time frame as the target time frame; wherein, within the target time frame, the vehicle projection area includes the dotted lane line; calculate the continuous duration of the target time frame; if the continuous duration is less than or equal to the target duration, determine that the duration for which the test subject presses the dotted lane line does not exceed the target duration, and the test subject complies with the traffic rules corresponding to the dotted lane line; if the continuous duration is greater than the target duration, determine that the duration for which the test subject presses the dotted lane line exceeds the target duration, and the test subject does not comply with the traffic rules.

[0191] Optionally, the target traffic elements include virtual and solid lane lines, and the traffic rules include prohibiting crossing from the solid lane line side of the virtual and solid lane lines to the virtual lane line side; the second judgment module 740 is used to: if the vehicle projection area includes the virtual and solid lane lines, obtain the lane change direction vector corresponding to the virtual and solid lane lines, and the lane change direction vector is perpendicular to the virtual and solid lane lines and points from the virtual and solid lane line side to the solid lane line side of the virtual and solid lane lines; record the current time frame as the lane change time frame; wherein, the vehicle projection area includes the virtual and solid lane lines in the lane change time frame; based on the first time frame and the last time frame of the consecutive time frames in the lane change time frame, calculate the movement direction of the test object The motion direction vector points from the image coordinates of the test object in the first time frame to the image coordinates of the test object in the last time frame; the angle between the motion direction vector and the lane changing direction vector is calculated; if the angle between the motion direction vector and the lane changing direction vector is less than 90 degrees, it is determined that the test object crosses from the dashed lane line side to the solid lane line side of the dashed lane line, and the test object complies with the traffic rules corresponding to the dashed lane line; if the angle between the motion direction vector and the lane changing direction vector is greater than or equal to 90 degrees, it is determined that the test object crosses from the solid lane line side to the dashed lane line side of the dashed lane line, and the test object does not comply with the traffic rules.

[0192] Optionally, the target traffic element includes a zebra crossing, and the traffic rules include giving way to pedestrians on the zebra crossing; the second judgment module 740 is used to: if the vehicle projection area includes the zebra crossing, obtain the pedestrian projection area of ​​the pedestrian in the semantic map; determine whether the image coordinates of the target pixel point are in the pedestrian projection area; if the image coordinates of the target pixel point are not in the pedestrian projection area, determine that the pedestrian projection area does not include the zebra crossing, and the test subject complies with the traffic rules corresponding to the zebra crossing; if the image coordinates of the target pixel point are in the pedestrian projection area, determine that the pedestrian projection area includes the zebra crossing , and obtain the motion state of the test object; if the motion state of the test object is a parking state, it is determined that the test object gives way to pedestrians on the zebra crossing and the test object obeys the traffic rules corresponding to the zebra crossing; if the motion state of the test object is a driving state, it is determined whether the test object is in front of the pedestrian; wherein, if the test object is in front of the pedestrian, it is determined that the test object does not give way to pedestrians on the zebra crossing and the test object does not obey the traffic rules; if the test object is not in front of the pedestrian, it is determined that the test object gives way to pedestrians on the zebra crossing and the test object obeys the traffic rules corresponding to the zebra crossing.

[0193] Optionally, the second judgment module 740 is also used to: record the current time frame as an overlapping time frame; wherein, in the overlapping time frame, the vehicle projection area and the pedestrian projection area both include the zebra crossing; in the overlapping time frame, convert the world coordinates of the test object into local coordinates based on a local coordinate system, the local coordinate system having the world coordinates of the pedestrian as the origin and the direction of movement of the pedestrian as the x-axis; if the value of the local coordinate of the test object in the x-axis of the local coordinate system is greater than or equal to the target value, then it is determined that the test object is in front of the pedestrian; if the value of the local coordinate of the test object in the x-axis of the local coordinate system is less than the target value, then it is determined that the test object is not in front of the pedestrian.

[0194] Optionally, the target traffic element includes a traffic light trigger area, and the traffic rules include driving in the traffic light trigger area according to the traffic light signal; the second judgment module 740 is used to: if the vehicle projection area includes the traffic light trigger area, obtain the traffic light signal corresponding to the traffic light trigger area; when the traffic light signal is red, obtain the stop line and intersection area corresponding to the traffic light signal, and obtain the motion state of the test object; if the motion state of the test object is a stopped state, determine whether the vehicle projection area includes the stop line or the intersection area; wherein, if the stop line and the intersection area are not included, it is determined that the test object complies with the traffic rules corresponding to the traffic light trigger area; if the stop line or the intersection area is included, it is determined that the test object does not comply with the traffic rules; if the motion state of the test object is a driving state, calculate the driving direction of the test object; wherein, if the driving direction is straight, left turn or U-turn, it is determined that the test object does not comply with the traffic rules; if the driving direction is a right turn, it is determined that the test object complies with the traffic rules corresponding to the traffic light trigger area.

[0195] Optionally, the second judgment module 740 is also used to: obtain the first trajectory point and the last trajectory point of the test object in the intersection area, and use the direction vector pointing from the first trajectory point to the last trajectory point as the first direction vector; obtain two trajectory points of the test object before entering the intersection area, and use the direction vector pointing from the trajectory point at the earlier moment to the trajectory point at the later moment as the second direction vector; if the rotation direction of the first direction vector relative to the second direction vector is clockwise, and the rotation angle is less than 90 degrees, then the driving direction of the test object is a right turn.

[0196] Optionally, the second judgment module 740 is also used to: when the traffic light signal is yellow, obtain the intersection area corresponding to the traffic light signal; calculate a first average speed and a second average speed, the first average speed being the average speed of the test object within t time frames before entering the intersection area, and the second average speed being the average speed of the test object within t time frames in the intersection area, where t is a positive integer; if the first average speed is greater than the second average speed, it is determined that the test object has decelerated in the intersection area and the test object has complied with the traffic rules corresponding to the traffic light triggering area; if the first average speed is less than or equal to the second average speed, it is determined that the test object has not decelerated in the intersection area and the test object has not complied with the traffic rules.

[0197] Optionally, the target traffic element includes a traffic sign trigger area, and the traffic rules include driving in the traffic sign trigger area according to the traffic sign; the second judgment module 740 is used to: if the vehicle projection area includes the traffic sign trigger area, obtain the traffic sign corresponding to the traffic sign trigger area; wherein the traffic sign includes any one of the following: a speed limit sign, a stop sign, and a yield sign containing a speed limit value; record the current time frame as a sign time frame; wherein, within the sign time frame, the vehicle projection area includes the traffic sign trigger area; obtain the vehicle behavior of the test object within the sign time frame; if the vehicle behavior is consistent with the traffic sign corresponding to the traffic sign trigger area, determine that the test object is driving in the traffic sign trigger area according to the traffic sign, and the test object complies with the traffic rules corresponding to the traffic sign trigger area; if the vehicle behavior is inconsistent with the traffic sign corresponding to the traffic sign trigger area, determine that the test object is not driving in the traffic sign trigger area according to the traffic sign, and the test object does not comply with the traffic rules.

[0198] Optionally, the compliance determination module 750 is used to: divide the traffic rules into important traffic rules and minor traffic rules; count the test subject's compliance with the important traffic rules and the minor traffic rules during the autonomous driving test; if the test subject fully complies with the important traffic rules and the minor traffic rules, then the test subject's traffic regulations compliance is determined to be excellent; if the test subject does not comply with the important traffic rules, or the number of times the test subject does not comply with the minor traffic rules is greater than a set threshold, then the test subject's traffic regulations compliance is determined to be poor; if the test subject fully complies with the important traffic rules but does not comply with the minor traffic rules, and the number of times the test subject does not comply with the minor traffic rules is less than or equal to a set threshold, then the test subject's traffic regulations compliance is determined to be medium.

[0199] For the detailed description of the implementation process, beneficial effects, etc. of the device module, please refer to the introduction of the above method embodiment, which will not be elaborated here.

[0200] In an exemplary embodiment, a computer device is also provided, which includes a memory and a processor, wherein a computer program is stored in the memory, and the computer program is loaded and executed by the processor to implement the above-mentioned method for automated determination of traffic regulations compliance for autonomous driving testing.

[0201] In an exemplary embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, the method for automatically determining traffic regulations compliance for autonomous driving testing as described above is implemented.

[0202] In an exemplary embodiment, a computer program product is also provided. When the computer program product is executed on a computer device, the computer device executes the above-mentioned method for automatically determining traffic regulations compliance for autonomous driving testing.

[0203] The above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. A person skilled in the art may modify or replace the technical solutions of the present invention with equivalents. The protection scope of the present invention shall be subject to the claims.

Claims

1. A method for automatically determining traffic regulations compliance for autonomous driving testing, characterized in that: The method comprises: Obtaining a scene map for an autonomous driving test, and drawing a semantic map based on the scene map, wherein different traffic elements in the scene map correspond to different colors in the semantic map; Execute the autonomous driving test, and calculate the vehicle projection area of ​​the test object in the semantic map based on the world coordinates and bounding box of the test object; wherein, calculating the vehicle projection area of ​​the test object in the semantic map based on the world coordinates and bounding box of the test object includes: Obtaining the world coordinates of the test object, where the world coordinates refer to the coordinates in a three-dimensional world coordinate system; Performing coordinate system transformation on the world coordinates to obtain image coordinates of the test object, where the image coordinates refer to coordinates in a two-dimensional image coordinate system; Obtaining a bounding box of the test object, and obtaining the vehicle projection area in combination with the image coordinates of the test object; Based on the color of the traffic element, judging whether the vehicle projection area includes the target traffic element; wherein, judging whether the vehicle projection area includes the target traffic element based on the color of the traffic element includes: Clipping the semantic map to obtain a determination region, wherein the area of ​​the determination region is smaller than the area of ​​the semantic map; Binarizing the determination area according to the color of the traffic element to obtain a binarized matrix, wherein the binarization includes setting the pixel point corresponding to the color of the target traffic element to 1; Determine whether there is a target pixel point with a value of 1 in the binary matrix, and if the target pixel point exists, obtain the image coordinates of the target pixel point; Determine whether the image coordinates of the target pixel point are in the vehicle projection area; if the image coordinates of the target pixel point are in the vehicle projection area, determine that the vehicle projection area contains the target traffic element; if the image coordinates of the target pixel point are not in the vehicle projection area, determine that the vehicle projection area does not contain the target traffic element; Based on the determination result of whether the vehicle projection area includes the target traffic element, determining whether the test subject complies with traffic regulations; According to the statistics of the test subject's compliance with traffic rules during the autonomous driving test, the traffic rule compliance of the test subject is evaluated, and the traffic rule compliance is used to indicate the degree of compliance of the test subject with the traffic rules.

2. The method according to claim 1, characterized in that The step of performing coordinate system transformation on the world coordinates to obtain the image coordinates of the test object includes: Obtain the number of pixels corresponding to the target distance in the scene map in the semantic map; Acquire a plane reference point of the three-dimensional world coordinate system, where the plane reference point corresponds to the origin of the two-dimensional image coordinate system; Based on the world coordinates of the test object, a plane offset of the test object relative to the plane reference point is calculated; and a product processing is performed on the number of pixel points and the plane offset to obtain the image coordinates of the test object.

3. The method according to claim 1, characterized in that The step of clipping the semantic map to obtain a determination area includes: Obtaining image coordinates of vertices of the vehicle projection area; Based on the image coordinates of the vertices, respectively calculating the minimum value and the maximum value of the vehicle projection area under the abscissa axis and the ordinate axis of the two-dimensional image coordinate system; The minimum value and the maximum value are used as four vertices of the determination area, and the semantic map is clipped according to the four vertices to obtain the determination area.

4. The method according to claim 1, characterized in that The target traffic element includes a solid lane line, and the traffic rule includes prohibiting driving on the solid lane line; and / or, the target traffic element includes a guide line, and the traffic rule includes prohibiting driving on the guide line; and / or, the target traffic element includes a grid line, and the traffic rule includes prohibiting driving on the grid line; and / or, the target traffic element includes a non-lane area, and the traffic rule includes prohibiting driving on the non-lane area; The step of judging whether the test object complies with traffic rules based on the judgment result of whether the vehicle projection area includes the target traffic element comprises: If the vehicle projection area includes any one of the solid lane line, the guide line, the grid line, and the non-lane area, it is determined that the test object does not comply with traffic regulations.

5. The method according to claim 1, characterized in that: The target traffic element includes a dashed lane line, and the traffic rule includes that the duration of pressing the dashed lane line is prohibited from exceeding a target duration; The step of judging whether the test object complies with traffic rules based on the judgment result of whether the vehicle projection area includes the target traffic element comprises: If the vehicle projection area includes the dashed lane line, the current time frame is recorded as the target time frame; wherein the vehicle projection area includes the dashed lane line in the target time frame; Calculating the continuous duration of the target time frame; If the continuous duration is less than or equal to the target duration, it is determined that the duration for which the test subject presses the dashed lane line does not exceed the target duration, and the test subject complies with the traffic rules corresponding to the dashed lane line; If the continuous duration is greater than the target duration, it is determined that the duration for which the test subject presses the dashed lane line exceeds the target duration, and the test subject does not comply with traffic regulations.

6. The method according to claim 1, characterized in that The target traffic element includes a dashed lane line and a solid lane line, and the traffic rule includes prohibiting crossing from a solid lane line side of the dashed lane line to a dashed lane line side of the dashed lane line; The step of judging whether the test object complies with traffic rules based on the judgment result of whether the vehicle projection area includes the target traffic element comprises: If the vehicle projection area includes the virtual and solid lane lines, then obtaining a lane change direction vector corresponding to the virtual and solid lane lines, wherein the lane change direction vector is perpendicular to the virtual and solid lane lines and points from the virtual lane line side to the solid lane line side of the virtual and solid lane lines; Recording the current time frame as a lane-changing time frame; wherein the vehicle projection area in the lane-changing time frame includes the virtual and solid lane lines; Calculating a motion direction vector of the test object based on a first time frame and a last time frame of consecutive time frames in the lane change time frame, the motion direction vector pointing from the image coordinates of the test object in the first time frame to the image coordinates of the test object in the last time frame; Calculating an angle between the motion direction vector and the lane change direction vector; If the angle between the motion direction vector and the lane change direction vector is less than 90 degrees, it is determined that the test object crosses from the dashed lane line side of the dashed lane line to the solid lane line side of the dashed lane line, and the test object complies with the traffic rules corresponding to the dashed lane line; If the angle between the movement direction vector and the lane change direction vector is greater than or equal to 90 degrees, it is determined that the test object crosses from the solid lane line side of the virtual and solid lane line to the dashed lane line side, and the test object does not comply with traffic regulations.

7. The method according to claim 1, characterized in that The target traffic element includes a zebra crossing, and the traffic rule includes giving way to pedestrians at the zebra crossing; The step of judging whether the test object complies with traffic rules based on the judgment result of whether the vehicle projection area includes the target traffic element comprises: If the vehicle projection area includes the zebra crossing, obtaining the pedestrian projection area of ​​the pedestrian in the semantic map; Determine whether the image coordinates of the target pixel point are in the pedestrian projection area; If the image coordinates of the target pixel point are not in the pedestrian projection area, it is determined that the pedestrian projection area does not include the zebra crossing, and the test subject complies with the traffic rules corresponding to the zebra crossing; If the image coordinates of the target pixel point are in the pedestrian projection area, determining that the pedestrian projection area includes the zebra crossing, and acquiring the motion state of the test object; If the motion state of the test object is a parking state, it is determined that the test object gives way to pedestrians at the zebra crossing and the test object complies with the traffic rules corresponding to the zebra crossing; If the motion state of the test object is a driving state, it is determined whether the test object is in front of the pedestrian; wherein, if the test object is in front of the pedestrian, it is determined that the test object did not give way to pedestrians on the zebra crossing and the test object did not comply with traffic rules; if the test object is not in front of the pedestrian, it is determined that the test object gave way to pedestrians on the zebra crossing and the test object complied with traffic rules corresponding to the zebra crossing.

8. The method according to claim 7, characterized in that The determining whether the test object is in front of the pedestrian includes: Recording the current time frame as an overlapping time frame; wherein, in the overlapping time frame, both the vehicle projection area and the pedestrian projection area include the zebra crossing; In the overlapping time frame, converting the world coordinates of the test object into local coordinates based on a local coordinate system, wherein the local coordinate system has the world coordinates of the pedestrian as an origin and the direction of movement of the pedestrian as an x-axis; If the value of the local coordinate of the test object on the x-axis of the local coordinate system is greater than or equal to the target value, it is determined that the test object is in front of the pedestrian; If the value of the local coordinate of the test object on the x-axis of the local coordinate system is smaller than the target value, it is determined that the test object is not in front of the pedestrian.

9. The method according to claim 1, characterized in that: The target traffic element includes a traffic light triggering area, and the traffic rule includes driving in the traffic light triggering area according to the traffic light signal; The step of judging whether the test object complies with traffic rules based on the judgment result of whether the vehicle projection area includes the target traffic element comprises: If the vehicle projection area includes the traffic light triggering area, obtaining a traffic light signal corresponding to the traffic light triggering area; When the traffic light signal is red, obtaining the stop line and intersection area corresponding to the traffic light signal, and obtaining the motion state of the test object; If the motion state of the test object is a stopped state, it is determined whether the vehicle projection area includes the stop line or the intersection area; if the stop line and the intersection area are not included, it is determined that the test object complies with the traffic rules corresponding to the traffic light triggering area; if the stop line or the intersection area is included, it is determined that the test object does not comply with the traffic rules; If the motion state of the test object is a driving state, the driving direction of the test object is calculated; if the driving direction is straight, left turn or U-turn, it is determined that the test object does not comply with traffic regulations; if the driving direction is a right turn, it is determined that the test object complies with the traffic regulations corresponding to the traffic light triggering area.

10. The method according to claim 9, characterized in that The calculating the driving direction of the test object includes: Obtaining a first trajectory point and a last trajectory point of the test object in the intersection area, and using a direction vector from the first trajectory point to the last trajectory point as a first direction vector; Obtain two trajectory points of the test object before entering the intersection area, and use the direction vector from the trajectory point at the previous moment to the trajectory point at the subsequent moment as the second direction vector; If the rotation direction of the first direction vector relative to the second direction vector is clockwise, and the rotation angle is less than 90 degrees, the driving direction of the test object is a right turn.

11. The method according to claim 9, characterized in that After acquiring the traffic light signal corresponding to the traffic light triggering area, the method further includes: When the traffic light signal is yellow, obtaining the intersection area corresponding to the traffic light signal; Calculate a first average speed and a second average speed, wherein the first average speed is the average speed of the test object in t time frames before entering the intersection area, and the second average speed is the average speed of the test object in t time frames in the intersection area, where t is a positive integer; If the first average speed is greater than the second average speed, it is determined that the test subject has decelerated in the intersection area and the test subject complies with the traffic rules corresponding to the traffic light triggering area; If the first average speed is less than or equal to the second average speed, it is determined that the test object does not decelerate in the intersection area and the test object does not comply with traffic regulations.

12. The method according to claim 1, characterized in that The target traffic element includes a traffic sign triggering area, and the traffic rule includes driving in the traffic sign triggering area according to the traffic sign; The step of judging whether the test object complies with traffic rules based on the judgment result of whether the vehicle projection area includes the target traffic element comprises: If the vehicle projection area includes the traffic sign trigger area, then the traffic sign corresponding to the traffic sign trigger area is obtained; wherein the traffic sign includes any one of the following: a speed limit sign containing a speed limit value, a stop sign, and a yield sign; Recording the current time frame as a mark time frame; wherein the vehicle projection area in the mark time frame includes the traffic sign triggering area; Acquiring the vehicle behavior of the test object within the marker time frame; If the vehicle behavior is consistent with the traffic sign corresponding to the traffic sign trigger area, it is determined that the test subject is driving in the traffic sign trigger area according to the traffic sign, and the test subject complies with the traffic rules corresponding to the traffic sign trigger area; If the vehicle behavior is inconsistent with the traffic sign corresponding to the traffic sign trigger area, it is determined that the test object does not drive in the traffic sign trigger area according to the traffic sign and the test object does not comply with traffic regulations.

13. The method according to any one of claims 1 to 12, characterized in that: The evaluating the traffic regulation compliance of the test subject according to statistics of the test subject's compliance with traffic regulations during the autonomous driving test includes: Divide the traffic rules into important traffic rules and minor traffic rules; Counting the compliance of the test subject with the important traffic rules and the minor traffic rules during the autonomous driving test; If the test subject fully complies with the important traffic rules and the minor traffic rules, determining that the traffic rule compliance of the test subject is excellent; If the test subject does not comply with the important traffic rules, or the number of times the test subject does not comply with the minor traffic rules is greater than a set threshold, then determining that the traffic rule compliance of the test subject is poor; If the test subject fully complies with the important traffic rules but does not comply with the minor traffic rules, and the number of times of not complying with the minor traffic rules is less than or equal to a set threshold, it is determined that the traffic regulation compliance of the test subject is medium.

14. An automatic traffic regulations compliance determination device for autonomous driving testing, characterized in that: The device comprises: A map acquisition module, used to acquire a scene map for an autonomous driving test, and to draw a semantic map based on the scene map, wherein different traffic elements in the scene map correspond to different colors in the semantic map; The autonomous driving test module is used to perform the autonomous driving test and calculate the vehicle projection area of ​​the test object in the semantic map based on the world coordinates and bounding box of the test object; wherein the calculation of the vehicle projection area of ​​the test object in the semantic map based on the world coordinates and bounding box of the test object includes: Obtaining the world coordinates of the test object, where the world coordinates refer to the coordinates in a three-dimensional world coordinate system; Performing coordinate system transformation on the world coordinates to obtain image coordinates of the test object, where the image coordinates refer to coordinates in a two-dimensional image coordinate system; Obtaining a bounding box of the test object, and obtaining the vehicle projection area in combination with the image coordinates of the test object; The first judgment module is used to judge whether the vehicle projection area includes a target traffic element based on the color of the traffic element; wherein, judging whether the vehicle projection area includes a target traffic element based on the color of the traffic element includes: Clipping the semantic map to obtain a determination region, wherein the area of ​​the determination region is smaller than the area of ​​the semantic map; Binarizing the determination area according to the color of the traffic element to obtain a binarized matrix, wherein the binarization includes setting the pixel point corresponding to the color of the target traffic element to 1; Determine whether there is a target pixel point with a value of 1 in the binary matrix, and if the target pixel point exists, obtain the image coordinates of the target pixel point; Determine whether the image coordinates of the target pixel point are in the vehicle projection area; if the image coordinates of the target pixel point are in the vehicle projection area, determine that the vehicle projection area contains the target traffic element; if the image coordinates of the target pixel point are not in the vehicle projection area, determine that the vehicle projection area does not contain the target traffic element; A second judgment module, configured to judge whether the test subject complies with traffic rules based on a judgment result of whether the vehicle projection area includes the target traffic element; The compliance determination module is used to evaluate the traffic regulation compliance of the test subject according to the statistics of the test subject's compliance with traffic regulations during the automatic driving test, and the traffic regulation compliance is used to indicate the degree of compliance of the test subject with the traffic regulations.

15. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Simulation test method and system for compliance with traffic laws and regulations of automatic driving automobile

    CN113254336A

  • Vehicle illegal driving detection method and device, electronic equipment and storage medium

    CN113420748A