Lane line aggregation method and device, and storage medium
Patent Information
- Application Number
- CN202311167695.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2043-09-11
AI Technical Summary
在成图过程中存在着部分区域存在与现实场景不一致的问题,例如折角、渐变、车道线不完整等;基于规则的成图逻辑无法适应全场景,维护成本高,可扩展性差
[0059] In implementing the technical solution of this invention, the present invention uses a training dataset to train a lane line vector data aggregation model, and then uses the trained lane line vector data aggregation model to predict the lane line vector data to be predicted, thereby obtaining the lane line aggregation result. Through the above configuration, since the training dataset contains both training data and supervised data, supervised training of the lane line vector data aggregation model can be achieved, effectively improving the accuracy of the lane line vector data aggregation result. This allows the lane line vector data aggregation model to be more adaptable to more complex and varied scenarios, effectively achieving data-driven, high-quality lane line aggregation mapping.
Smart Images

Figure CN117197764B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of autonomous driving technology, specifically providing a lane line aggregation method, apparatus, and storage medium. Background Technology
[0002] Current Level 3 and above autonomous driving technologies rely heavily on high-precision vector maps. High-precision vector maps play a very important role in various modules such as localization, perception, planning and control, and have become an indispensable part of current autonomous driving technology.
[0003] Map providers use map-collecting vehicles equipped with sensors such as LiDAR to gather environmental information. However, during the mapping process, some areas deviate from the real-world scene, exhibiting inconsistencies such as sharp angles, gradations, and incomplete lane lines. Rule-based mapping logic cannot adapt to all scenarios, resulting in high maintenance costs and poor scalability. Data-driven lane line aggregation mapping logic is more suitable for complex and ever-changing scenarios. Data-driven methods require high-quality supervised data, but currently, there are no publicly available datasets in the open-source datasets available.
[0004] Accordingly, there is a need in the field for a new lane line aggregation solution to address the aforementioned problems. Summary of the Invention
[0005] To overcome the aforementioned shortcomings, this invention is proposed to provide a solution, or at least a partial solution, to the problem of how to more effectively implement data-driven lane line aggregation mapping.
[0006] In a first aspect, the present invention provides a lane line aggregation method, the method comprising:
[0007] The pre-trained lane line vector data aggregation model is used to predict the lane line vector data to be predicted, and the lane line aggregation result is obtained.
[0008] The trained lane line vector data aggregation model is obtained by training a training dataset, which includes training data and supervision data.
[0009] In one embodiment of the lane line aggregation method described above, the method further includes constructing the training dataset according to the following steps:
[0010] The lane line vector data used for training is matched with the high-precision map lane line data within the map sheet where the lane line vector data is located, and a matching relationship between the lane line vector data and the high-precision map lane line data is established.
[0011] Based on the matching relationship, the lane line vector data and the high-precision map lane line data corresponding to the matching relationship are divided into blocks to obtain multiple lane line matching blocks;
[0012] A training dataset is constructed based on multiple lane line matching blocks; wherein the training dataset uses lane line vector data in the lane line matching blocks as training data and high-precision map lane line data in the lane line matching blocks as supervision data.
[0013] In one technical solution of the above lane line aggregation method, matching the lane line vector data used for training with the high-precision map lane line data within the map sheet where the lane line vector data is located includes:
[0014] Obtain the vertical distance between each sampling point in the lane line vector data and each lane line data of the high-precision map within the map sheet;
[0015] For each of the high-precision map lane line data, the vertical distances corresponding to all sampling points of the lane line vector data are weighted and calculated to obtain the average distance between the lane line vector data and the high-precision map lane line data.
[0016] When the average distance is less than a preset distance threshold, the lane line vector data is determined to match the high-precision map lane line data to establish a matching relationship between the lane line vector data and the high-precision map lane line data.
[0017] In one technical solution of the above lane line aggregation method, the step of dividing the lane line vector data corresponding to the matching relationship and the high-precision map lane line data into blocks to obtain multiple lane line matching blocks includes:
[0018] The map sheet is divided into multiple map sheet blocks;
[0019] Based on the coordinates of the lane line vector data and the high-precision map lane line data, the lane line vector data and the high-precision map lane line data corresponding to the matching relationship are segmented into corresponding map blocks, thereby obtaining multiple lane line matching blocks.
[0020] In one technical solution of the above lane line aggregation method, dividing the map sheet into multiple map sheet blocks includes:
[0021] The map sheet is divided into multiple map sheet blocks by using a first preset size as the step size;
[0022] The size of the map block is a second preset size, and the first preset size is smaller than the second preset size.
[0023] In one technical solution of the above lane line aggregation method, the method further includes:
[0024] Based on the high-precision map lane line data in the lane line matching block, obtain the lane line curvature of the high-precision map lane line data;
[0025] When the curvature of the lane line is greater than a preset curvature threshold, the high-precision map lane line data is marked as a curve;
[0026] When the lane line curvature is less than or equal to the curvature threshold, the high-precision map lane line data is marked as a straight line.
[0027] In one technical solution of the above lane line aggregation method, obtaining the lane line curvature of the high-precision map lane line data based on the high-precision map lane line data in the lane line matching block includes:
[0028] For each sampling point of the high-precision map lane line data, extend forward and backward a predetermined number of sampling points;
[0029] The curvature of the current sampling point is obtained by using the vector pointing from the current sampling point to the sampling points extending backward and the vector pointing from the sampling points extending forward to the current sampling point.
[0030] The lane line curvature of the high-precision map lane line data is obtained based on the curvature of all sampling points.
[0031] In one technical solution of the above lane line aggregation method, the step of constructing a training dataset based on multiple lane line matching blocks includes:
[0032] Based on the high-precision map lane line data in each lane line matching block, the lane line vector data in the lane line matching block is filtered;
[0033] The filtered lane line vector data from multiple lane line matching blocks are used as training data, and the corresponding high-precision map lane line data are used as supervision data to construct the training dataset.
[0034] In one technical solution of the above lane line aggregation method, the step of filtering the lane line vector data in the lane line matching block based on the high-precision map lane line data in each lane line matching block includes:
[0035] For each lane line matching block, high-precision map lane line data are connected into high-precision lane line instances based on geometric relationships;
[0036] Calculate the intersection-union ratio between the lane line vector data in the lane line matching block and the high-precision lane line instance;
[0037] Lane line vector data with an intersection-to-merge ratio less than a preset intersection-to-merge ratio threshold are filtered out.
[0038] In one technical solution of the above lane line aggregation method, the method further includes training the lane line vector data aggregation model according to the following steps:
[0039] The lane line vector data and high-precision map lane line data in each lane line matching block of the training dataset are subjected to data augmentation transformation.
[0040] The lane line vector data in the data-augmented lane line matching block and the high-precision map lane line data are used as model inputs to train the lane line vector data aggregation model.
[0041] In one technical solution of the above lane line aggregation method, the data augmentation transformation includes:
[0042] The lane line vector data and the high-precision map lane line data are rotated horizontally or vertically; or,
[0043] The lane line vector data and the high-precision map lane line data are randomly rotated around the coordinate origin.
[0044] In one embodiment of the lane line aggregation method described above, the method further includes evaluating the trained lane line vector data aggregation model according to the following steps:
[0045] A pre-trained lane vector data aggregation model is applied to predict the lane vector data used for evaluation, and a prediction result is obtained; wherein, the lane vector data aggregation model is obtained by training using any one of the model training methods described above.
[0046] Obtain the chamfer distance between the prediction result and the supervision data corresponding to the lane line vector data;
[0047] Based on the chamfer distance and multiple preset distance indicators, the evaluation results of the lane line vector data aggregation model are obtained.
[0048] In one technical solution of the above lane line aggregation method, obtaining the evaluation result of the lane line vector data aggregation model based on the chamfer distance and multiple preset distance indicators includes:
[0049] For each distance indicator, obtain the PR curve of the prediction result corresponding to the distance indicator;
[0050] Based on the PR curve and the chamfer distance, the average accuracy corresponding to the distance index is obtained;
[0051] The evaluation results are obtained based on the average accuracy of multiple distance metrics.
[0052] In one technical solution of the aforementioned lane line aggregation method,
[0053] The step of obtaining the chamfer distance between the prediction result and the supervision data corresponding to the lane line vector data includes obtaining the chamfer distance according to the following formula:
[0054]
[0055] Where S1 is the prediction result, S2 is the supervision data, and D chamfer (S1,S2) represents the chamfer distance; p represents the sampling point in the prediction result, and q represents the sampling point in the supervision data.
[0056] In a second aspect, a control device is provided, comprising at least one processor and at least one storage device, the storage device being adapted to store a plurality of program codes, the program codes being adapted to be loaded and run by the processor to perform the lane line aggregation method described in any of the above-described technical solutions.
[0057] In a third aspect, a computer-readable storage medium is provided, wherein a plurality of program codes are stored therein, the program codes being adapted to be loaded and run by a processor to perform the lane line aggregation method described in any of the above-described technical solutions.
[0058] The above-described technical solutions of the present invention have at least one or more of the following beneficial effects:
[0059] In implementing the technical solution of this invention, the present invention uses a training dataset to train a lane line vector data aggregation model, and then uses the trained lane line vector data aggregation model to predict the lane line vector data to be predicted, thereby obtaining the lane line aggregation result. Through the above configuration, since the training dataset contains both training data and supervised data, supervised training of the lane line vector data aggregation model can be achieved, effectively improving the accuracy of the lane line vector data aggregation result. This allows the lane line vector data aggregation model to be more adaptable to more complex and varied scenarios, effectively achieving data-driven, high-quality lane line aggregation mapping.
[0060] Solution 1. A lane line aggregation method, characterized in that the method includes:
[0061] The pre-trained lane line vector data aggregation model is used to predict the lane line vector data to be predicted, and the lane line aggregation result is obtained.
[0062] The trained lane line vector data aggregation model is obtained by training a training dataset, which includes training data and supervision data.
[0063] Solution 2. The lane line aggregation method according to Solution 1, characterized in that the method further includes constructing the training dataset according to the following steps:
[0064] The lane line vector data used for training is matched with the high-precision map lane line data within the map sheet where the lane line vector data is located, and a matching relationship between the lane line vector data and the high-precision map lane line data is established.
[0065] Based on the matching relationship, the lane line vector data and the high-precision map lane line data corresponding to the matching relationship are divided into blocks to obtain multiple lane line matching blocks;
[0066] A training dataset is constructed based on multiple lane line matching blocks; wherein the training dataset uses lane line vector data in the lane line matching blocks as training data and high-precision map lane line data in the lane line matching blocks as supervision data.
[0067] Solution 3. The lane line aggregation method according to Solution 2, characterized in that,
[0068] The step of matching the lane line vector data used for training with the high-precision map lane line data within the map sheet where the lane line vector data is located includes:
[0069] Obtain the vertical distance between each sampling point in the lane line vector data and each lane line data of the high-precision map within the map sheet;
[0070] For each of the high-precision map lane line data, the vertical distances corresponding to all sampling points of the lane line vector data are weighted and calculated to obtain the average distance between the lane line vector data and the high-precision map lane line data.
[0071] When the average distance is less than a preset distance threshold, the lane line vector data is determined to match the high-precision map lane line data to establish a matching relationship between the lane line vector data and the high-precision map lane line data.
[0072] Option 4. The lane line aggregation method according to Option 2, characterized in that,
[0073] The step of dividing the lane line vector data and the high-precision map lane line data corresponding to the matching relationship into blocks to obtain multiple lane line matching blocks includes:
[0074] The map sheet is divided into multiple map sheet blocks;
[0075] Based on the coordinates of the lane line vector data and the high-precision map lane line data, the lane line vector data and the high-precision map lane line data corresponding to the matching relationship are segmented into corresponding map blocks, thereby obtaining multiple lane line matching blocks.
[0076] Option 5. The lane line aggregation method according to Option 4, characterized in that,
[0077] The process of dividing the map sheet into multiple map sheet blocks includes:
[0078] The map sheet is divided into multiple map sheet blocks by using a first preset size as the step size;
[0079] The size of the map block is a second preset size, and the first preset size is smaller than the second preset size.
[0080] Solution 6. The lane line aggregation method according to Solution 4, characterized in that the method further includes:
[0081] Based on the high-precision map lane line data in the lane line matching block, obtain the lane line curvature of the high-precision map lane line data;
[0082] When the curvature of the lane line is greater than a preset curvature threshold, the high-precision map lane line data is marked as a curve;
[0083] When the lane line curvature is less than or equal to the curvature threshold, the high-precision map lane line data is marked as a straight line.
[0084] Solution 7. The lane line aggregation method according to Solution 6, characterized in that,
[0085] The step of obtaining the lane line curvature of the high-precision map lane line data based on the high-precision map lane line data in the lane line matching block includes:
[0086] For each sampling point of the high-precision map lane line data, extend forward and backward a predetermined number of sampling points;
[0087] The curvature of the current sampling point is obtained by using the vector pointing from the current sampling point to the sampling points extending backward and the vector pointing from the sampling points extending forward to the current sampling point.
[0088] The lane line curvature of the high-precision map lane line data is obtained based on the curvature of all sampling points.
[0089] Solution 8. The lane line aggregation method according to Solution 2, characterized in that,
[0090] The construction of the training dataset based on multiple lane line matching blocks includes:
[0091] Based on the high-precision map lane line data in each lane line matching block, the lane line vector data in the lane line matching block is filtered;
[0092] The filtered lane line vector data from multiple lane line matching blocks are used as training data, and the corresponding high-precision map lane line data are used as supervision data to construct the training dataset.
[0093] Solution 9. The lane line aggregation method according to Solution 8, characterized in that,
[0094] The step of filtering the lane line vector data in each lane line matching block based on the high-precision map lane line data in each lane line matching block includes:
[0095] For each lane line matching block, high-precision map lane line data are connected into high-precision lane line instances based on geometric relationships;
[0096] Calculate the intersection-union ratio between the lane line vector data in the lane line matching block and the high-precision lane line instance;
[0097] Lane line vector data with an intersection-to-merge ratio less than a preset intersection-to-merge ratio threshold are filtered out.
[0098] Solution 10. The lane line aggregation method according to Solution 2, characterized in that the method further includes training the lane line vector data aggregation model according to the following steps:
[0099] The lane line vector data and high-precision map lane line data in each lane line matching block of the training dataset are subjected to data augmentation transformation.
[0100] The lane line vector data in the data-augmented lane line matching block and the high-precision map lane line data are used as model inputs to train the lane line vector data aggregation model.
[0101] Solution 11. The lane line aggregation method according to Solution 10, characterized in that,
[0102] The data augmentation transformation includes:
[0103] The lane line vector data and the high-precision map lane line data are rotated horizontally or vertically; or,
[0104] The lane line vector data and the high-precision map lane line data are randomly rotated around the coordinate origin.
[0105] Solution 12. The lane line aggregation method according to Solution 1, characterized in that the method further includes evaluating the trained lane line vector data aggregation model according to the following steps:
[0106] The trained lane line vector data aggregation model is applied to predict the lane line vector data used for evaluation, and the prediction results are obtained.
[0107] Obtain the chamfer distance between the prediction result and the supervision data corresponding to the lane line vector data;
[0108] Based on the chamfer distance and multiple preset distance indicators, the evaluation results of the lane line vector data aggregation model are obtained.
[0109] Option 13. The lane line aggregation method according to Option 12, characterized in that,
[0110] The evaluation result of the lane line vector data aggregation model, based on the chamfer distance and multiple preset distance indicators, includes:
[0111] For each distance indicator, obtain the PR curve of the prediction result corresponding to the distance indicator;
[0112] Based on the PR curve and the chamfer distance, the average accuracy corresponding to the distance index is obtained;
[0113] The evaluation results are obtained based on the average accuracy of multiple distance metrics.
[0114] Option 14. The lane line aggregation method according to Option 12, characterized in that,
[0115] The step of obtaining the chamfer distance between the prediction result and the supervision data corresponding to the lane line vector data includes obtaining the chamfer distance according to the following formula:
[0116]
[0117] Where S1 is the prediction result, S2 is the supervision data, and D chanfer (S1,S2) represents the chamfer distance; p represents the sampling point in the prediction result, and q represents the sampling point in the supervision data.
[0118] Scheme 15. A control device comprising at least one processor and at least one storage device, the storage device being adapted to store a plurality of program codes, characterized in that the program codes are adapted to be loaded and run by the processor to perform the lane line aggregation method as described in any one of Schemes 1 to 14.
[0119] Scheme 16. A computer-readable storage medium storing a plurality of program codes, characterized in that the program codes are adapted to be loaded and run by a processor to perform the lane line aggregation method according to any one of Schemes 1 to 14. Attached Figure Description
[0120] The disclosure of this invention will become more readily understood with reference to the accompanying drawings. It will be readily understood by those skilled in the art that these drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention. Wherein:
[0121] Figure 1 This is a schematic flowchart of the main steps of a lane line aggregation method according to an embodiment of the present invention;
[0122] Figure 2 This is a schematic diagram of the main steps in constructing a training dataset according to one embodiment of the present invention;
[0123] Figure 3 This is a schematic diagram of the main steps for evaluating the trained lane line vector data aggregation model according to one embodiment of the present invention.
[0124] Figure 4 This is a schematic diagram of the main steps of a dataset construction, model training, and model evaluation method according to one embodiment of the present invention.
[0125] Figure 5 This is a schematic diagram of a method for obtaining the average distance between lane line vector data and high-precision map lane line data according to an embodiment of the present invention.
[0126] Figure 6 This is a comparative schematic diagram of a non-sliding window and a sliding window method for dividing map sheet according to an embodiment of the present invention;
[0127] Figure 7 This is a schematic diagram of a method for obtaining lane curvature according to an embodiment of the present invention.
[0128] Figure 8 This is a schematic diagram illustrating a method for connecting high-precision map lane line data into high-precision lane lines according to an embodiment of the present invention.
[0129] Figure 9 This is a schematic diagram of a method for filtering lane line vector data according to an embodiment of the present invention.
[0130] Figure 10 This is a schematic diagram of a method for horizontally and vertically rotating lane line vector data and high-precision map lane line data according to an embodiment of the present invention.
[0131] Figure 11 This is a schematic diagram of the main steps in evaluating the trained lane line vector data aggregation model according to one embodiment of the present invention. Detailed Implementation
[0132] Some embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0133] In the description of this invention, "module" and "processor" can include hardware, software, or a combination of both. A module can include hardware circuitry, various suitable sensors, communication ports, memory, and may also include software components, such as program code, or a combination of software and hardware. A processor can be a central processing unit, microprocessor, image processor, digital signal processor, or any other suitable processor. The processor has data and / or signal processing capabilities. The processor can be implemented in software, in hardware, or a combination of both. Non-transitory computer-readable storage media includes any suitable medium capable of storing program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random access memory, etc. The term "A and / or B" means all possible combinations of A and B, such as only A, only B, or A and B. The terms "at least one A or B" or "at least one of A and B" have a similar meaning to "A and / or B" and can include only A, only B, or A and B. The singular terms "a" or "this" can also include plural forms.
[0134] See appendix Figure 1 , Figure 1 This is a schematic flowchart illustrating the main steps of a lane line aggregation method according to an embodiment of the present invention. Figure 1 As shown, the lane line aggregation method in this embodiment of the invention mainly includes the following steps S401:
[0135] The pre-trained lane line vector data aggregation model is used to predict the lane line vector data to be predicted, and the lane line aggregation result is obtained.
[0136] The trained lane line vector data aggregation model is obtained by training a training dataset, which includes training data and supervised data.
[0137] Based on step S401 above, this embodiment of the invention trains the lane line vector data aggregation model using a training dataset, and then uses the trained model to predict the lane line vector data to be predicted, obtaining the lane line aggregation result. Through this configuration, in this embodiment of the invention, since the training dataset contains both training and supervised data, supervised training of the lane line vector data aggregation model can be achieved, effectively improving the accuracy of the lane line vector data aggregation result. This allows the lane line vector data aggregation model to be more adaptable to more complex and varied scenarios, effectively achieving data-driven, high-quality lane line aggregation mapping.
[0138] In one embodiment of the present invention, a training dataset can be constructed according to the following steps S101-S103:
[0139] Step S101: Match the lane line vector data used for training with the high-precision map lane line data within the map sheet where the lane line vector data is located, and establish the matching relationship between the lane line vector data and the high-precision map lane line data.
[0140] In this embodiment, the lane line vector data used for training can be matched with high-precision map lane line data to establish a matching relationship between lane line instance data and high-precision map lane line data. Here, lane line vector data refers to the data used in the original mapping that describes the shape, size, position, and direction of lane lines.
[0141] In one implementation, the original mapping data used for training can be filtered to remove map elements that are not lane lines, thereby obtaining lane line vector data for training.
[0142] Step S102: Based on the matching relationship, the lane line vector data and high-precision map lane line data corresponding to the matching relationship are divided into blocks to obtain multiple lane line matching blocks.
[0143] In this embodiment, the lane line vector data and high-precision map lane line data that have established matching relationships can be processed into blocks to obtain multiple lane line matching blocks.
[0144] In one implementation, a sliding window step size can be set to obtain multiple lane line matching blocks by sliding the window.
[0145] Step S103: Construct a training dataset based on multiple lane line matching blocks; wherein, the training dataset uses lane line vector data in the lane line matching blocks as training data and high-precision map lane line data in the lane line matching blocks as supervision data.
[0146] In this embodiment, the high-precision map lane line data in each lane line matching block can be used as supervision data, and the corresponding lane line vector data can be used as training data to construct a training dataset.
[0147] Based on steps S101-S103 above, the lane line data used for training is matched with the high-precision map lane line data within the corresponding map area. The matched lane line vector data and the high-precision map lane line data are then divided into blocks to obtain multiple lane line matching blocks. A training dataset is constructed based on these multiple lane line matching blocks. Through this configuration, the lane line vector data in each lane line matching block can use the high-precision map lane line data as supervision data, thus providing effective ground truth supervision for the training data when using the training dataset for model training. Simultaneously, dividing the matched lane line vector data and the high-precision map lane line data into blocks effectively solves the problem that excessively large map areas are detrimental to model learning. Furthermore, using the constructed training dataset to train the lane line vector data aggregation model can effectively improve the performance of the lane line vector data aggregation model, making it more adaptable to more complex and varied scenarios, thereby effectively achieving high-quality aggregation of lane vector data into maps.
[0148] Steps S101 to S103 will be further explained below.
[0149] In one embodiment, step S101 may include steps S1011 to S1013:
[0150] Step S1011: Obtain the vertical distance between each sampling point in the lane line vector data and each high-precision map lane line data within the map sheet.
[0151] In this embodiment, multiple sampling points can be determined on the lane line vector data, and for each sampling point, the vertical distance between it and each high-precision map lane line data within the map sheet can be determined.
[0152] Step S1012: For each high-precision map lane line data, the vertical distances corresponding to all sampling points of the lane line vector data are weighted and calculated to obtain the average distance between the lane line vector data and the high-precision map lane line data.
[0153] In this embodiment, for each high-precision map lane line data, the vertical distances corresponding to all sampling points of the corresponding lane line vector data can be weighted and calculated to obtain the average distance between the lane line vector data and the high-precision map lane line data.
[0154] Step S1013: When the average distance is less than a preset distance threshold, determine the matching between the lane line vector data and the high-precision map lane line data to establish a matching relationship between the lane line vector data and the high-precision map lane line data.
[0155] In this embodiment, when the average distance is less than a preset distance threshold, it can be considered that the lane line vector data is associated with the high-precision map lane line data. A matching relationship can then be established between the lane line vector data and the high-precision map lane line data, and the unmatched lane line vector data can be deleted.
[0156] In one implementation, see Appendix Figure 5 , Figure 5 This is a schematic diagram illustrating a method for obtaining the average distance between lane line vector data and high-precision map lane line data according to an embodiment of the present invention. Figure 5 As shown, the overlapping area between lane line vector data (original mapping data lane lines) and high-precision map lane line data can be obtained. The vertical distance from each sampling point of the lane line vector data within the overlapping area to the high-precision map lane line data is calculated, and then the average distance between the lane line vector data and the high-precision map lane line data is obtained by summing the data and averaging the distances. See formula (1) for details:
[0157]
[0158] Where d is the average distance. This is a three-dimensional vector between sampling points of lane line data in a high-precision map. N is a three-dimensional vector from the starting point of the lane line data in the high-precision map to the starting point of the lane line vector data, where N is the total number of sampling points.
[0159] In one embodiment of the present invention, step S102 may further include steps S1021 to S1022:
[0160] Step S1021: Divide the map sheet into multiple map sheet blocks.
[0161] In this embodiment, step S1021 can be further configured as follows:
[0162] The map sheet is divided into multiple map sheet blocks using the first preset size as the step size; the size of each map sheet block is the second preset size, and the first preset size is smaller than the second preset size.
[0163] In this embodiment, the map sheet can be divided using a sliding window enhancement method to increase the number of obtained map sheet patches.
[0164] Step S1022: Based on the coordinates of the lane line vector data and the high-precision map lane line data corresponding to the matching relationship, the lane line vector data and the high-precision map lane line data are divided into corresponding map sheets to obtain multiple lane line matching blocks.
[0165] In this embodiment, the lane line vector data and the high-precision map lane line data can be divided into corresponding map sheets based on their coordinates, thus obtaining multiple lane line matching blocks.
[0166] Please refer to the appendix. Figure 6 , Figure 6 This is a comparative schematic diagram illustrating a method for dividing map areas using a non-sliding window and a sliding window method, according to an embodiment of the present invention. Figure 6 As shown, the left side represents the non-sliding window method for dividing map sheets, while the right side represents the sliding window method for enhancing map sheet division. Figure 6 As can be seen, the sliding window enhancement method can obtain more map patches.
[0167] When dividing a map sheet, it can be divided into patches according to patch_size. Each patch is represented by two coordinate points: the bottom left corner (start) and the top right corner (end). stride_x and stride_y represent the translation amount (step size) of each sliding window along the x or y axis, respectively, and patch_x and patch_y represent the size of the patch in the x and y directions, respectively. Figure 6 The image on the right shows the sliding window enhancement performed with stride=patch_size. After patch division, the lane line vector data and high-precision map lane line data are divided into corresponding patches, thus obtaining multiple lane line matching blocks.
[0168] Specifically, each patch can be represented by the following formula (2):
[0169]
[0170] Where x_start_i is the x-coordinate of the starting point of the i-th patch, y_start_i is the y-coordinate of the starting point of the i-th patch, x_end_i is the x-coordinate of the ending point of the i-th patch, and y_end_i is the y-coordinate of the ending point of the i-th patch.
[0171] In one implementation, lane line curvature can be obtained based on high-precision map lane line data to indicate whether the high-precision map lane line data is a straight line or a curve. Specifically: based on the high-precision map lane line data in the lane line matching block, the lane line curvature of the high-precision map lane line data is obtained; when the lane line curvature is greater than a preset curvature threshold, the high-precision map lane line data is marked as a curve; when the lane line curvature is less than or equal to the curvature threshold, the high-precision map lane line data is marked as a straight line.
[0172] In one implementation, the lane curvature of high-precision map lane line data can be obtained by: for each sampling point of the high-precision map lane line data, extending forward and backward by a predetermined number of sampling points; obtaining the curvature of the current sampling point based on the vector pointing from the current sampling point to the backward-extended sampling points and the vector pointing from the forward-extended sampling points to the current sampling point; and obtaining the lane curvature of the high-precision map lane line data based on the curvature of all sampling points.
[0173] In this embodiment, please refer to the appendix. Figure 7 , Figure 7 This is a schematic diagram of a method for obtaining lane curvature according to one embodiment of the present invention. Figure 7 As shown, for each sampling point on the high-precision map lane line data, 5-10 sampling points can be extended forward and backward. The curvature of the current sampling point (defined as the rate of change of angle per unit length) is calculated by vector dot product. Based on the curvature of all sampling points, the lane line curvature of the high-precision map lane line data is obtained, as shown in formula (3).
[0174]
[0175] Where acos(*) is the inverse cosine function, and dot is the dot product function. This is the vector pointing from the current sampling point to the sampling points extending backward. The vector pointing from the forward-extending sampling points to the current sampling point.
[0176] In one embodiment, step S103 may further include the following steps S1031 and S1032:
[0177] Step S1031: Filter the lane line vector data in each lane line matching block based on the high-precision map lane line data in each lane line matching block.
[0178] In this embodiment, step S1031 may further include steps S10311 to S10313:
[0179] Step S10311: For each lane line matching block, connect the high-precision map lane line data into a high-precision lane line instance according to the geometric relationship.
[0180] In this embodiment, high-precision map lane line data in the lane line matching block can be connected into high-precision lane line instances based on the geometric relationships between them. A high-precision lane line instance refers to data obtained by connecting high-precision map lane line data with indexed relationships. The geometric relationship can be the predecessor-successor relationship of the high-precision map lane line data, through which the indexing relationship of the high-precision map lane line data can be obtained.
[0181] Please refer to the appendix. Figure 8 , Figure 8 This is a schematic diagram illustrating a method for connecting high-precision map lane line data into high-precision lane lines according to an embodiment of the present invention. Figure 8 As shown, in the patch, lane line 1 and lane line 2 are both high-precision map lane line data and have an index relationship. Lane line 1 and lane line 2 can be connected to form a combination, which is a high-precision lane line instance.
[0182] Step S10312: Calculate the intersection-union ratio between the lane line vector data in the lane line matching block and the high-precision lane line instance.
[0183] Step S10313: Filter out lane line vector data with an intersection-to-merge ratio less than a preset intersection-to-merge ratio threshold.
[0184] In this embodiment, the intersection-over-union ratio (IoU) between lane line vector data and high-precision lane line instances in the lane line matching block can be calculated. If the IoU is less than the IoU threshold, the lane line vector data is filtered out; if the IoU is greater than or equal to the IoU threshold, the lane line vector data is retained.
[0185] Please refer to the appendix. Figure 9 , Figure 9 This is a schematic diagram of a method for filtering lane line vector data according to an embodiment of the present invention. Figure 9 As shown, the overlap (i.e., intersection) and union between the lane lines in the original mapping data (lane line vector data) and the lane lines in the high-precision map (high-precision lane line instances) in the lane line matching block can be calculated to obtain the crossover-union ratio (CUI). If the CUI is very small (less than the CUI threshold), it indicates that there is noise in the matching relationship, which will affect the model learning. In this case, matching pairs with small CUIs can be filtered out to further remove noisy data.
[0186] Step S1032: Use the filtered lane line vector data from multiple lane line matching blocks as training data and the corresponding high-precision map lane line data as supervision data to construct a training dataset.
[0187] In this embodiment, the filtered lane line vector data can be used as training data, and the high-precision map lane line data can be used as supervision data to construct a training dataset.
[0188] In one implementation, the lane line vector data aggregation model can be trained according to the following steps S201 and S202:
[0189] Step S201: Perform data augmentation transformation on the lane line vector data and high-precision map lane line data in each lane line matching block of the training dataset.
[0190] In this embodiment, in order to enable the lane line vector data aggregation model to achieve good generalization, each lane line matching block is used as one input data of the model, and data augmentation can be performed on the input data of the model.
[0191] In one implementation, data augmentation can be performed by horizontally or vertically rotating the lane line vector data and the high-precision map lane line data. See the appendix for details. Figure 10 , Figure 10 This is a schematic diagram illustrating a method for horizontally and vertically rotating lane line vector data and high-precision map lane line data according to an embodiment of the present invention. Figure 10 As shown, the lane line vector data and high-precision map lane line data in the patch (lane line matching block) can be randomly rotated horizontally or vertically within the xy-plane coordinate system with the lower left corner as the origin. This essentially flips the elements within the patch along the rotation axis.
[0192] The coordinates of each point after horizontal rotation are shown in formula (4):
[0193]
[0194] Where patch_size_y is the size of the lane line matching block in the y direction, element_x, element_y, and element_z are the coordinates of the element before horizontal flipping, and element_flip_horizontal_x, element_flip_horizontal_y, and element_flip_horizontal_z are the coordinates of the element after horizontal flipping.
[0195] The coordinates of each point after vertical flipping are shown in formula (5):
[0196]
[0197] Where patch_size_x is the size of the lane line matching block in the x direction, and element_flip_vertical_x, element_flip_vertical_y, and element_flip_vertical_z are the coordinates of the element after vertical flipping.
[0198] In one implementation, data augmentation is performed by randomly rotating the lane line vector data and the high-precision map lane line data. Specifically, the map is rotated by an angle θ around the lower left corner of the matching block, bypassing the origin and pointing in the positive z-axis direction, as shown in the following formula (6):
[0199]
[0200] Where element_rotated_x, element_rotated_y, and element_rotated_z are the coordinates of the element after random rotation.
[0201] Step S202: Use the lane line vector data in the lane line matching block after data augmentation transformation and the lane line data of the high-precision map as model input to train the lane line vector data aggregation model.
[0202] In this embodiment, lane line vector data after data augmentation transformation and lane line data from high-precision maps can be used as model inputs to train the lane line vector data aggregation model.
[0203] In one implementation, the trained lane vector data aggregation model can be evaluated according to the following steps S301 to S303:
[0204] Step S301: Apply the trained lane line vector data aggregation model to predict the lane line vector data used for evaluation and obtain the prediction result; wherein, the lane line vector data aggregation model is trained by the model training method in the above model training method embodiment.
[0205] In this embodiment, a trained lane line instance data aggregation model can be applied to predict lane line vector data and obtain the prediction result, i.e., the aggregation result of lane line vector data.
[0206] Step S302: Obtain the chamfer distance between the prediction result and the supervision data corresponding to the lane line vector data.
[0207] In this embodiment, the prediction result can be compared with the corresponding supervision data to obtain the chamfer distance between the prediction result and the supervision data. The supervision data can be high-precision map lane line data.
[0208] In one implementation, the chamfer distance can be obtained according to the following formula (7):
[0209]
[0210] Where S1 is the prediction result, S2 is the supervision data, and D chamfer (S1,S2) represents the chamfer distance; p represents the sampling point in the prediction result, and q represents the sampling point in the supervision data.
[0211] Step S303: Based on the chamfer distance and multiple preset distance indicators, obtain the evaluation results of the lane line vector data aggregation model.
[0212] In this embodiment, step S303 may further include steps S3031 to S3033:
[0213] Step S3031: For each distance indicator, obtain the PR curve of the prediction result corresponding to the distance indicator.
[0214] Step S3032: Obtain the average accuracy corresponding to the distance index based on the PR curve and chamfer distance.
[0215] Step S3033: Obtain the evaluation results based on the average accuracy of multiple distance indicators.
[0216] In this implementation, multiple distance metrics can be set, such as three (0.5 meters, 1.0 meter, and 1.5 meters). For each distance metric, the model inference is considered correct when the chamfer distance is less than that metric. The average precision (AP) is calculated for each distance metric. The calculation process involves calculating recall and precision based on the model's prediction results and supervision data using the chamfer distance, thereby plotting a precision-recall (PR) curve (e.g., taking 101 points from 0 to 1 for recall, plotting recall as the x-axis and precision as the y-axis). The area under the PR curve is the average precision (AP). The evaluation result is obtained based on the average precision of multiple distance metrics.
[0217] For example, if the distance indicators are 0.5 meters, 1.0 meters, and 1.5 meters, then the evaluation results can be obtained according to the following formula (8):
[0218]
[0219] Where mAP represents the evaluation result.
[0220] In one implementation, see Appendix Figure 11 , Figure 11 This is a schematic flowchart illustrating the main steps of evaluating the trained lane line vector data aggregation model according to one embodiment of the present invention. Figure 11 As shown, the chamfer distance can be calculated based on the predicted elements (prediction results) and HD elements (high-precision map lane data). The recall and precision can be obtained based on the chamfer distance, and the PR curve can be obtained based on the recall and precision, thus obtaining the evaluation result.
[0221] In one implementation, see Appendix Figure 4 , Figure 4 This is a schematic flowchart illustrating the main steps of a dataset construction, model training, and model evaluation method according to one embodiment of the present invention. Figure 4 As shown, the original mapping data (lane vector data used for training) and HD (high-precision map lane line data) can be preprocessed. Preprocessing includes filtering categories (removing non-lane line elements), calculating associations (establishing matching relationships between lane vector data and high-precision map lane line data), and removing elements with failed associations. After preprocessing, patches (lane line matching blocks) are segmented. Patch segmentation includes dividing the patch, sliding window data augmentation, and lane line curvature recognition. After patch segmentation, post-processing (patches) is performed. Post-processing includes connecting adjacent HDs (forming high-precision lane line instances); calculating the line IOU (Intersection over Union ratio) between lane vector data in the lane line matching block and high-precision lane line instances; and filtering map elements (removing lane vector data with an IOU lower than a preset threshold). The post-processed data allows the lane vector data within each patch to be used as training data, and the HDs to be used as supervised data to construct a training dataset. In the pre- and post-processing stages of the model, the training dataset can be rotated and flipped to achieve data augmentation before being input into the model for training. Based on the training results, evaluation methods are applied to evaluate the model.
[0222] It should be noted that although the steps in the above embodiments are described in a specific order, those skilled in the art will understand that in order to achieve the effects of the present invention, different steps do not necessarily have to be executed in such an order. They can be executed simultaneously (in parallel) or in other orders, and these variations are all within the scope of protection of the present invention.
[0223] Those skilled in the art will understand that all or part of the processes in the method of the above embodiment of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable storage medium can include any entity or device capable of carrying the computer program code, a medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.
[0224] Furthermore, the present invention also provides a control device. In one embodiment of the control device according to the present invention, the control device includes a processor and a storage device. The storage device can be configured to store a program for executing the lane line aggregation method of the above-described method embodiments, and the processor can be configured to execute the program in the storage device. The program includes, but is not limited to, a program for executing the lane line aggregation method of the above-described method embodiments. For ease of explanation, only the parts related to the embodiments of the present invention are shown; for specific technical details not disclosed, please refer to the method section of the embodiments of the present invention. This control device can be a control device device comprising various electronic devices.
[0225] In embodiments of the present invention, the control device may be a control device device comprising various electronic devices. In some possible implementations, the control device may include multiple storage devices and multiple processors. The program executing the lane aggregation method of the above method embodiments can be divided into multiple subroutines, each subroutine can be loaded and run by a processor to execute different steps of the lane aggregation method of the above method embodiments. Specifically, each subroutine can be stored in different storage devices, and each processor can be configured to execute programs in one or more storage devices to jointly implement the lane aggregation method of the above method embodiments, that is, each processor executes different steps of the lane aggregation method of the above method embodiments to jointly implement the lane aggregation method of the above method embodiments.
[0226] The aforementioned multiple processors can be processors deployed on the same device. For example, the aforementioned control device can be a high-performance device composed of multiple processors, and the aforementioned multiple processors can be processors configured on that high-performance device. Alternatively, the aforementioned multiple processors can also be processors deployed on different devices. For example, the aforementioned control device can be a server cluster, and the aforementioned multiple processors can be processors on different servers within the server cluster.
[0227] Furthermore, the present invention also provides a computer-readable storage medium. In one embodiment of the computer-readable storage medium according to the present invention, the computer-readable storage medium can be configured to store a program that performs the lane line aggregation method of the above-described method embodiments. This program can be loaded and run by a processor to implement the lane line aggregation method described above. For ease of explanation, only the parts related to the embodiments of the present invention are shown; for specific technical details not disclosed, please refer to the method section of the embodiments of the present invention. The computer-readable storage medium can be a storage device device comprising various electronic devices. Optionally, in the embodiments of the present invention, the computer-readable storage medium is a non-transitory computer-readable storage medium.
[0228] Furthermore, it should be understood that since the various modules are only provided to illustrate the functional units of the device of the present invention, the physical devices corresponding to these modules may be the processor itself, or a part of the processor's software, hardware, or a combination of software and hardware. Therefore, the number of modules shown in the figures is merely illustrative.
[0229] Those skilled in the art will understand that the various modules in the device can be adaptively split or combined. Such splitting or combining of specific modules will not cause the technical solution to deviate from the principles of the present invention; therefore, the technical solutions after splitting or combining will fall within the protection scope of the present invention.
[0230] The relevant user personal information that may be involved in the various embodiments of this application is processed in strict accordance with the requirements of laws and regulations, following the principles of legality, legitimacy, and necessity, based on the reasonable purpose of the business scenario, and includes personal information that users actively provide or that is generated as a result of using the product / service, as well as personal information obtained with user authorization.
[0231] The personal information processed in this application will vary depending on the specific product / service scenario and will be based on the specific scenario in which the user uses the product / service. This 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 the utmost diligence.
[0232] This application attaches great importance to the security of users' personal information and has taken reasonable and feasible security protection measures that comply with industry standards to protect users' information and prevent unauthorized access, disclosure, use, modification, damage or loss of personal information.
[0233] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will all fall within the scope of protection of the present invention.
Claims
1. A lane line aggregation method, characterized in that, The method includes: The pre-trained lane line vector data aggregation model is used to predict the lane line vector data to be predicted, and the lane line aggregation result is obtained. The trained lane line vector data aggregation model is obtained by training a training dataset, which includes training data and supervision data. The method further includes constructing the training dataset according to the following steps: The lane line vector data used for training is matched with the high-precision map lane line data within the map sheet where the lane line vector data is located, and a matching relationship between the lane line vector data and the high-precision map lane line data is established. Based on the matching relationship, the lane line vector data and the high-precision map lane line data corresponding to the matching relationship are divided into blocks to obtain multiple lane line matching blocks; A training dataset is constructed based on multiple lane line matching blocks; wherein, the training dataset uses lane line vector data in the lane line matching blocks as training data and high-precision map lane line data in the lane line matching blocks as supervision data; The step of matching the lane line vector data used for training with the high-precision map lane line data within the map sheet where the lane line vector data is located includes: Obtain the vertical distance between each sampling point in the lane line vector data and each lane line data of the high-precision map within the map sheet; For each of the high-precision map lane line data, the vertical distances corresponding to all sampling points of the lane line vector data are weighted and calculated to obtain the average distance between the lane line vector data and the high-precision map lane line data. When the average distance is less than a preset distance threshold, the lane line vector data is determined to match the high-precision map lane line data to establish a matching relationship between the lane line vector data and the high-precision map lane line data.
2. The lane line aggregation method according to claim 1, characterized in that, The step of dividing the lane line vector data and the high-precision map lane line data corresponding to the matching relationship into blocks to obtain multiple lane line matching blocks includes: The map sheet is divided into multiple map sheet blocks; Based on the coordinates of the lane line vector data and the high-precision map lane line data, the lane line vector data and the high-precision map lane line data corresponding to the matching relationship are segmented into corresponding map blocks, thereby obtaining multiple lane line matching blocks.
3. The lane line aggregation method according to claim 2, characterized in that, The process of dividing the map sheet into multiple map sheet blocks includes: The map sheet is divided into multiple map sheet blocks by using a first preset size as the step size; The size of the map block is a second preset size, and the first preset size is smaller than the second preset size.
4. The lane line aggregation method according to claim 2, characterized in that, The method further includes: Based on the high-precision map lane line data in the lane line matching block, obtain the lane line curvature of the high-precision map lane line data; When the curvature of the lane line is greater than a preset curvature threshold, the high-precision map lane line data is marked as a curve; When the lane line curvature is less than or equal to the curvature threshold, the high-precision map lane line data is marked as a straight line.
5. The lane line aggregation method according to claim 4, characterized in that, The step of obtaining the lane line curvature of the high-precision map lane line data based on the high-precision map lane line data in the lane line matching block includes: For each sampling point of the high-precision map lane line data, extend forward and backward a predetermined number of sampling points; The curvature of the current sampling point is obtained by using the vector pointing from the current sampling point to the sampling points extending backward and the vector pointing from the sampling points extending forward to the current sampling point. The lane line curvature of the high-precision map lane line data is obtained based on the curvature of all sampling points.
6. The lane line aggregation method according to claim 1, characterized in that, The construction of the training dataset based on multiple lane line matching blocks includes: Based on the high-precision map lane line data in each lane line matching block, the lane line vector data in the lane line matching block is filtered; The filtered lane line vector data from multiple lane line matching blocks are used as training data, and the corresponding high-precision map lane line data are used as supervision data to construct the training dataset.
7. The lane line aggregation method according to claim 6, characterized in that, The step of filtering the lane line vector data in each lane line matching block based on the high-precision map lane line data in each lane line matching block includes: For each lane line matching block, high-precision map lane line data are connected into high-precision lane line instances based on geometric relationships; Calculate the intersection-union ratio between the lane line vector data in the lane line matching block and the high-precision lane line instance; Lane line vector data with an intersection-to-merge ratio less than a preset intersection-to-merge ratio threshold are filtered out.
8. The lane line aggregation method according to claim 1, characterized in that, The method further includes training the lane line vector data aggregation model according to the following steps: The lane line vector data and high-precision map lane line data in each lane line matching block of the training dataset are subjected to data augmentation transformation. The lane line vector data in the data-augmented lane line matching block and the high-precision map lane line data are used as model inputs to train the lane line vector data aggregation model.
9. The lane line aggregation method according to claim 8, characterized in that, The data augmentation transformation includes: The lane line vector data and the high-precision map lane line data are rotated horizontally or vertically; or, The lane line vector data and the high-precision map lane line data are randomly rotated around the coordinate origin.
10. The lane line aggregation method according to claim 1, characterized in that, The method further includes evaluating the trained lane line vector data aggregation model according to the following steps: The trained lane line vector data aggregation model is applied to predict the lane line vector data used for evaluation, and the prediction results are obtained. Obtain the chamfer distance between the prediction result and the supervision data corresponding to the lane line vector data; Based on the chamfer distance and multiple preset distance indicators, the evaluation results of the lane line vector data aggregation model are obtained.
11. The lane line aggregation method according to claim 10, characterized in that, The evaluation result of the lane line vector data aggregation model, based on the chamfer distance and multiple preset distance indicators, includes: For each distance indicator, obtain the PR curve of the prediction result corresponding to the distance indicator; Based on the PR curve and the chamfer distance, the average accuracy corresponding to the distance index is obtained; The evaluation results are obtained based on the average accuracy of multiple distance metrics.
12. The lane line aggregation method according to claim 10, characterized in that, The step of obtaining the chamfer distance between the prediction result and the supervision data corresponding to the lane line vector data includes obtaining the chamfer distance according to the following formula: in, For the predicted results, To monitor the data, This is the chamfer distance; For the sampling points in the prediction results, To monitor the sampling points in the data.
13. A control device comprising at least one processor and at least one storage device, said storage device being adapted to store a plurality of program codes, characterized in that, The program code is adapted to be loaded and run by the processor to perform the lane line aggregation method according to any one of claims 1 to 12.
14. A computer-readable storage medium storing a plurality of program codes, characterized in that, The program code is adapted to be loaded and run by a processor to perform the lane line aggregation method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Method and equipment for training key point detection model and method and equipment generating high-precision map lane line
CN113739811A
Verification method for lane line marking, related generation method and related equipment
CN115116024A