Lane semantic reasoning method, intelligent device and computer-readable storage medium
Through the multi-dimensional confidence evaluation method, the problem of inaccurate lane semantic reasoning in lane change scenarios in the existing technology is solved, accurate semantic recognition of the environment where the vehicle is located and stable recognition of the main lane are achieved, and the accuracy of autonomous driving is improved.
Patent Information
- Application Number
- CN202411028916.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-07-30
AI Technical Summary
Existing lane semantic reasoning methods cannot accurately reason about the lane semantics of the vehicle's environment in lane change scenarios, especially when the number of lanes changes, they cannot correctly identify the main lane.
Using a multi-dimensional confidence assessment method, including geometric confidence, semantic confidence and distance confidence, by obtaining the geometric attributes, semantic consistency and distance from the vehicle of the candidate lane, the first confidence of the candidate lane is calculated and the optimal lane is screened group to determine the main lane in which the vehicle is located.
It improves the accuracy and timing stability of lane semantic reasoning, can accurately identify lane semantics in lane change scenarios, and ensures the accuracy of vehicle trajectory planning.
Smart Images

Figure CN118552938B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and in particular to a lane semantic reasoning method, an intelligent device, and a computer-readable storage medium. Background Art
[0002] When performing autonomous driving control of a vehicle, it is necessary to obtain the lane semantics of the vehicle's environment, and then determine the lane line semantics based on the lane semantics. Then, when planning the vehicle's driving trajectory, the lane line semantics can be used for planning. The lane in which the vehicle itself is located can also be displayed on the user interaction interface through highlighting and other methods based on the lane line semantics.
[0003] The lane semantics of the vehicle's environment may include the lane where the vehicle is located and the semantics of the adjacent lanes on the left and right sides of the lane. The semantics of the lane where the vehicle is located may be the main lane; the semantics of the first lane adjacent to the left and right sides of the main lane may be the adjacent lane on the left side of the main lane and the adjacent lane on the right side of the main lane; the semantics of the second lane adjacent to the left and right sides of the main lane may be the adjacent auxiliary lane on the left side of the main lane and the adjacent auxiliary lane on the right side of the main lane. The lane where the vehicle is located and the adjacent lanes on the left and right sides of the lane may be understood as a lane group where the vehicle is located.
[0004] See attached Figure 1 , Figure 1 The following example shows the lane semantics and lane line semantics in a scenario. Figure 1 As shown in the figure, LANE3 is the main lane, LANE2 is the adjacent lane on the left side of the main lane, LANE4 is the adjacent lane on the right side of the main lane, LANE1 is the auxiliary lane adjacent to the left side of the main lane, and LANE5 is the auxiliary lane adjacent to the right side of the main lane. The semantics of the lane line on the left side of the vehicle in the main lane LANE3 is the main left (i.e. Figure 1 HOST_LEFT in the main lane, the semantics of the lane line on the right side of the vehicle in the main lane LANE3 is the main right (i.e. Figure 1 The lane line semantics of the lane LANE2 adjacent to the left side of the main lane is left-left (i.e. Figure 1 LEFT_LEFT in the figure), the lane line semantics of the left side of the main lane adjacent to the auxiliary lane LANE1 is left-left-left (i.e. Figure 1 The lane line semantics of the lane LANE4 adjacent to the right side of the main lane is right-right (i.e. Figure 1 The lane line semantics of the right side of the main lane adjacent to the auxiliary lane LANE5 is right right right (i.e. Figure 1 in the RIGHT_ RIGHT_RIGHT column).
[0005] At present, conventional lane semantics reasoning methods are only applicable to straight-line scenarios. When a vehicle is driving in a lane change scenario, it is impossible to accurately infer the lane semantics of the vehicle's environment. For example, in a lane change scenario, when a vehicle approaches a lane change area, it is likely that the lane group behind the lane change area (away from the vehicle) is used as the vehicle's current lane group, and thus the lane semantics of the vehicle's current environment cannot be accurately derived. In addition, when a vehicle enters a lane change area, the number of lanes may change (such as three lanes becoming five lanes), which may cause the main lane to change, but conventional lane semantics reasoning methods cannot infer the correct main lane in this case.
[0006] Accordingly, the art needs a new technical solution to solve the above problems. Summary of the invention
[0007] In order to overcome the above-mentioned defects, the present application is proposed to solve or at least partially solve the technical problem of improving the accuracy of lane semantic reasoning.
[0008] In a first aspect, a lane semantic reasoning method is provided, the method comprising:
[0009] Obtain candidate lanes based on the lane lines in the environment where the vehicle is currently located;
[0010] Acquire a plurality of lane groups according to the candidate lanes, wherein the plurality of lane groups are sequentially arranged along an X-axis, and the lane group includes one or more candidate lanes sequentially arranged along a Y-axis, and the X-axis and the Y-axis are an X-axis and a Y-axis of a body coordinate system of the vehicle;
[0011] For each lane group, obtaining a multi-dimensional confidence of a candidate lane in the lane group, and obtaining a first confidence of the candidate lane according to the multi-dimensional confidence;
[0012] For each lane group, obtaining a second confidence of the lane group according to the first confidences of all candidate lanes in the lane group;
[0013] Obtaining an optimal lane group according to the second confidence level of each lane group;
[0014] Acquire a main lane where the vehicle is currently located according to the optimal lane group, and determine the semantics of each lane line in the optimal lane group according to the main lane;
[0015] Wherein, the multi-dimensional confidence includes: geometric confidence, semantic confidence, and distance confidence;
[0016] The geometric confidence is the confidence of the geometric attributes of the candidate lane, the semantic confidence is the confidence that the candidate lane was the main lane at the previous moment, and the distance confidence is the confidence that the candidate lane is closest to the vehicle.
[0017] In a technical solution of the lane semantic reasoning method, the geometric attributes include: lane line length, lane line direction, and lane width;
[0018] The geometric confidence includes: length confidence, direction confidence, and width confidence;
[0019] Among them, the length confidence is the confidence that the lengths of the lane lines on both sides of the candidate lane are consistent; the direction confidence is the confidence that the directions of the lane lines on both sides of the candidate lane are consistent; and the width confidence is the confidence that the width of the candidate lane is consistent with the target width.
[0020] In a technical solution of the lane semantic reasoning method, the method includes obtaining the length confidence by:
[0021] Obtaining the intersection-combination ratio of the lengths of the lane lines on both sides of the candidate lane;
[0022] The length confidence is obtained according to the length intersection-to-union ratio.
[0023] In a technical solution of the lane semantic reasoning method, obtaining the intersection-and-joint ratio of the lengths of lane lines on both sides of the candidate lane includes:
[0024] Obtaining an overlapping area of the lane lines on both sides, and obtaining a first length of the overlapping area projected onto the X-axis;
[0025] Respectively obtain the lengths of the lane lines on both sides projected onto the X-axis, and select a smaller one of the lengths of the lane lines on both sides as the second length;
[0026] Obtaining a first length ratio of the first length to the second length;
[0027] The length intersection-over-combination ratio is obtained according to the first length ratio.
[0028] In a technical solution of the lane semantic reasoning method, the method further includes:
[0029] Obtaining a preset shortest lane line length, where the shortest lane line length is the shortest lane line length behind the vehicle;
[0030] Obtaining a third length according to the sum of the first length and the shortest length of the lane line;
[0031] Obtaining a fourth length according to the sum of the second length and the shortest length of the lane line;
[0032] Obtaining a second length ratio between the third length and the fourth length;
[0033] The length intersection-over-combination ratio is obtained according to the second length ratio.
[0034] In a technical solution of the lane semantic reasoning method, the method includes obtaining the direction confidence by:
[0035] Obtaining a first distance from a first shape point on a lane line in the candidate lane to another lane line, and using the first distance as a width of the first shape point;
[0036] Obtain an average value of the widths of all first shape points, and obtain a difference between the width of each first shape point and the average value;
[0037] The first shape point whose absolute value of the difference is less than the first difference threshold is used as the second shape point;
[0038] Obtaining a ratio of the number of the second shape points to the number of the first shape points;
[0039] The direction confidence is obtained according to the quantity ratio.
[0040] In a technical solution of the lane semantic reasoning method, obtaining the direction confidence according to the quantity ratio includes:
[0041] Obtain a preset minimum value of direction confidence, where the minimum value is greater than or equal to 0.5;
[0042] Obtaining a product of the quantity ratio and a preset weight, where the preset weight is greater than 0 and less than 1;
[0043] The direction confidence is obtained according to the sum of the minimum value and the product.
[0044] In a technical solution of the lane semantic reasoning method, the method includes obtaining the width confidence by:
[0045] Obtaining the starting width of the candidate lane;
[0046] According to the starting width, obtaining the width confidence;
[0047] The absolute value of the difference between the starting width and the target width is in a negatively correlated relationship with the width confidence.
[0048] In a technical solution of the lane semantic reasoning method, obtaining the width confidence according to the starting width includes:
[0049] Acquire a first fitting function, where the first fitting function is used to represent the corresponding relationship between the starting width and the width confidence;
[0050] The starting width is used as an input of the first fitting function, and a width confidence corresponding to the starting width is obtained through the first fitting function.
[0051] In a technical solution of the lane semantic reasoning method, the method includes obtaining the semantic confidence by:
[0052] If the candidate lane is the main lane at the previous moment, the value of the semantic confidence is set to the first value; otherwise, the value of the semantic confidence is set to the second value;
[0053] The first value is greater than the second value.
[0054] In a technical solution of the lane semantic reasoning method, the method includes obtaining the distance confidence by:
[0055] Acquire a second distance between the starting position of the candidate lane and the vehicle;
[0056] The distance confidence is acquired according to the second distance, and the distance confidence is in a negatively correlated corresponding relationship with the second distance.
[0057] In a technical solution of the lane semantic reasoning method, the obtaining the distance confidence according to the second distance includes:
[0058] Acquire a second fitting function, where the second fitting function is used to represent a corresponding relationship between the second distance and the distance confidence;
[0059] The second distance is used as an input of the second fitting function, and a distance confidence corresponding to the second distance is obtained through the second fitting function.
[0060] In a technical solution of the lane semantic reasoning method, the multi-dimensional confidence includes a lane suppression confidence, and the method includes obtaining the lane suppression confidence by:
[0061] If the candidate lane is an abnormal bifurcated lane, the value of the lane suppression confidence is set to a third value; otherwise, the value of the lane suppression confidence is set to a fourth value;
[0062] The third value is smaller than the fourth value.
[0063] In a technical solution of the lane semantic reasoning method, the method includes determining whether the candidate lane is an abnormal bifurcated lane by:
[0064] When one lane line of the candidate lane is a bifurcated lane line, obtaining a length difference between lane lines on both sides of the candidate lane, and obtaining a length of a bifurcated area on the candidate lane;
[0065] If the length difference is greater than a first length threshold and the length of the bifurcated area is greater than a second length threshold, the candidate lane is an abnormal bifurcated lane.
[0066] In a technical solution of the lane semantic reasoning method, obtaining the first confidence of the candidate lane according to the multi-dimensional confidence includes:
[0067] Obtaining the product of the multi-dimensional confidences;
[0068] According to the product, a first confidence level of the candidate lane is obtained.
[0069] In a technical solution of the lane semantic reasoning method, obtaining the second confidence of the lane group according to the first confidence of all candidate lanes in the lane group includes:
[0070] Obtaining the sum of first confidences of all candidate lanes in the lane group;
[0071] A second confidence of the lane group is obtained according to the sum of the first confidences.
[0072] In a technical solution of the lane semantic reasoning method, obtaining the main lane where the vehicle is located at the current moment according to the optimal lane group includes:
[0073] Obtaining a first position point of the center line of the candidate lane, wherein the first position point is a position point with the smallest X-axis coordinate in the vehicle body coordinate system;
[0074] Obtaining the X-axis coordinate and the Y-axis coordinate of the first position point in the vehicle body coordinate system;
[0075] Performing a weighted sum calculation on the absolute value of the X-axis coordinate and the absolute value of the Y-axis coordinate to obtain a third distance, and using the third distance as the weighted distance of the candidate lane;
[0076] A candidate lane with the smallest weighted distance is selected as the main lane.
[0077] In a technical solution of the lane semantic reasoning method, the method includes performing stability verification on the main lane where the vehicle is currently located in the following manner:
[0078] The main lane at the current moment and the main lane at the previous moment are respectively used as the first main lane and the second main lane;
[0079] When the first main lane is different from the second main lane, and the second main lane is a left lane or a right lane of the first main lane, obtaining a weighted distance difference between the first main lane and the second main lane;
[0080] If the difference is greater than a second difference threshold, the first main lane is used as the final main lane at the current moment; otherwise, the second main lane is used as the final main lane at the current moment.
[0081] In a technical solution of the lane semantic reasoning method, the method includes checking the correctness of the main lane where the vehicle is currently located in the following manner:
[0082] When the center line of the main lane is located on the left side of the vehicle, if the right lane line of the main lane is located on the right side of the vehicle, the main lane passes the verification; otherwise, the main lane fails the verification, and a new main lane is obtained according to the right lane of the main lane;
[0083] When the center line of the main lane is located on the right side of the vehicle, if the left lane line of the main lane is located on the left side of the vehicle, the main lane passes the verification; otherwise, the main lane fails the verification, and a new main lane is obtained based on the left lane of the main lane.
[0084] In a technical solution of the lane semantic reasoning method, the acquiring a new main lane according to the right lane of the main lane includes: if the vehicle is located in the right lane, and lane lines on both sides of the right lane are located on the left and right sides of the vehicle respectively, then the right lane is used as the new main lane;
[0085] The acquiring a new main lane according to the left lane of the main lane includes: if the vehicle is located in the left lane, and lane lines on both sides of the left lane are located on the left and right sides of the vehicle respectively, then taking the left lane as the new main lane.
[0086] In a technical solution of the lane semantic reasoning method, determining the semantics of each lane line in the optimal lane group according to the main lane includes:
[0087] When the main lane has only one lane line, if the vehicle is located on the left side of the lane line, the semantic value of the lane line is assigned as main right; if the vehicle is located on the right side of the lane line, the semantic value of the lane line is assigned as main left.
[0088] In a technical solution of the lane semantic reasoning method, determining the semantics of each lane line in the optimal lane group according to the main lane includes:
[0089] When the main lane is located at the rightmost side of the road and the right lane line of the main lane is not detected, the left lane of the main lane is obtained, and the right lane line of the left lane is obtained; if the right lane line of the left lane is located at the left side of the vehicle, and the fourth distance between the right lane line of the left lane and the vehicle is less than a preset distance threshold, the semantic value of the right lane line of the left lane is assigned as main left;
[0090] When the main lane is located at the leftmost side of the road and the left lane line of the main lane is not detected, the right lane of the main lane is obtained, and the left lane line of the right lane is obtained; if the left lane line of the right lane is located at the right side of the vehicle, and the fifth distance between the left lane line of the right lane and the vehicle is less than a preset distance threshold, the semantic value of the left lane line of the right lane is assigned as main right.
[0091] In a technical solution of the lane semantic reasoning method, the method includes obtaining the lane line in the environment where the vehicle is located by:
[0092] Acquire a first candidate lane line in the environment where the vehicle is located, where the first candidate lane line is obtained by performing lane line perception on a data frame collected by a sensor on the vehicle;
[0093] Acquire a first candidate lane line located in a focus area as a second candidate lane line, wherein the focus area is in a range of [-a, a] on the X-axis, where a>0;
[0094] Remove the second candidate lane line belonging to the target lane line, and use the remaining second candidate lane line as the valid lane line;
[0095] Among them, the target lane lines include the lane lines of the lane opposite to the vehicle, the lane lines on the left and right sides of the intersection, and the guide lines of the intersection.
[0096] In a technical solution of the lane semantic reasoning method, obtaining a candidate lane according to a lane line in the environment where the vehicle is currently located includes:
[0097] Sorting the lane lines according to the Y-axis coordinates of the lane lines in the vehicle body coordinate system in ascending order to form a lane line sequence;
[0098] Acquire a first lane line and a second lane line, wherein the first lane line is any lane line in the lane line sequence, and the second lane line is one or more lane lines arranged after the first lane line in the lane line sequence;
[0099] If the first lane line and the second lane line satisfy a preset lane constraint condition, obtaining a candidate lane according to the lane formed by the first lane line and the second lane line;
[0100] Among them, the lane constraint conditions include: the length intersection-and-joint ratio between the first lane line and the second lane line is greater than a preset intersection-and-joint ratio threshold, the lane width formed by the first lane line and the second lane line is within a preset width range, and there are no other lane lines between the first lane line and the second lane line.
[0101] In a technical solution of the lane semantic reasoning method, the lane width formed by the first lane line and the second lane line is within a preset width range, including:
[0102] The lane width formed by the first lane line and adjacent lane lines is within a first width range, and the lane width formed by the first lane line and non-adjacent lane lines is within a second width range;
[0103] The adjacent lane line is a second lane line adjacent to the first lane line, the non-adjacent lane line is a second lane line not adjacent to the first lane line, and the second width range is greater than the first width range.
[0104] In a technical solution of the lane semantic reasoning method, obtaining a candidate lane according to a lane formed by the first lane line and the second lane line includes:
[0105] Using a lane formed by the first lane line and the second lane line as a lane to be inspected;
[0106] Obtain a fifth distance from the shape point on the first lane line to the second lane line, and use the fifth distance as the width of the shape point;
[0107] Determining whether the lane to be inspected is a passable passage according to the width of each point on the first lane line;
[0108] If the lane to be inspected is a passable lane, the candidate lane is obtained according to the lane to be inspected.
[0109] In a technical solution of the lane semantic reasoning method, determining whether the lane to be inspected is a passable passage according to the width of each point on the first lane line includes:
[0110] According to the width of each shape point, a width variation range is obtained, where the width variation range is a range in which the width of the shape point on the first lane line changes following the change of the shape point;
[0111] Obtaining a length ratio between the width variation range and the first lane line, and obtaining widths of points at a starting position and an ending position on the first lane line;
[0112] If the length ratio is greater than a preset ratio threshold and the widths of the points at the starting position and the ending position are both less than a preset width threshold, the lane to be inspected is an impassable lane; otherwise, the lane to be inspected is a drivable lane.
[0113] In a second aspect, an intelligent device is provided, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any one of the technical solutions of the above-mentioned lane semantic reasoning method is implemented.
[0114] In a third aspect, a computer-readable storage medium is provided, wherein a plurality of program codes are stored therein, wherein the program codes are suitable for being loaded and run by a processor to execute the method described in any one of the technical solutions of the above-mentioned lane semantic reasoning method.
[0115] The above one or more technical solutions of the present application have at least one or more of the following beneficial effects:
[0116] In a technical solution for implementing the lane semantic reasoning method provided by the present application, candidate lanes can be obtained according to lane lines in the environment where the vehicle is located at the current moment; multiple lane groups are obtained according to the candidate lanes, the multiple lane groups are arranged in sequence along the X-axis, and the lane group includes one or more candidate lanes arranged in sequence along the Y-axis, and the X-axis and the Y-axis are the X-axis and the Y-axis of the vehicle's body coordinate system; for each lane group, a multi-dimensional confidence of the candidate lanes in the lane group is obtained, and a first confidence of the candidate lane is obtained according to the multi-dimensional confidence; for each lane group, a second confidence of the lane group is obtained according to the first confidence of all candidate lanes in the lane group; according to the second confidence of each lane group, an optimal lane group is obtained; according to the optimal lane group, the main lane where the vehicle is located at the current moment is obtained, and the semantics of each lane line in the optimal lane group is determined according to the main lane; wherein the multi-dimensional confidence includes: geometric confidence, semantic confidence, and distance confidence; the geometric confidence is the confidence of the geometric attributes of the candidate lane, the semantic confidence is the confidence that the candidate lane was the main lane at the previous moment, and the distance confidence is the confidence that the candidate lane is closest to the vehicle.
[0117] Based on the above implementation scheme, the confidence of the candidate lane can be obtained from the three dimensions of geometry, semantics, and distance, and the final confidence of the candidate lane (i.e., the first confidence) can be obtained based on the confidence of these three dimensions. The first confidence can comprehensively reflect the confidence of the candidate lane in the three dimensions of geometry, semantics, and distance, that is, a multi-dimensional evaluation of the candidate lane is realized. The higher the first confidence of the candidate lane, the higher the possibility that the candidate lane is the main lane. Among them, based on the geometric confidence, the evaluation of the geometric attributes of the candidate lane can be realized to ensure that the candidate lane is a lane, not other road areas; based on the semantic confidence, the evaluation of the semantic temporal consistency of the candidate lane can be realized to ensure the temporal stability of the main lane; based on the distance confidence, the distance between the candidate lane and the vehicle can be used to evaluate whether the candidate lane is the main lane to ensure the accuracy of the main lane. Therefore, obtaining confidence from the three dimensions of geometry, semantics, and distance and obtaining the first confidence of the candidate lane is conducive to improving the accuracy and temporal stability of the main lane. Furthermore, the above implementation scheme can also screen the optimal lane group according to the first confidence of the candidate lanes, and then determine the main lane of the vehicle from the optimal lane group, which can further improve the accuracy and timing stability of the main lane, and can accurately infer the lane semantics even when the vehicle is driving in a lane change scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0118] The disclosure of the present application will become easier to understand with reference to the accompanying drawings. It is easy for those skilled in the art to understand that these drawings are only for illustrative purposes and are not intended to limit the scope of protection of the present application. Among them:
[0119] Figure 1 It is a schematic diagram of lane semantics and lane line semantics;
[0120] Figure 2 is a schematic diagram of the left side, right side, front direction and rear direction of a vehicle in a vehicle body coordinate system according to an embodiment of the present application;
[0121] Figure 3 is a flowchart of the main steps of a lane semantic reasoning method according to an embodiment of the present application;
[0122] Figure 4 is a schematic diagram of a lane group obtained based on candidate lanes according to an embodiment of the present application;
[0123] Figure 5 This is a schematic flow chart of the main steps of obtaining lane lines in the environment where the vehicle is located according to an embodiment of the present application;
[0124] Figure 6 is a schematic diagram of the main steps of obtaining candidate lanes according to an embodiment of the present application;
[0125] Figure 7 A road diagram according to an embodiment of the present application Figure 1 ;
[0126] Figure 8 A road diagram according to an embodiment of the present application Figure 2 ;
[0127] Fig. 9 A road diagram according to an embodiment of the present application Figure 3 ;
[0128] Fig.10 A road diagram according to an embodiment of the present application Figure 4 ;
[0129] Fig.11 A road diagram according to an embodiment of the present application Figure 5 ;
[0130] Fig.12 A road diagram according to an embodiment of the present application Figure 6 ;
[0131] Fig.13 A road diagram according to an embodiment of the present application Figure 7 ;
[0132] Fig.14 This is a schematic flow chart of the main steps of obtaining the main lane where the vehicle is located at the current moment according to an embodiment of the present application;
[0133] Fig.15 A road diagram according to an embodiment of the present application Figure 8 ;
[0134] Fig.16 A road diagram according to an embodiment of the present application Fig. 9 ;
[0135] Fig.17 is a flowchart of the main steps of a lane semantic reasoning method according to another embodiment of the present application;
[0136] Fig.18 It is a schematic diagram of the main structure of a smart device according to an embodiment of the present application.
[0137] Reference numerals:
[0138] 11: memory; 12: processor. DETAILED DESCRIPTION
[0139] Some embodiments of the present application are described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present application and are not intended to limit the protection scope of the present application.
[0140] In the description of this application, "processor" may include hardware, software or a combination of the two. The processor may be a central processing unit, a microprocessor, an image processor, a digital signal processor or any other suitable processor. The processor has data and / or signal processing functions. The processor may be implemented in software, hardware or a combination of the two. Computer-readable storage media include any suitable medium that can store program code, such as a disk, a hard disk, an optical disk, a flash memory, a read-only memory, a random access memory, etc.
[0141] The relevant user personal information that may be involved in the various embodiments of this application is strictly in accordance with the requirements of laws and regulations, following the principles of legality, legitimacy and necessity, based on the reasonable purposes of business scenarios, to process the personal information that users actively provide during the use of products / services or generated due to the use of products / services, as well as the personal information obtained with the user's authorization.
[0142] The user personal information processed by this application will vary depending on the specific product / service scenario, and shall be based on the specific scenario in which the user uses the product / service, and may involve the user's account information, device information, driving information, vehicle information or other related information. This application will treat the user's personal information and its processing with a high degree of diligence.
[0143] This application attaches great importance to the security of user personal information and has taken reasonable and feasible security protection measures that meet industry standards to protect user information and prevent personal information from being accessed, disclosed, used, modified, damaged or lost without authorization.
[0144] Here we first explain some terms involved in this application.
[0145] The vehicle body coordinate system is also called the vehicle body coordinate system, and its origin coincides with the center of mass of the vehicle. When the vehicle is stationary on the horizontal ground, the X-axis is parallel to the ground and points to the front of the vehicle (i.e., the forward direction of the vehicle), the Y-axis points to the left side of the vehicle (i.e., the lateral direction of the vehicle), and the Z-axis points upward, where the positive direction of the Y-axis is the lateral direction of the vehicle, and the positive direction of the X-axis is the forward direction of the vehicle. In addition, the X-axis and the Y-axis in each embodiment of the present application refer to the X-axis and the Y-axis of the vehicle body coordinate system.
[0146] In the embodiment of the present application, the left side and the right side of the vehicle are divided based on the vehicle body coordinate system. If the direction from the center of mass to one side of the vehicle is the same as the positive direction of the Y axis, then this side is the left side, that is, the left side is the side pointing to the positive direction of the Y axis; if the direction from the center of mass to one side of the vehicle is the same as the negative direction of the Y axis, then this side is the right side, that is, the right side is the side pointing to the negative direction of the Y axis. Figure 2 The schematic diagram of the left side, right side, front and rear of the vehicle in the vehicle body coordinate system is shown as an example.
[0147] In the embodiment of the present application, the left and right sides of the lane are also divided based on the vehicle body coordinate system, and the division method is the same as the left and right sides of the above-mentioned vehicle.
[0148] The following is a description of an embodiment of the lane semantic reasoning method provided in this application.
[0149] See attached Figure 3 , Figure 3 FIG. 1 is a flow chart of the main steps of the lane semantic reasoning method according to an embodiment of the present application. Figure 3 As shown, the lane semantic reasoning method in the embodiment of the present application mainly includes the following steps S101 to S106.
[0150] Step S101: Obtain candidate lanes according to the lane lines in the environment where the vehicle is currently located.
[0151] The lane lines in the environment may be constantly changing during the driving process of the vehicle. The lane lines can be obtained at each driving moment, and the candidate lanes can be obtained based on the lane lines. Since the lane lines are constantly changing, the candidate lanes may also be different at different driving moments. The above current moment can be understood as the current driving moment.
[0152] In some embodiments, the vehicle is provided with a sensor and a perception model, and the perception model can sense lane lines on the data frames collected by the sensor to obtain lane lines in the environment where the vehicle is located. The sensor may include a camera, a laser radar, etc. The data frame has time information, and the time corresponding to the data frame during the vehicle's driving process can be used as the driving time. Taking a data frame as an example, if its corresponding time is the current time, the previous time is the time corresponding to the data frame before this data frame, and the next time is the time corresponding to the data frame after this data frame.
[0153] Step S102: Acquire multiple lane groups according to the candidate lanes, wherein the multiple lane groups are arranged in sequence along the X-axis, and the lane groups include one or more candidate lanes arranged in sequence along the Y-axis, wherein the X-axis and the Y-axis are the X-axis and the Y-axis of the vehicle body coordinate system.
[0154] See attached Figure 4 , Figure 4 The lane group obtained based on the candidate lanes is shown as an example. Figure 4 As shown, LANE1 to LANE12 are all candidate lanes, LANE1 to LANE3 form lane group 1, LANE4 to LANE8 form lane group 2, LANE9 to LANE12 form lane group 3, and lane group 1, lane group 2, and lane group 3 are arranged in sequence along the X axis. Taking lane group 1 as an example, the candidate lanes LANE1 to LANE3 in lane group 1 are arranged in sequence along the Y axis.
[0155] Step S103: For each lane group, obtain the multi-dimensional confidence of the candidate lanes in the lane group, and obtain the first confidence of the candidate lane according to the multi-dimensional confidence.
[0156] In this embodiment, the multi-dimensional confidence may include confidence in three dimensions, namely, geometric confidence, semantic confidence, and distance confidence. These three confidences are described below.
[0157] 1. Explain the geometric confidence.
[0158] In this embodiment, the geometric confidence is the confidence of the geometric attributes of the candidate lane, and the geometric attributes may include geometric information such as lane line length, lane line direction, lane width, etc. The geometric confidence indicates the degree of credibility that the geometric attributes of the candidate lane are the geometric attributes of the lane, rather than the geometric attributes of other road areas. The higher the geometric confidence, the more likely the geometric attributes of the candidate lane are the geometric attributes of a lane, rather than the geometric attributes of other road areas.
[0159] Based on the geometric confidence, the geometric attributes of the candidate lanes can be evaluated to ensure that the candidate lanes are lanes rather than other road areas.
[0160] 2. Explain the semantic confidence.
[0161] In this embodiment, the semantic confidence is the confidence that the candidate lane was the main lane at the previous moment, and the candidate lane is the candidate lane at the current moment obtained by the aforementioned step S101. The semantic confidence indicates the credibility of the candidate lane at the current moment as the main lane at the previous moment. The higher the semantic confidence, the more likely the candidate lane at the current moment was the main lane at the previous moment.
[0162] Based on the semantic confidence, the semantic temporal consistency of the candidate lanes can be evaluated to ensure the temporal stability of the main lane.
[0163] 3. Explain the distance confidence.
[0164] In this embodiment, the distance confidence is the confidence that the candidate lane is closest to the vehicle. The distance confidence indicates the degree of credibility that the candidate lane is closest to the vehicle. The higher the distance confidence, the higher the possibility that the candidate lane is closest to the vehicle.
[0165] The closer the candidate lane is to the vehicle, the more likely it is to be the main lane. Therefore, based on the distance confidence, the distance between the candidate lane and the vehicle can be used to evaluate whether the candidate lane is the main lane, thereby ensuring the accuracy of the main lane.
[0166] The first confidence level is described below.
[0167] After obtaining the multi-dimensional confidence, a first confidence can be obtained based on the confidence of each dimension, which can comprehensively indicate whether the candidate lane is the main lane (the lane where the vehicle is located). That is, the first confidence indicates the credibility of the candidate lane as the main lane. The higher the first confidence, the more likely the candidate lane is to be the main lane.
[0168] In some implementations, an average value of the confidences of the various dimensions may be obtained, and the first confidence may be obtained based on the average value. For example, the average value may be used as the first confidence.
[0169] In some implementations, the product of multi-dimensional confidences may be obtained, and the first confidence of the candidate lane may be obtained based on the product, that is, the confidences of each dimension may be multiplied together, and the first confidence may be obtained based on the obtained product. For example, the product may be used as the first confidence.
[0170] Step S104: For each lane group, a second confidence level of the lane group is obtained according to the first confidence levels of all candidate lanes in the lane group.
[0171] In some implementations, an average value of the first confidences of all candidate lanes in the lane group may be obtained, and the second confidence may be obtained based on the average value. For example, the average value may be used as the second confidence.
[0172] In some implementations, the sum of the first confidences of all candidate lanes in a lane group may be obtained, and the second confidence of the lane group may be obtained based on the sum of the first confidences. For example, the sum of the first confidences is used as the second confidence. Based on this implementation, not only the level of the first confidence but also the number of candidate lanes in the lane group may be considered, and a more accurate second confidence may be obtained from these two dimensions at the same time. Taking two lane groups as an example, if the first confidences of the candidate lanes in the two lane groups are the same, but one lane group has a large number of candidate lanes and the other lane group has a small number of candidate lanes, then the second confidence of the lane group with a large number of candidate lanes will be higher.
[0173] Step S105: Obtain the optimal lane group according to the second confidence level of each lane group.
[0174] Specifically, the lane group with the second largest confidence level may be used as the optimal lane group.
[0175] Step S106: Obtain the main lane where the vehicle is currently located according to the optimal lane group, and determine the semantics of each lane line in the optimal lane group according to the main lane.
[0176] In some implementations, the first confidence of each candidate lane in the optimal lane group may be obtained, and the one with the largest first confidence may be used as the main lane.
[0177] When determining the semantics of the lane line, for the main lane, the semantics of the lane line on the left is assigned as main left, and the semantics of the lane line on the right is assigned as main right.
[0178] For the first candidate lane on the left side of the main lane, the semantics of its left lane line is assigned to left-left, and its right lane line has the same semantics as the left lane line of the main lane.
[0179] For the second candidate lane on the left side of the main lane, the semantics of its left lane line is assigned as left-left-left, and its right lane line has the same semantics as the left lane line of the above left lane.
[0180] For the first candidate lane on the right side of the main lane, the semantics of its right lane line is assigned to right-right, and its left lane line has the same semantics as the right lane line of the main lane.
[0181] For the second candidate lane on the right side of the main lane, the semantics of its right lane line is assigned as right-right-right, where the left lane line has the same semantics as the right lane line of the above-mentioned right lane.
[0182] The following is combined with Figure 4 For explanation. Figure 4As shown in Figure 1, if lane group 1 (including candidate lanes LANE1, LANE2, and LANE3) is the optimal lane group, LANE3 is the main lane, LANE2 is the first candidate lane on the left side of the main lane, and LANE1 is the second candidate lane on the left side of the main lane. The semantics of the left and right lane lines of LANE3 are respectively the main left (i.e. Figure 4 HOST_LEFT) and the main right (i.e. Figure 4 HOST_RIGHT in LANE2, the semantics of the left lane line is left-left (i.e. Figure 4 LEFT_LEFT in LANE1, the semantics of the left lane line of LANE1 is left-left-left (i.e. Figure 4 in the LEFT_LEFT_LEFT column).
[0183] Based on the method described in steps S101 to S106, the confidence can be obtained from the three dimensions of geometry, semantics, and distance to obtain the first confidence of the candidate lane, which is conducive to improving the accuracy and temporal stability of the main lane. The above method can also screen the optimal lane group according to the first confidence of the candidate lane, and then determine the main lane of the vehicle from the optimal lane group, which can further improve the accuracy and temporal stability of the main lane, and can accurately infer the lane semantics even when the vehicle is driving in a lane change scenario.
[0184] The following is a description of an embodiment of the lane semantic reasoning method.
[0185] In some embodiments of the present application, the lane semantic reasoning method may further include a step of obtaining lane lines in the environment where the vehicle is located (i.e., step S100), and then executing steps S101 to S106 in the above embodiment after obtaining the lane lines. Specifically, Figure 5 As shown, the lane lines in the environment where the vehicle is located can be obtained through the following steps S1001 to S1003.
[0186] Step S1001: Acquire a first candidate lane line in the environment where the vehicle is located, where the first candidate lane line is obtained by performing lane line perception on a data frame collected by a sensor on the vehicle. Specifically, a perception model is provided on the vehicle, and the lane line can be obtained by performing lane line perception on the data frame through the perception model, and the sensor may include a camera, a laser radar, etc.
[0187] Step S1002: Obtain the first candidate lane line in the first focus area as the second candidate lane line, the range of the first focus area on the X axis is [-a, a], a>0, and the unit of a can be meters. That is, the first focus area includes a meter range in front of the vehicle and a meter range behind the vehicle.
[0188] When setting a specific value of a, those skilled in the art can set it according to the range of lane lines to be obtained. In some embodiments, a can be 120, that is, the range of 120 meters in front and behind the vehicle is the focus area.
[0189] Step S1003: remove the second candidate lane lines that belong to the target lane line, and use the remaining second candidate lane lines as valid lane lines.
[0190] The target lane lines include the lane lines of the opposite lane of the vehicle, the lane lines on the left and right sides of the intersection, and the guide lines of the intersection. The lane has a driving direction, and the opposite lane is the lane whose driving direction is opposite to the actual driving direction of the vehicle. The guide lines of the intersection are line segments in the intersection used to guide vehicles to drive in the direction indicated by them. The shapes of the guide lines and the lane lines may be quite different. When obtaining candidate lanes based on the lane lines, the guide lines may cause interference, so the guide lines can be removed. Figure 4 An intersection guide line is shown as an example.
[0191] Based on the methods described in steps S1001 to S1003 above, valid lane lines located in the area of interest can be screened out, which is beneficial to improving the accuracy of candidate lanes.
[0192] The aforementioned steps S101, S103 and S106 are described below.
[0193] 1. Explain step S101.
[0194] In some implementations of step S101, Figure 6 The following steps S1011 to S1013 are shown to obtain candidate lanes.
[0195] Step S1011: Sort the lane lines in ascending order according to their Y-axis coordinates in the vehicle body coordinate system to form a lane line sequence.
[0196] Step S1012: Obtain the first lane line and the second lane line, where the first lane line is any lane line in the lane line sequence, and the second lane line is one or more lane lines arranged after the first lane line in the lane line sequence. In this embodiment, the maximum number of second lane lines can be set. For example, the maximum number is 3, and for each first lane line, a maximum of 3 second lane lines are obtained. If the number of lane lines arranged after the first lane line is less than the maximum number, then the actual existing lane lines can be obtained.
[0197] Step S1013: If the first lane line and the second lane line satisfy the preset lane constraint condition, a candidate lane is obtained according to the lane formed by the first lane line and the second lane line.
[0198] In addition, if the first lane line and the second lane line do not satisfy the preset lane constraint condition, there is no need to obtain a candidate lane based on the lane formed by the two lanes.
[0199] The preset lane constraints include:
[0200] The length intersection-and-joint ratio between the first lane line and the second lane line is greater than a preset intersection-and-joint ratio threshold, the lane width formed by the first lane line and the second lane line is within a preset width range, and there are no other lane lines between the first lane line and the second lane line. In some embodiments, the condition that there are no other lane lines between the first lane line and the second lane line can be that there are no other lane lines between the first and second lane lines within a preset range in front of the vehicle. In some embodiments, the preset range can be 30 meters. When setting the above preset intersection-and-joint ratio threshold, a large number of different lanes can be obtained, and the length intersection-and-joint ratios of the lane lines on both sides of these lanes are analyzed to obtain a minimum length intersection-and-joint ratio, and the intersection-and-joint ratio threshold is set according to this minimum length intersection-and-joint ratio. In some embodiments, the intersection-and-joint ratio threshold is 0.6.
[0201] In some embodiments, the lane width composed of the first lane line and the second lane line in the above-mentioned preset lane constraint condition is within the preset width range, which may include: the lane width composed of the first lane line and the adjacent lane line is within the first width range, the lane width composed of the first lane line and the non-adjacent lane line is within the second width range, the adjacent lane line is the second lane line adjacent to the first lane line, the non-adjacent lane line is the second lane line not adjacent to the first lane line, and the second width range is greater than the first width range. Based on this, the lane width can be constrained by using adjacent lanes and non-adjacent lanes at the same time to ensure the accuracy of the candidate lanes. In some embodiments, the first width range is [2,7] meters, and the second width range is [2,10] meters.
[0202] The following is combined with Figure 7 , Attachment Figure 8 The above method is described.
[0203] like Figure 7As shown, LINE1 to LINE7 are all lane lines. The minimum Y-axis coordinate of each lane line is obtained respectively, and these lane lines are sorted in ascending order of the minimum Y-axis coordinate of each lane line. The arrangement order is: LINE1, LINE2, LINE3, LINE4, LINE5, LINE6, LINE7. The maximum number of the second lane line is 3. Taking LINE1 as the first lane line as an example, its corresponding second lane lines include LINE2, LINE3, and LINE4. LINE1 and LINE2 meet the preset lane constraint conditions, and a candidate lane can be obtained according to the lane formed by the two; there is a lane line LINE2 between LINE1 and LINE3, so LINE1 and LINE3 do not meet the preset lane constraint conditions, and a candidate lane cannot be obtained according to the lane formed by the two; there are lane lines LINE2 and LINE3 between LINE1 and LINE4, so LINE1 and LINE4 also do not meet the preset lane constraint conditions, and a candidate lane cannot be obtained according to the lane formed by the two.
[0204] As Figure 8 shown, the area within the double yellow line is the area where vehicle driving is prohibited. According to the above preset lane constraint conditions to obtain candidate lanes, the lane formed by the outer line of the double yellow line and the right lane line of the vehicle can be used as a candidate lane, and the lane formed by the inner line of the double yellow line and the right lane line of the vehicle will not be used as a candidate lane. If it is determined that the lane formed by the outer line of the double yellow line and the right lane line of the vehicle is the main lane, then the semantics of the outer line of the double yellow line is the main left, and the semantics of the right lane line of the vehicle is the main right.
[0205] Based on the method described in the above steps S1011 to S1013, the accuracy and reliability of the candidate lane can be guaranteed.
[0206] The following will explain the above step S1013.
[0207] In some embodiments of the above step S1013, within the second attention area, through the following steps 11 to 14, and according to the lane formed by the first lane line and the second lane line, a candidate lane can be obtained. The range of the second attention area on the X-axis is [-b, c], 0 < b < c < a, and the units of b and c are also meters, where a is the parameter of the first attention area in the foregoing embodiment. That is to say, the second attention area includes a range of c meters in front of the vehicle and a range of b meters behind the vehicle. When setting the specific values of b and c, those skilled in the art can set them according to the lane range they want to obtain. In some embodiments, a = 120 meters, b = 10 meters, and c = 80 meters.
[0208] Step 11: Take the lane formed by the first lane line and the second lane line as the lane to be inspected.
[0209] Step 12: Obtain the fifth distance from the shape point on the first lane line to the second lane line, and use the fifth distance as the width of the shape point.
[0210] In the embodiment of the present application, the lane line is expressed in the form of a point chain, that is, the lane line is composed of multiple continuous shape points, and the interval between each two adjacent shape points is fixed. For example, the lane line can be expressed as [(x0,y0), (x1,y1),…, (xi,yi) ,…,(xn,yn)], (xi,yi) represents the coordinates of the i-th shape point, xi represents the X-axis coordinate in the vehicle body coordinate system, yi represents the Y-axis coordinate in the vehicle body coordinate system, i=1,…,n, and n is the total number of shape points. Since the lengths of different lane lines may be different, the total number of shape points on different lane lines may be different.
[0211] The fifth distance may be understood as the distance between the shape point on the first lane line and the second lane line in the X-axis direction of the vehicle body coordinate system.
[0212] Step 13: Determine whether the lane to be inspected is a passable passage based on the width of each point on the first lane line.
[0213] According to the width of the shape point, the width at different positions on the lane to be inspected can be obtained, and then the change of the width can be obtained. According to the change, it can be determined whether the lane to be inspected is a lane where vehicles can pass.
[0214] Step 14: If the lane to be inspected is a passable lane, a candidate lane is obtained based on the lane to be inspected. For example, the lane to be inspected can be used as a candidate lane. In addition, if the lane to be inspected is not a passable lane, a candidate lane is no longer obtained based on the lane to be inspected.
[0215] Based on the methods described in steps 11 to 14 above, it can be ensured that the candidate lane is a lane through which vehicles can pass, which is conducive to improving the accuracy of obtaining the main lane from the candidate.
[0216] In some implementations of the above step 13, it can be determined whether the lane to be inspected is a passable passage through the following steps 131 to 133.
[0217] Step 131: Obtain a width variation range according to the width of each shape point, where the width variation range is a range in which the width of the shape point on the first lane line changes as the shape point changes.
[0218] In this embodiment, the X-axis coordinate of the shape point in the vehicle body coordinate system can be obtained, and it can be determined whether the width of the shape point changes with the change of the X-axis coordinate. Then, the target shape points whose widths change with the change of the X-axis coordinate are obtained, and the range in which the above width changes with the change of the shape points is obtained according to these target shape points. In some embodiments, the least squares method can be used to fit the relationship between the width of the shape point and the X-axis coordinate, and the target shape points are determined according to the fitting result.
[0219] In this embodiment, the width change range can be obtained according to the widths of the respective shape points within the third region of interest. The range of X for the third region of interest is [-b, d], where 0 < b < d < c < a, and the unit of d is also meters. a is a parameter of the first region of interest in the foregoing embodiment, and b and c are parameters of the third region of interest in the foregoing embodiment. That is to say, the third region of interest includes a range of d meters in front of the vehicle and a range of b meters behind the vehicle. When setting the specific value of b, those skilled in the art can set it according to the width range to be concerned. In some embodiments, a = 120 meters, b = 10 meters, c = 80 meters, and d = 50 meters.
[0220] Step 132: Obtain the length ratio between the width change range and the first lane line, and obtain the widths of the shape points at the starting position and the ending position on the first lane line.
[0221] The width change range is composed of target shape points, and it is actually a section of the lane line on the first lane line. Therefore, the maximum X-axis coordinate and the minimum X-axis coordinate of the target shape points on this section of the lane line can be obtained, and the length of this section of the lane line, that is, the length of the width change range, can be obtained according to the difference between the maximum X-axis coordinate and the minimum X-axis coordinate. The length of the width change range can also be understood as the length of the width change range projected onto the X-axis.
[0222] Similarly, when obtaining the length of the first lane line, the maximum X-axis coordinate and the minimum X-axis coordinate of the shape points on the first lane line can be obtained, and the length of the first lane line can be obtained according to the difference between the maximum X-axis coordinate and the minimum X-axis coordinate. The length of the first lane line can also be understood as the length of the first lane line projected onto the X-axis.
[0223] The starting position on the first lane line can be understood as the position where the shape point with the smallest X-axis coordinate is located, and the ending position can be understood as the position where the shape point with the largest X-axis coordinate is located.
[0224] Step 133: If the length ratio is greater than a preset ratio threshold and the widths of the shape points at the starting position and the ending position are both less than a preset width threshold, the lane to be inspected is a non-passable lane; otherwise, the lane to be inspected is a passable lane.
[0225] If the length ratio is greater than the preset ratio threshold, it indicates that the width variation range is relatively long; if the widths of the shape points at the starting position and the ending position are both less than the preset width threshold, it indicates that the widths of the starting position and the ending position are relatively small. Fig. 9 , Fig.10 As shown, in this case, the lane to be inspected may be a guide strip, and vehicles cannot pass through the guide strip. When setting the specific values of the preset ratio threshold and the preset width threshold, the width variation range, the starting position width, and the ending position width of the guide strip can be analyzed to determine the minimum length ratio between the width variation range of the guide strip and the length of the guide strip, and the value of the ratio threshold can be set according to the minimum length ratio; in addition, the maximum values of the starting position width and the ending position width of the guide strip can be determined, and the value of the width threshold can be set according to the maximum value.
[0226] Based on the methods described in steps 131 to 133 above, it is possible to accurately identify whether the lane to be inspected is a passable lane, which is beneficial to improving the accuracy of the candidate lanes.
[0227] In some embodiments, if the length of the lane to be inspected is less than a preset length threshold or the maximum width of the midpoint of the lane to be inspected is less than a preset maximum width threshold, the lane to be inspected can be determined to be an impassable lane. That is, when the length of the lane to be inspected is relatively small or the width is relatively small, the lane to be inspected is also determined to be an impassable lane. When setting the above-mentioned length threshold and maximum width threshold, those skilled in the art can analyze the length and width of the actual impassable lanes, obtain the minimum length value and the minimum width value, set the above-mentioned length threshold according to the minimum length value, and set the above-mentioned maximum width threshold according to the minimum width value.
[0228] 2. Explain step S103.
[0229] In some implementations of the above step S103, the geometric attributes of the candidate lanes include lane line length, lane line direction, and lane width, and the geometric confidence of the candidate lanes includes length confidence, direction confidence, and width confidence.
[0230] The length confidence is the confidence that the lengths of the lane lines on both sides of the candidate lane are consistent. The higher the length confidence is, the higher the consistency of the lengths of the lane lines on both sides is.
[0231] The direction confidence is the confidence that the directions of the lane lines on both sides of the candidate lane are consistent. If the direction confidence is higher, the degree of consistency of the directions of the lane lines on both sides is higher, that is, they are more parallel.
[0232] The width confidence is the confidence that the width of the candidate lane is consistent with the target width. The higher the width confidence, the higher the consistency between the width of the candidate lane and the target width. When determining the value of the target width, the widths of a large number of lanes can be analyzed, the average widths of these lanes can be obtained, and the target width can be set according to the average width. For example, the average width is used as the target width. In some embodiments, the target width can be 4 meters.
[0233] The length confidence, direction confidence, and width confidence are explained below.
[0234] 1. Explain the length confidence.
[0235] In some implementations, the length confidence of the candidate lane may be obtained through the following steps 21 to 22.
[0236] Step 21: Obtain the intersection-and-anneal ratio of the lengths of the lane lines on both sides of the candidate lane. Specifically, a conventional intersection-and-anneal ratio acquisition method can be used to obtain the intersection-and-anneal ratio between the lengths of the lane lines on both sides. Step 22: Obtain the length confidence based on the intersection-and-anneal ratio of the lengths. Specifically, the intersection-and-anneal ratio of the lengths can be used as the length confidence. Based on the methods described in steps 21 to 22 above, the length confidence can be obtained conveniently and accurately using the intersection-and-anneal ratio of the lengths of the lane lines.
[0237] In some implementations of the above step 21, the intersection-and-merge ratio of the lengths of lane lines on both sides of the candidate lane may be obtained through the following steps 211 to 214.
[0238] Step 211: Obtain the overlapping area of the lane lines on both sides, and obtain the first length of the overlapping area projected onto the X-axis.
[0239] Step 212: respectively obtain the lengths of the lane lines on both sides projected onto the X-axis, and select the smaller one of the lengths of the lane lines on both sides as the second length.
[0240] Step 213: Obtain a first length ratio of the first length to the second length.
[0241] Step 214: Obtain a length intersection-combination ratio according to the first length ratio.
[0242] Specifically, the first length ratio may be used as a length intersection-over-combination ratio.
[0243] like Fig.11As shown, the lane lines on both sides of the candidate lane are LINE1 and LINE2 respectively. The lengths of LINE1 and LINE2 projected onto the X-axis are L1 and L2 respectively, and L1 < L2. In addition, the length of the overlapping area of LINE1 and LINE2 projected onto the X-axis is also L1. Thus, it can be determined that the first length is L1, the second length is L1, and the length intersection-overunion ratio is L1 / L1 = 1.
[0244] As Fig.12 shown, the lane lines on both sides of the candidate lane are LINE1 and LINE2 respectively. The lengths of LINE1 and LINE2 projected onto the X-axis are L1 and L2 respectively, and L1 < L2. In addition, the length of the overlapping area of LINE1 and LINE2 projected onto the X-axis is L3. Thus, it can be determined that the first length is L3, the second length is L1, and the length intersection-overunion ratio is L3 / L1 < 1.
[0245] Based on the method described in the above steps 211 to 214, the length intersection-overunion ratio of the lane lines on both sides of the candidate lane can be obtained conveniently and accurately by using the projected lengths of the lane lines onto the X-axis.
[0246] In some embodiments of the above step 21, the above steps 213 and 214 can be replaced with the following steps 215 to 219.
[0247] Step 215: Obtain a preset shortest lane line length, where the shortest lane line length is the shortest lane line length located behind the vehicle. The area behind the vehicle is the negative X-axis direction, and the shortest lane line length is the length of the lane line projected onto the X-axis behind the vehicle. The shortest lane line length is a value set to ensure the continuity or stability of the lane line before and after the vehicle. Even if there is no lane line behind the vehicle, this shortest lane line length will still be used, and the length intersection-overunion ratio will be obtained through subsequent steps. When setting the specific value of the shortest lane line length, it can be set according to the length of the vehicle. For example, the shortest lane line length is greater than the length of the vehicle.
[0248] Step 216: Obtain a third length according to the sum of the first length and the shortest lane line length. Specifically, take the sum of the first length and the shortest lane line length as the third length.
[0249] Step 217: Obtain a fourth length according to the sum of the second length and the shortest lane line length. Specifically, take the sum of the second length and the shortest lane line length as the fourth length.
[0250] Step 218: Obtain a second length ratio between the third length and the fourth length.
[0251] Step 219: Obtain the length intersection-overunion ratio according to the second length ratio.
[0252] Specifically, the second length ratio is used as the length intersection-combination ratio.
[0253] Based on the method described in steps 215 to 219 above, the lengths of the lane lines in front and behind the vehicle can be taken into consideration at the same time to obtain the length intersection-merge ratio, which can further improve the accuracy of the length intersection-merge ratio.
[0254] 2. Explain the direction confidence.
[0255] In some implementations, the direction confidence of the candidate lane may be obtained through the following steps 31 to 35 .
[0256] Step 31: Obtain a first distance from a first shape point on a lane line in a candidate lane to another lane line, and use the first distance as the width of the first shape point.
[0257] The meaning of the first shape point is the same as the meaning of the shape point in step 12 in the above embodiment. The first distance can be understood as the distance between the first shape point and another lane line in the Y-axis direction.
[0258] like Fig.13 As shown, the lane lines on both sides of the candidate lane are LINE1 and LINE2, and the first distance from a shape point (ie, the first shape point) on LINE1 to LINE2 is d.
[0259] Step 32: Obtain an average value of the widths of all first shape points, and obtain a difference between the width of each first shape point and the average value.
[0260] Step 33: The first shape point whose absolute value of the difference is less than the first difference threshold is used as the second shape point.
[0261] Step 34: Obtain the ratio of the number of the second shape points to the number of the first shape points.
[0262] Step 35: Obtain direction confidence based on the quantity ratio.
[0263] Specifically, the quantity ratio can be used as the direction confidence.
[0264] If the proportion of the second shape points is larger, it indicates that the lane lines on both sides of the candidate lane are more parallel, that is, the directions of the lane lines on both sides are more consistent.
[0265] Based on the methods described in steps 31 to 35 above, the width of the shape point can be used to accurately obtain the direction confidence that can represent the degree of consistency of the lane line direction.
[0266] In some implementations of the above step 35, the direction confidence can be obtained according to the quantity ratio through the following steps 351 to 353.
[0267] Step 351: Obtain a preset minimum value of the direction confidence, the minimum value being greater than or equal to 0.5. Step 352: Obtain the product of the quantity ratio and the preset weight, the preset weight being greater than 0 and less than 1. Step 353: Obtain the direction confidence according to the sum of the minimum value and the product.
[0268] In some implementations, the minimum value of the direction confidence is 0.5, the preset weight is 0.5, and the direction confidence can be expressed as LaneParallelConfidence=0.5+k×0.5, where LaneParallelConfidence is the direction confidence and k is the above quantity ratio.
[0269] Based on the method described in step 351 to step 353, if the number of second shape points is 0, the direction confidence can also reach 0.5 instead of becoming 0.
[0270] 3. Explain the width confidence.
[0271] In some implementations, the width confidence of the candidate lane may be obtained through the following steps 41 to 42 .
[0272] Step 41: Get the starting width of the candidate lane.
[0273] Specifically, the starting position of the candidate lane is obtained, and then the lane width at the starting position is obtained as the starting width.
[0274] Step 42: Obtain width confidence according to the starting width.
[0275] For a lane, the absolute value of the difference between the starting width and the target width of the lane is negatively correlated with the width confidence of the lane. That is, the larger the difference between the starting width and the target width, the smaller the width confidence; the smaller the difference between the starting width and the target width, the greater the width confidence.
[0276] After the starting width of the candidate lane is obtained, the absolute value of the difference between the starting width and the target width may be obtained, and the width confidence corresponding to the absolute value may be obtained.
[0277] Based on the method described in steps 41 to 42 above, the starting width of the candidate lane can be used to conveniently and accurately obtain the width confidence of the candidate lane.
[0278] In some implementations of the above step 42 , the width confidence can be obtained according to the starting width through the following steps 421 to 422 .
[0279] Step 421: Obtain a first fitting function, where the first fitting function is used to represent the corresponding relationship between the starting width and the width confidence.
[0280] When determining the first fitting function, the starting widths and width confidences of a large number of different lanes can be obtained, and then the starting widths and width confidences of these lanes are fitted with a nonlinear function to obtain the first fitting function. It should be noted that when it is necessary to obtain the width confidence, the already fitted first fitting function can be directly called, and there is no need to perform function fitting to obtain the first fitting function before using the first fitting function each time.
[0281] In some implementations, the target width is 4 meters, and the first fitting function may be LaneWidthConfidence= 1.0 - (1.6 × |start_width-4.0|) / 4.0, where LaneWidthConfidence represents the width confidence, and start_width represents the starting width of the lane.
[0282] Step 422: Using the starting width as an input of the first fitting function, and obtaining a width confidence corresponding to the starting width through the first fitting function.
[0283] Based on the method described in steps 421 to 422 above, the width confidence can be conveniently obtained using the first fitting function.
[0284] In some implementations of the above step S103, the semantic confidence of the candidate lane can be obtained in the following manner: determine whether the candidate lane at the current moment is the main lane at the previous moment; if it is the main lane, set the value of the semantic confidence to a first value; if it is not the main lane, set the value of the semantic confidence to a second value, wherein the first value is greater than the second value. In some implementations, the first value is 1.5 and the second value is 1.
[0285] Through this implementation, when the candidate lane was the main lane at the previous moment, the semantic confidence can be set higher, which is beneficial to improving the temporal stability of the main lane.
[0286] In some implementations of the above step S103, the distance confidence of the candidate lane may be obtained through the following steps 51 to 52.
[0287] Step 51: Obtain the second distance between the starting position of the candidate lane and the vehicle. In some embodiments, the distance between the starting position and the vehicle in the X-axis direction may be obtained, and this distance is used as the second distance. Step 52: Obtain the distance confidence according to the second distance, and the distance confidence is negatively correlated with the second distance. The smaller the second distance is, the closer the candidate lane is to the vehicle, and therefore, the higher the distance confidence is; conversely, the lower the distance confidence is.
[0288] See again the attached Figure 4 The second distance is the distance between the starting position of the lane and the vehicle in the X-axis direction. The second distance between lane LANE1 and the vehicle is d1, and the second distance between lane LANE8 and the vehicle is d8. d1 is less than d8, and the distance confidence of lane LANE1 is greater than the distance confidence of lane LANE8. In addition, the second distance between lane LANE2 and the vehicle is d2, d1=d2, so the distance confidences of lanes LANE1 and LANE2 are the same.
[0289] Based on the method described in steps 51 to 52 above, the distance confidence can be obtained conveniently and accurately using the distance between the starting position of the candidate lane and the vehicle.
[0290] In some implementations of the above step 52, the distance confidence can be obtained through the following steps 521 to 522.
[0291] Step 521: Obtain a second fitting function, where the second fitting function is used to represent the corresponding relationship between the second distance and the distance confidence.
[0292] When determining the second fitting function, a large number of second distances and distance confidences of different lanes can be obtained, and then the second distances and distance confidences of these lanes are fitted with a nonlinear function to obtain the second fitting function. It should be noted that when it is necessary to obtain the distance confidence, the already fitted second fitting function can be directly called, and there is no need to perform function fitting to obtain the second fitting function before using the second fitting function each time.
[0293] In some embodiments, the second fitting function is LaneNearestConfidence = (50 -d) / 50 × weight, where d represents the second distance of the lane, LaneNearestConfidence represents the distance confidence, and weight represents a preset weight, which is a constant less than 1. In some embodiments, weight = 0.8. By setting a preset weight, the value of the distance confidence can be limited to avoid being too large.
[0294] Step 522: taking the second distance as an input of a second fitting function, and obtaining a distance confidence corresponding to the second distance through the second fitting function.
[0295] Based on the method described in steps 521 to 522 above, the distance confidence level can be conveniently obtained by using the second fitting function.
[0296] In some implementations of the above step S103, the multi-dimensional confidence may include not only geometric confidence, semantic confidence, and distance confidence, but also lane suppression confidence. In this implementation, the lane suppression confidence may be obtained in the following manner:
[0297] It is determined whether the candidate lane is an abnormal bifurcated lane. If it is an abnormal bifurcated lane, the lane suppression confidence value can be set to a third value; if it is not an abnormal bifurcated lane, the lane suppression confidence value can be set to a fourth value. The third value is smaller than the fourth value.
[0298] If the candidate lane is an abnormal bifurcated lane, then the possibility that it is the main lane is relatively low, so the lane suppression confidence value can be set to a smaller value (i.e., the third value); otherwise, the lane suppression confidence value can be set to a larger value (i.e., the fourth value). In some embodiments, the third value is 0.1 and the fourth value is 1.
[0299] In some implementations, whether the candidate lane is an abnormal bifurcated lane may be determined through the following steps 61 to 62 .
[0300] Step 61: Determine whether the lane line of the candidate lane is a bifurcated lane line; if the lane line of the candidate lane is not a bifurcated lane line, the candidate lane is not an abnormal bifurcated lane; if one lane line of the candidate lane is a bifurcated lane line, go to step 62.
[0301] A bifurcation can be understood as a lane line splitting into two lane lines, and a bifurcated lane line can be understood as another lane line generated by a lane line splitting. Figure 7 As shown, lane line LINE2 is a forked lane line generated by forking lane line LINE1.
[0302] Step 62: Obtain the length difference between the lane lines on both sides of the candidate lane, and obtain the length of the bifurcation area on the candidate lane.
[0303] The bifurcation area can be understood as an unstable area where the lane width changes continuously. Figure 7 As shown, the lane width in the bifurcated area gradually increases.
[0304] Step 63: Determine whether the length difference is greater than a first length threshold and whether the length of the bifurcated area is greater than a second length threshold; if so, the candidate lane is an abnormal bifurcated lane; if not, the candidate lane is not an abnormal bifurcated lane.
[0305] If the length difference is greater than the first length threshold, it indicates that the length difference of the lane lines on both sides is relatively large; if the length of the bifurcated area is greater than the second length threshold, it indicates that the length of the bifurcated area is relatively large. When the length difference of the lane lines on both sides is relatively large and the length of the bifurcated area is also relatively large, it can be determined that the candidate lane is an abnormal bifurcated lane.
[0306] In some implementations, the length of the lane line is the length of the lane line projected onto the X-axis, and the length of the bifurcation area is also the length of the bifurcation area projected onto the X-axis.
[0307] See again the attached Figure 7 , Figure 7 The lane lines LINE1 and LINE2 in the figure are divided into two lanes. For the lane composed of LINE1 and LINE2, LINE2 is a bifurcated lane line. The bifurcated area is as follows: Figure 7 As shown, the length of the bifurcation area projected onto the X-axis is L. Since the length difference between lane lines LINE1 and LINE2 is less than the first length threshold, and the length L of the bifurcation area is less than the second length threshold, the lane formed by lane lines LINE1 and LINE2 is not an abnormal bifurcation lane.
[0308] Based on the methods described in steps 61 to 63 above, abnormal diverging lanes and normal merging / exiting lanes can be effectively distinguished, further improving the accuracy of candidate lanes.
[0309] 3. Explain step S106.
[0310] In some implementations of the above step S106, Fig.14 The following steps S1061 to S1064 shown in the figure obtain the main lane where the vehicle is currently located.
[0311] Step S1061: Obtain the first position point of the center line of the candidate lane.
[0312] The first position point can be understood as the position point with the smallest X-axis coordinate.
[0313] Step S1062: Obtain the X-axis coordinate and Y-axis coordinate of the first position point in the vehicle body coordinate system.
[0314] Step S1063: Perform a weighted sum calculation on the absolute value of the X-axis coordinate and the absolute value of the Y-axis coordinate to obtain a third distance, and use the third distance as the weighted distance of the candidate lane.
[0315] Specifically, a first weight of the absolute value of the X-axis coordinate can be obtained, and a second weight of the absolute value of the Y-axis coordinate can be obtained, the first weight is less than the second weight, and then a weighted sum calculation is performed based on the absolute value of the X-axis coordinate and its first weight, and the absolute value of the Y-axis coordinate and its second weight, and the calculation result is used as the third distance. The third distance is (w2×|y|+ w1×|x|), x and y represent the X-axis coordinate and the Y-axis coordinate, respectively, and w1 and w2 represent the first and second weights, respectively. In some embodiments, w1=1, w2=0.05.
[0316] Step S1064: Select a candidate lane with the smallest weighted distance as the main lane.
[0317] The smaller the weighted distance is, the closer the candidate lane is to the vehicle. Therefore, the candidate lane with the smallest weighted distance can be selected as the main lane.
[0318] Based on the method described in steps S1061 to S1064 above, the main lane can be accurately obtained by using the distance between the first position point of the center line on the candidate lane and the vehicle.
[0319] In some implementations of the above step S106, after the main lane where the vehicle is currently located is obtained through the above method embodiment, the stability of the main lane can also be checked through the following steps 71 to 75.
[0320] Step 71: The main lanes at the current moment and the previous moment are respectively used as the first main lane and the second main lane.
[0321] Step 72: Determine whether the first and second main lanes are the same; if they are the same, stop the stability check and use the first main lane as the final main lane at the current moment; if they are different, go to step 73 and continue the stability check.
[0322] Step 73: Determine whether the second main lane is the left lane or the right lane of the first main lane at the current moment; if the second main lane is neither the left lane nor the right lane, stop the stability check and use the first main lane as the final main lane at the current moment; if the second main lane is the left lane or the right lane, go to step 74 and continue the stability check.
[0323] Step 74: Obtain the difference between the weighted distances of the first main lane and the second main lane.
[0324] The method for obtaining the weighted distance is the same as the method described in the aforementioned steps S1061 to S1063, and will not be repeated here.
[0325] Step 75: Determine whether the difference in weighted distances is greater than a second difference threshold; if greater, use the first main lane as the final main lane at the current moment; if less than or equal to, use the second main lane as the final main lane at the current moment.
[0326] If the above difference is greater than the second difference threshold, it indicates that the weighted distance difference between the first and second main lanes is relatively large, and the vehicle is likely to have switched the main lane. Therefore, the first lane is taken as the final main lane at the current moment; otherwise, the vehicle may not have switched the main lane. In order to ensure the timing stability of the main lane, the second main lane is taken as the final main lane at the current moment.
[0327] When setting a specific value of the second difference threshold, those skilled in the art may obtain the minimum difference of the weighted distance when the vehicle switches to the main lane, and set the second difference threshold according to the minimum difference. For example, the minimum difference is used as the second difference threshold.
[0328] Based on the methods described in steps 71 to 75 above, frequent switching of the main lane of the vehicle can be avoided, thereby ensuring the timing stability of the main lane.
[0329] In some implementations of the above step S106, after the main lane where the vehicle is currently located is obtained through the above method embodiment, the correctness of the main lane can also be checked through the following steps 81 to 82.
[0330] Step 81: When the center line of the main lane is located on the left side of the vehicle, if the right lane line of the main lane is located on the right side of the vehicle, the main lane passes the verification; otherwise, the main lane fails the verification, and a new main lane is obtained based on the right lane of the main lane.
[0331] In some implementations, when acquiring a new main lane based on the right lane of the main lane, the right lane may be verified, and if it passes the verification, the right lane is used as the new main lane. Specifically, if the vehicle is located on the right lane, and the lane lines on both sides of the right lane are located on the left and right sides of the vehicle respectively, the right lane passes the verification, and the right lane can be used as the new main lane.
[0332] Step 82: When the center line of the main lane is located on the right side of the vehicle, if the left lane line of the main lane is located on the left side of the vehicle, the main lane passes the verification; otherwise, the main lane fails the verification, and a new main lane is obtained based on the left lane of the main lane.
[0333] In some implementations, when acquiring a new main lane based on the left lane of the main lane, the left lane may be verified, and if it passes the verification, the left lane is used as the new main lane. Specifically, if the vehicle is located on the left lane, and the lane lines on both sides of the left lane are located on the left and right sides of the vehicle respectively, the left lane passes the verification, and the left lane can be used as the new main lane.
[0334] Based on the methods described in steps 81 to 82 above, the accuracy of the main lane can be further improved.
[0335] In some implementations of the above step S106, after the main lane where the vehicle is currently located is obtained through the above method embodiment, the correctness of the main lane can be checked by the methods described in the above steps 81 to 82. After the correctness check passes, the stability of the main lane can be checked by the methods described in the above steps 71 to 75.
[0336] In some implementations of the above step S106, when determining the semantics of each lane line in the optimal lane group based on the main lane, there may be a single-side lane line scenario and a lane line missed detection scenario. For these two scenarios, different methods can be used to determine the lane line semantics. The lane line semantics determination methods for these two scenarios are described below.
[0337] 1. Explain the single lane line scenario.
[0338] The single lane line scenario means that the main lane has only one lane line. In this case, if the vehicle is on the left side of this lane line, the semantics of this lane line is assigned to the main right; if the vehicle is on the right side of this lane line, the semantics of this lane line is assigned to the main left.
[0339] See attached Fig.15 , Fig.15 An example of a country road is shown, with vehicles traveling on Fig.15 Since there is only one lane line between the lane line and the right curb, and the vehicle is on the right side of this lane line, the semantic value of this lane line is assigned as main left. The curb is not a lane line, and the semantic value of the lane line will not be assigned to the curb.
[0340] 2. Explain the scenario of lane line missed detection.
[0341] (1) A scenario in which the main lane is located at the far right side of the road and the right lane marking of the main lane is not detected is described.
[0342] In this scenario, the left lane of the main lane can be obtained, and the right lane line of the left lane can be obtained; if the right lane line of the left lane is located on the left side of the vehicle, and the fourth distance between the right lane line of the left lane and the vehicle is less than the preset distance threshold, the semantic value of the right lane line of the left lane is assigned as main left.
[0343] The fourth distance may be the distance between the right lane line and the vehicle along the Y axis. If the fourth distance is less than a preset distance threshold, it indicates that the right lane line is the lane line of the lane where the vehicle is currently located, and therefore, its semantic value may be assigned as the main left.
[0344] When setting the specific value of the preset distance threshold, the distance between the vehicle and the left lane line when driving in different lanes can be obtained, and then the maximum distance can be obtained, and the above distance threshold is set according to the maximum distance. In some embodiments, the distance threshold can be 10 meters.
[0345] See attached Fig.16 , Fig.16 An example is shown of a road with three lanes, namely lanes 1, 2, and 3. The lane formed by lanes 2 and 3 is the main lane where the vehicle is currently located, and this main lane is located on the far right side of the road. If lane 3 is not detected, then the left lane of the main lane can be obtained, and the right lane line of the left lane (i.e. Fig.16 Lane line 2 in the figure), since the fourth distance between lane line 2 and the vehicle is less than the preset distance threshold, the semantic value of lane line 2 is assigned as main left.
[0346] (2) Describe the scenario where the main lane is located at the leftmost side of the road and the left lane marking of the main lane is not detected.
[0347] In this scenario, the right lane of the main lane can be obtained, and the left lane line of the right lane can be obtained; if the left lane line of the right lane is located on the right side of the vehicle, and the fifth distance between the left lane line of the right lane and the vehicle is less than the preset distance threshold, the semantic value of the left lane line of the right lane is assigned as main right.
[0348] The fifth distance may be the distance between the left lane line and the vehicle along the Y axis. If the fifth distance is less than a preset distance threshold, it indicates that the left lane line is the lane line of the lane where the vehicle is currently located, and therefore, its semantic value may be assigned as main right.
[0349] The following is combined with Fig.17 The embodiment of the lane semantic reasoning method provided in this application is described. Fig.17 As shown, in this embodiment, lane semantic reasoning can be performed through the following steps S201 to S205.
[0350] Step S201: Input the perceived lane lines.
[0351] In this embodiment, sensors and a perception model are provided on the vehicle. The perception model can perform lane line perception on the data frames collected by the sensors to obtain lane lines. Inputting the perceived lane lines can be understood as obtaining the lane lines obtained by the perception model. Among them, the sensors can include cameras, radars, etc., and the radars can include millimeter-wave radars, lidar, etc.
[0352] After obtaining the lane lines, the lane lines can be filtered and sorted. The filtering includes filtering long-distance and oncoming lane lines, as well as filtering intersection lane lines. Among them, filtering long-distance lane lines is to obtain the lane lines within the range of [-a, a] on the X-axis (i.e., the first region of interest). Filtering oncoming lane lines is to remove the lane lines of the oncoming lanes of the vehicle within the range of [-a, a]. Filtering intersection lane lines is to remove the lane lines on the left and right sides of the intersection and the guiding lines of the intersection within the range of [-a, a]. Lane line sorting is to sort the above-filtered lane lines in ascending order of the Y-axis coordinates in the vehicle body coordinate system to form a lane line sequence. In some embodiments, a can be 120 meters.
[0353] Step S202: Construct lane groups. When constructing lane groups, candidate lanes can be constructed within the range of [-b, c] on the X-axis (i.e., the second region of interest), where 0 < b < c < a. In some embodiments, b can be 10 meters and c can be 80 meters.
[0354] Specifically, candidate lanes are obtained within the range of [-b, c], and non-traversable channels are removed. Lane groups are obtained based on the remaining candidate lanes. In some embodiments, the depth-first search method can be used to process the candidate lanes to construct one or more lane groups.
[0355] Step S203: Obtain the optimal lane group.
[0356] Specifically, for each lane group, the geometric confidence, semantic confidence, distance confidence, and lane suppression confidence of the candidate lanes within the lane group can be obtained. The product of these confidences is used to obtain the first confidence of the candidate lanes, and then the sum of the first confidences of all the candidate lanes within the lane group is used to obtain the second confidence of the lane group. Then, the lane group with the largest second confidence is obtained as the optimal lane group.
[0357] Step S204: Lane semantic reasoning.
[0358] Specifically, the main lane where the vehicle is located is obtained based on the candidate lanes in the optimal lane group, and then the main lane is checked for correctness and stability in turn to determine the final main lane of the vehicle at the current moment. The semantics of each lane line in the optimal lane group is obtained based on the final main lane of the vehicle.
[0359] For the two special scenarios of the single-side lane line scenario and the lane line missed detection scenario, the relevant method in the aforementioned step S106 may be used to determine the semantics of the lane line.
[0360] Step S205: Output lane line semantics.
[0361] Specifically, after determining the semantics of the vehicle's main lane and lane line at the current moment, the vehicle's lane line semantics can be updated and published so that downstream links can use the lane line semantics to control the vehicle autonomously.
[0362] Based on the methods described in steps S201 to S205 above, the main lane where the vehicle is located and the semantics of the lane line can be accurately obtained.
[0363] It should be pointed out that although the various steps in the above embodiments are described in a specific order, those skilled in the art can understand that in order to achieve the effect of the present application, different steps do not have to be executed in such an order, and they can be executed simultaneously (in parallel) or in other orders. These adjusted schemes are equivalent to the technical schemes described in this application, and therefore will also fall within the scope of protection of this application.
[0364] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above-mentioned embodiment of the present application can also be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device, medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal and software distribution medium, etc. that can carry the computer program code.
[0365] Another aspect of the present application also provides a computer-readable storage medium.
[0366] In an embodiment of a computer-readable storage medium according to the present application, the computer-readable storage medium may be configured to store a program for executing the lane semantic reasoning method of the above method embodiment, and the program may be loaded and run by a processor to implement the above lane semantic reasoning method. For ease of explanation, only the parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiment of the present application. The computer-readable storage medium may be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiment of the present application is a non-temporary computer-readable storage medium.
[0367] Another aspect of the present application also provides a smart device.
[0368] In an embodiment of an intelligent device according to the present application, the intelligent device may include at least one processor; and a memory connected to the at least one processor in communication; wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method described in any of the above embodiments is implemented. The intelligent device described in the present application may include a driving device, a smart car, a robot, and the like. Fig.18 , Fig.18 FIG. 4 exemplarily shows that the memory 11 and the processor 12 are communicatively connected via a bus.
[0369] In some embodiments of the present application, the smart device may further include at least one sensor for sensing information. The sensor is communicatively connected to any type of processor mentioned in the present application. Optionally, the smart device may further include an autonomous driving system for guiding the smart device to drive itself or assist in driving. The processor communicates with the sensor and / or the autonomous driving system to complete the method described in any of the above embodiments.
[0370] So far, the technical solution of the present application has been described in conjunction with an embodiment shown in the accompanying drawings, but it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present application.
Claims
1. A lane semantic reasoning method, It is characterized in that The method comprises: Obtain candidate lanes based on the lane lines in the environment where the vehicle is currently located; Acquire a plurality of lane groups according to the candidate lanes, wherein the plurality of lane groups are sequentially arranged along an X-axis, and the lane group includes one or more candidate lanes sequentially arranged along a Y-axis, and the X-axis and the Y-axis are an X-axis and a Y-axis of a body coordinate system of the vehicle; For each lane group, obtaining a multi-dimensional confidence of a candidate lane in the lane group, and obtaining a first confidence of the candidate lane according to the multi-dimensional confidence; For each lane group, obtaining a second confidence of the lane group according to the first confidences of all candidate lanes in the lane group; Obtaining an optimal lane group according to the second confidence level of each lane group; Acquire a main lane where the vehicle is currently located according to the optimal lane group, and determine the semantics of each lane line in the optimal lane group according to the main lane; in, The multi-dimensional confidence includes: geometric confidence, semantic confidence, and distance confidence; The geometric confidence is the confidence of the geometric attributes of the candidate lane, the semantic confidence is the confidence that the candidate lane was the main lane at the previous moment, and the distance confidence is the confidence that the candidate lane is closest to the vehicle; The geometric confidence indicates the degree of confidence that the geometric attributes of the candidate lane are the geometric attributes of the lane, rather than the geometric attributes of other road areas; The first confidence level indicates the degree of credibility of the candidate lane as the main lane.
2. The method according to claim 1, It is characterized in that The geometric attributes include: lane line length, lane line direction, and lane width; The geometric confidence includes: length confidence, direction confidence, and width confidence; in, The length confidence is the confidence that the lengths of lane lines on both sides of the candidate lane are consistent; The direction confidence is the confidence that the directions of lane lines on both sides of the candidate lane are consistent; The width confidence is the confidence that the width of the candidate lane is consistent with the target width.
3. The method according to claim 2, It is characterized in that The method comprises obtaining the length confidence by: Obtaining the intersection-combination ratio of the lengths of the lane lines on both sides of the candidate lane; The length confidence is obtained according to the length intersection-to-union ratio.
4. The method according to claim 3, It is characterized in that The obtaining of the intersection-and-merge ratio of the lengths of lane lines on both sides of the candidate lane includes: Obtaining an overlapping area of the lane lines on both sides, and obtaining a first length of the overlapping area projected onto the X-axis; Respectively obtain the lengths of the lane lines on both sides projected onto the X-axis, and select a smaller one of the lengths of the lane lines on both sides as the second length; Obtaining a first length ratio of the first length to the second length; The length intersection-over-combination ratio is obtained according to the first length ratio.
5. The method according to claim 4, It is characterized in that The method further comprises: Obtaining a preset shortest length of a lane line, where the shortest length of a lane line is the shortest length of a lane line located behind the vehicle; Obtaining a third length according to the sum of the first length and the shortest length of the lane line; Obtaining a fourth length according to the sum of the second length and the shortest length of the lane line; Obtaining a second length ratio between the third length and the fourth length; The length intersection-over-combination ratio is obtained according to the second length ratio.
6. The method according to claim 2, It is characterized in that The method comprises obtaining the direction confidence by: Obtaining a first distance from a first shape point on a lane line in the candidate lane to another lane line, and using the first distance as a width of the first shape point; Obtain an average value of the widths of all first shape points, and obtain a difference between the width of each first shape point and the average value; The first shape point whose absolute value of the difference is less than the first difference threshold is used as the second shape point; Obtaining a ratio of the number of the second shape points to the number of the first shape points; The direction confidence is obtained according to the quantity ratio.
7. The method according to claim 6, It is characterized in that The obtaining the direction confidence according to the quantity ratio includes: Obtain a preset minimum value of direction confidence, where the minimum value is greater than or equal to 0.5; Obtaining a product of the quantity ratio and a preset weight, where the preset weight is greater than 0 and less than 1; The direction confidence is obtained according to the sum of the minimum value and the product.
8. The method according to claim 2, It is characterized in that The method comprises obtaining the width confidence by: Obtaining the starting width of the candidate lane; According to the starting width, obtaining the width confidence; The absolute value of the difference between the starting width and the target width is in a negatively correlated relationship with the width confidence.
9. The method according to claim 8, It is characterized in that The obtaining the width confidence according to the starting width includes: Acquire a first fitting function, where the first fitting function is used to represent the corresponding relationship between the starting width and the width confidence; The starting width is used as an input of the first fitting function, and a width confidence corresponding to the starting width is obtained through the first fitting function.
10. The method according to claim 1, It is characterized in that The method comprises obtaining the semantic confidence by: If the candidate lane is the main lane at the previous moment, the value of the semantic confidence is set to the first value; otherwise, the value of the semantic confidence is set to the second value; The first value is greater than the second value.
11. The method according to claim 1, It is characterized in that The method comprises obtaining the distance confidence by: Acquire a second distance between the starting position of the candidate lane and the vehicle; The distance confidence is acquired according to the second distance, and the distance confidence is in a negatively correlated corresponding relationship with the second distance.
12. The method according to claim 11, It is characterized in that The acquiring the distance confidence according to the second distance includes: Acquire a second fitting function, where the second fitting function is used to represent a corresponding relationship between the second distance and the distance confidence; The second distance is used as an input of the second fitting function, and a distance confidence corresponding to the second distance is obtained through the second fitting function.
13. The method according to claim 1, It is characterized in that The multi-dimensional confidence includes a lane suppression confidence, and the method includes obtaining the lane suppression confidence by: If the candidate lane is an abnormal bifurcated lane, the value of the lane suppression confidence is set to a third value; otherwise, the value of the lane suppression confidence is set to a fourth value; The third value is smaller than the fourth value.
14. The method according to claim 13, It is characterized in that The method includes determining whether the candidate lane is an abnormal bifurcated lane by: When one lane line of the candidate lane is a bifurcated lane line, obtaining a length difference between lane lines on both sides of the candidate lane, and obtaining a length of a bifurcated area on the candidate lane; If the length difference is greater than a first length threshold and the length of the bifurcated area is greater than a second length threshold, the candidate lane is an abnormal bifurcated lane.
15. The method according to any one of claims 1 to 14, It is characterized in that The step of obtaining a first confidence level of the candidate lane according to the multi-dimensional confidence level includes: Obtaining the product of the multi-dimensional confidences; According to the product, a first confidence level of the candidate lane is obtained.
16. The method according to claim 1, It is characterized in that The step of obtaining a second confidence level of the lane group according to the first confidence levels of all candidate lanes in the lane group includes: Obtaining the sum of first confidences of all candidate lanes in the lane group; A second confidence of the lane group is obtained according to the sum of the first confidences.
17. The method according to claim 1, It is characterized in that The obtaining the main lane where the vehicle is located at the current moment according to the optimal lane group includes: Obtaining a first position point of the center line of the candidate lane, wherein the first position point is a position point with the smallest X-axis coordinate in the vehicle body coordinate system; Obtaining the X-axis coordinate and the Y-axis coordinate of the first position point in the vehicle body coordinate system; Performing a weighted sum calculation on the absolute value of the X-axis coordinate and the absolute value of the Y-axis coordinate to obtain a third distance, and using the third distance as the weighted distance of the candidate lane; A candidate lane with the smallest weighted distance is selected as the main lane.
18. The method according to claim 17, It is characterized in that The method includes performing stability check on the main lane where the vehicle is currently located in the following manner: The main lane at the current moment and the main lane at the previous moment are respectively used as the first main lane and the second main lane; When the first main lane is different from the second main lane, and the second main lane is a left lane or a right lane of the first main lane, obtaining a weighted distance difference between the first main lane and the second main lane; If the difference is greater than a second difference threshold, taking the first main lane as the final main lane at the current moment; Otherwise, the second main lane is used as the final main lane at the current moment.
19. The method according to claim 1, It is characterized in that The method includes checking the correctness of the main lane where the vehicle is located at the current moment by: When the center line of the main lane is located on the left side of the vehicle, if the right lane line of the main lane is located on the right side of the vehicle, the main lane passes the verification; Otherwise, the main lane fails the verification, and a new main lane is obtained according to the right lane of the main lane; When the center line of the main lane is located on the right side of the vehicle, if the left lane line of the main lane is located on the left side of the vehicle, the main lane passes the verification; Otherwise, the main lane fails the verification, and a new main lane is acquired according to the left lane of the main lane.
20. The method according to claim 19, It is characterized in that The acquiring a new main lane according to the right lane of the main lane comprises: if the vehicle is located in the right lane, and lane lines on both sides of the right lane are located on the left and right sides of the vehicle respectively, taking the right lane as the new main lane; The acquiring a new main lane according to the left lane of the main lane includes: if the vehicle is located in the left lane, and lane lines on both sides of the left lane are located on the left and right sides of the vehicle respectively, then taking the left lane as the new main lane.
21. The method according to claim 1, It is characterized in that The determining the semantics of each lane line in the optimal lane group according to the main lane includes: When the main lane has only one lane line, if the vehicle is located on the left side of the lane line, the semantic value of the lane line is assigned as main right; if the vehicle is located on the right side of the lane line, the semantic value of the lane line is assigned as main left.
22. The method according to claim 1, It is characterized in that The determining the semantics of each lane line in the optimal lane group according to the main lane includes: When the main lane is located at the rightmost side of the road and the right lane line of the main lane is not detected, the left lane of the main lane is obtained, and the right lane line of the left lane is obtained; if the right lane line of the left lane is located at the left side of the vehicle, and the fourth distance between the right lane line of the left lane and the vehicle is less than a preset distance threshold, the semantic value of the right lane line of the left lane is assigned as main left; When the main lane is located at the leftmost side of the road and the left lane line of the main lane is not detected, the right lane of the main lane is obtained, and the left lane line of the right lane is obtained; if the left lane line of the right lane is located at the right side of the vehicle, and the fifth distance between the left lane line of the right lane and the vehicle is less than a preset distance threshold, the semantic value of the left lane line of the right lane is assigned as main right.
23. The method according to claim 1, It is characterized in that The method comprises obtaining lane lines in the environment where the vehicle is located by: Acquire a first candidate lane line in the environment where the vehicle is located, where the first candidate lane line is obtained by performing lane line sensing on a data frame collected by a sensor on the vehicle; Acquire a first candidate lane line located in a focus area as a second candidate lane line, wherein the focus area is in a range of [-a, a] on the X-axis, where a>0; Remove the second candidate lane line belonging to the target lane line, and use the remaining second candidate lane line as the valid lane line; Among them, the target lane lines include the lane lines of the opposite lane of the vehicle, the lane lines on the left and right sides of the intersection, and the guide lines of the intersection.
24. The method according to claim 1, It is characterized in that The step of obtaining a candidate lane according to a lane line in an environment where the vehicle is currently located includes: Sorting the lane lines according to the Y-axis coordinates of the lane lines in the vehicle body coordinate system in ascending order to form a lane line sequence; Acquire a first lane line and a second lane line, wherein the first lane line is any lane line in the lane line sequence, and the second lane line is one or more lane lines arranged after the first lane line in the lane line sequence; If the first lane line and the second lane line satisfy a preset lane constraint condition, obtaining a candidate lane according to the lane formed by the first lane line and the second lane line; in, The lane constraint conditions include: the length intersection-and-joint ratio between the first lane line and the second lane line is greater than a preset intersection-and-joint ratio threshold, the lane width formed by the first lane line and the second lane line is within a preset width range, and there are no other lane lines between the first lane line and the second lane line.
25. The method according to claim 24, It is characterized in that The lane width formed by the first lane line and the second lane line is within a preset width range, including: The lane width formed by the first lane line and adjacent lane lines is within a first width range, and the lane width formed by the first lane line and non-adjacent lane lines is within a second width range; The adjacent lane line is a second lane line adjacent to the first lane line, the non-adjacent lane line is a second lane line not adjacent to the first lane line, and the second width range is greater than the first width range.
26. The method according to claim 24, It is characterized in that The acquiring a candidate lane according to a lane formed by the first lane line and the second lane line includes: Using a lane formed by the first lane line and the second lane line as a lane to be inspected; Obtain a fifth distance from the shape point on the first lane line to the second lane line, and use the fifth distance as the width of the shape point; Determining whether the lane to be inspected is a passable passage according to the width of each point on the first lane line; If the lane to be inspected is a passable lane, the candidate lane is obtained according to the lane to be inspected.
27. The method according to claim 26, It is characterized in that The determining, based on the widths of the points on the first lane line, whether the lane to be inspected is a passable passage comprises: According to the width of each shape point, a width variation range is obtained, where the width variation range is a range in which the width of the shape point on the first lane line changes following the change of the shape point; Obtaining a length ratio between the width variation range and the first lane line, and obtaining widths of points at a starting position and an ending position on the first lane line; If the length ratio is greater than a preset ratio threshold and the widths of the points at the starting position and the ending position are both less than a preset width threshold, the lane to be inspected is an impassable lane; otherwise, the lane to be inspected is a drivable lane.
28. A smart device, It is characterized in that include: at least one processor; and, a memory communicatively coupled to the at least one processor; Wherein, a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the lane semantic reasoning method described in any one of claims 1 to 27 is implemented.
29. A computer-readable storage medium having a plurality of program codes stored therein, It is characterized in that The program code is suitable for being loaded and run by a processor to execute the lane semantics reasoning method according to any one of claims 1 to 27.
