Traffic light labeling method and device, computer device and storage medium
By clustering and distance calculation of 3D point clouds and 2D bounding boxes, the problems of missing and incorrect traffic light labels in traditional technologies are solved, achieving more accurate and efficient traffic light labeling.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN DEEPROUTE AI CO LTD
- Filing Date
- 2022-08-30
- Publication Date
- 2026-06-09
AI Technical Summary
In traditional technologies, traffic lights in semantic maps annotated with 3D point clouds collected by devices such as LiDAR often suffer from missing or incorrect annotations.
By acquiring multiple frames of 3D point clouds and 2D bounding boxes, clustering processing and pose point distance calculation are performed. Combined with weights and interval distances, the annotation points of the target traffic lights are determined.
It improved the accuracy and efficiency of traffic light markings, and reduced marking errors and omissions.
Smart Images

Figure CN115311645B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of autonomous driving, and in particular to a method, apparatus, computer device, and storage medium for traffic light marking. Background Technology
[0002] Autonomous driving relies heavily on semantic maps, which contain traffic element information such as roads, traffic signs, lane lines, and traffic lights, and are used to control vehicle steering, speed, and path planning.
[0003] In traditional technologies, traffic lights in semantic maps annotated with 3D point clouds collected by devices such as LiDAR often suffer from missing or incorrect annotations due to issues with the acquisition angle of the LiDAR devices or obstructions. Summary of the Invention
[0004] Therefore, it is necessary to provide a traffic light marking method, apparatus, computer equipment, and computer-readable storage medium that can improve the accuracy of traffic light marking, in response to the above-mentioned technical problems.
[0005] Firstly, this application provides a method for marking traffic lights. The method includes:
[0006] Obtain multiple frames of 3D point cloud data and 2D bounding boxes of target traffic lights in multiple frames of images in the target road segment; the acquisition time of each frame of the image is the same as the acquisition time of one frame of the 3D point cloud.
[0007] Each frame of the 3D point cloud is projected onto the plane containing the 2D bounding box corresponding to the same acquisition time of the 3D point cloud. The 3D points corresponding to the 2D points projected onto each 2D bounding box are clustered to obtain a 3D point subset.
[0008] Calculate the physical distance between any two pose points corresponding to the two-dimensional bounding boxes, and obtain a reference three-dimensional point based on the center point corresponding to the target two-dimensional bounding box combination whose physical distance meets a preset condition; the pose point represents the position when the camera captures the image, and the image is used to extract the two-dimensional bounding box.
[0009] Calculate the interval distance between each of the three-dimensional point subsets and the reference three-dimensional point, determine the target three-dimensional point subset based on the interval distance, and use the target points in the target three-dimensional point subset to mark the target traffic light.
[0010] In one embodiment, calculating the physical distance between the pose points corresponding to any two of the two-dimensional bounding boxes, and obtaining the reference three-dimensional point based on the center point corresponding to the target two-dimensional bounding box combination whose physical distance meets preset conditions, includes:
[0011] Obtain the pose points corresponding to each of the two-dimensional bounding boxes;
[0012] Calculate the physical distance between any two pose points, and combine the two two-dimensional bounding boxes corresponding to the physical distances that meet the preset conditions as the target two-dimensional bounding boxes;
[0013] The weights corresponding to the combination of the target two-dimensional bounding boxes are determined based on the physical distance, and the weights are proportional to the physical distance.
[0014] Based on the weights corresponding to each of the target two-dimensional bounding box combinations, and the center points corresponding to the two target two-dimensional bounding boxes in the target two-dimensional bounding box combination, a reference three-dimensional point is calculated.
[0015] In one embodiment, obtaining the reference 3D point based on the weights corresponding to each of the target 2D bounding box combinations and the center points corresponding to two target 2D bounding boxes in the target 2D bounding box combination includes:
[0016] Based on the center coordinates and corresponding pose points of the two target two-dimensional bounding boxes in the target two-dimensional bounding box combination, the center points corresponding to the two target two-dimensional bounding boxes are obtained respectively.
[0017] Based on the two center points, the first reference point corresponding to the combination of the target two-dimensional bounding box is calculated;
[0018] The reference three-dimensional point is obtained by statistically analyzing the first reference point and weight corresponding to each combination of the two-dimensional bounding boxes of the target.
[0019] In one embodiment, calculating the interval distance between each of the three-dimensional point subsets and the reference three-dimensional point, and determining the target three-dimensional point subset based on the interval distance, includes:
[0020] Plane fitting is performed on the set of three-dimensional points to obtain a candidate set of three-dimensional points;
[0021] Calculate the center point of the subset corresponding to the candidate 3D point in the subset of candidate 3D points;
[0022] Calculate the distance between the center point of each subset and the reference 3D point, and determine the candidate 3D point subset corresponding to the smallest distance as the target 3D point subset.
[0023] In one embodiment, the traffic light marking method further includes:
[0024] If the three-dimensional points corresponding to the two-dimensional points projected onto each of the two-dimensional bounding boxes are clustered to obtain a three-dimensional point subset, then the target traffic light is labeled based on the target points in the three-dimensional point subset.
[0025] In one embodiment, the traffic light marking method further includes:
[0026] If there are no projected two-dimensional points in any of the two-dimensional bounding boxes, then calculate the physical distance between any two two-dimensional bounding boxes, and obtain the reference three-dimensional point based on the center point corresponding to the target two-dimensional bounding box combination whose physical distance meets the preset conditions.
[0027] The target traffic light is labeled using the reference 3D points.
[0028] Secondly, this application also provides a traffic light marking device. The device includes:
[0029] The acquisition module is used to acquire multiple frames of 3D point cloud data and 2D bounding boxes of target traffic lights in multiple frames of images of the target road segment; the acquisition time of each frame of the image is the same as the acquisition time of one frame of the 3D point cloud.
[0030] The segmentation module is used to project each frame of the 3D point cloud onto the plane containing the 2D bounding box corresponding to the same acquisition time of the 3D point cloud, and to perform clustering processing on the 3D points corresponding to the 2D points projected onto each 2D bounding box to obtain a 3D point subset.
[0031] The calculation module is used to calculate the physical distance between the pose points corresponding to any two of the two-dimensional bounding boxes, and to calculate a reference three-dimensional point based on the center point corresponding to the combination of target two-dimensional bounding boxes whose physical distance meets preset conditions; the pose point represents the position of the camera when capturing the image, and the image is used to extract the two-dimensional bounding box.
[0032] The annotation module is used to calculate the interval distance between each of the three-dimensional point subsets and the reference three-dimensional point, determine the target three-dimensional point subset based on the interval distance, and annotate the target traffic light using the target points in the target three-dimensional point subset.
[0033] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0034] Obtain multiple frames of 3D point cloud data and 2D bounding boxes of target traffic lights in multiple frames of images in the target road segment; the acquisition time of each frame of the image is the same as the acquisition time of one frame of the 3D point cloud.
[0035] Each frame of the 3D point cloud is projected onto the plane containing the 2D bounding box corresponding to the same acquisition time of the 3D point cloud. The 3D points corresponding to the 2D points projected onto each 2D bounding box are clustered to obtain a 3D point subset.
[0036] Calculate the physical distance between any two pose points corresponding to the two-dimensional bounding boxes, and obtain a reference three-dimensional point based on the center point corresponding to the target two-dimensional bounding box combination whose physical distance meets a preset condition; the pose point represents the position when the camera captures the image, and the image is used to extract the two-dimensional bounding box.
[0037] Calculate the interval distance between each of the three-dimensional point subsets and the reference three-dimensional point, determine the target three-dimensional point subset based on the interval distance, and use the target points in the target three-dimensional point subset to mark the target traffic light.
[0038] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0039] Obtain multiple frames of 3D point cloud data and 2D bounding boxes of target traffic lights in multiple frames of images in the target road segment; the acquisition time of each frame of the image is the same as the acquisition time of one frame of the 3D point cloud.
[0040] Each frame of the 3D point cloud is projected onto the plane containing the 2D bounding box corresponding to the same acquisition time of the 3D point cloud. The 3D points corresponding to the 2D points projected onto each 2D bounding box are clustered to obtain a 3D point subset.
[0041] Calculate the physical distance between any two pose points corresponding to the two-dimensional bounding boxes, and obtain a reference three-dimensional point based on the center point corresponding to the target two-dimensional bounding box combination whose physical distance meets a preset condition; the pose point represents the position when the camera captures the image, and the image is used to extract the two-dimensional bounding box.
[0042] Calculate the interval distance between each of the three-dimensional point subsets and the reference three-dimensional point, determine the target three-dimensional point subset based on the interval distance, and use the target points in the target three-dimensional point subset to mark the target traffic light.
[0043] The aforementioned traffic light labeling method, apparatus, computer equipment, and storage medium acquire multiple frames of 3D point clouds and 2D bounding boxes of target traffic lights in multiple frames of images of a target road segment. For the 3D point clouds and 2D bounding boxes corresponding to the images at the same acquisition time, the 3D point clouds are projected onto the plane where the 2D bounding boxes are located. Clustering is performed on the 3D points corresponding to the 2D points projected onto each 2D bounding box, dividing 3D points with the same attributes into 3D point subsets. The physical distance between the pose points corresponding to any two 2D bounding boxes is calculated, and it is determined whether the physical distance meets the preset conditions. If the physical distance meets the preset conditions, the two 2D bounding boxes corresponding to the physical distance are used as a target 2D bounding box combination. A reference 3D point is calculated using the center point corresponding to the target 2D bounding box combination. The interval distance between the 3D point subset and the reference 3D point is calculated. The target 3D point subset is determined from the 3D point subset based on the interval distance. The target traffic light is labeled based on the target points in the target 3D point subset. By clustering 3D points, points with the same attributes are divided into subsets, each with its own characteristics. This facilitates the selection of the target 3D point subset representing the traffic light, improving the efficiency and accuracy of target 3D point subset determination. By calculating the distance between each 3D point subset and the reference 3D point, the target 3D point subset representing the traffic light is selected based on the distance, improving the accuracy of the target 3D point subset. Finally, the target traffic light is labeled based on the target points in the target 3D point subset, improving the accuracy of the target traffic light labeling. Attached Figure Description
[0044] Figure 1 This is an application environment diagram of the traffic light marking method in one embodiment;
[0045] Figure 2 This is a flowchart illustrating a traffic light marking method in one embodiment;
[0046] Figure 3 This is a flowchart illustrating the steps for determining reference 3D points in one embodiment;
[0047] Figure 4 This is a flowchart illustrating the steps for determining reference 3D points in another embodiment;
[0048] Figure 5 This is a flowchart illustrating the traffic light marking method in another embodiment;
[0049] Figure 6 This is a structural block diagram of a traffic light marking device in one embodiment;
[0050] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0052] The traffic light marking method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Both the terminal and the server can be used independently to execute the traffic light marking method provided in this embodiment. The terminal and server can also be used collaboratively to execute the traffic light marking method provided in this embodiment. For example, terminal 102 sends a traffic light labeling request to server 104. Server 104 receives the traffic light labeling request, acquires multiple frames of 3D point cloud data and 2D bounding boxes of the target traffic light in the target road segment and multiple frames of images. For the 3D point cloud data and the corresponding 2D bounding boxes of the images acquired at the same time, the 3D point cloud data is projected onto the plane containing the 2D bounding boxes. Clustering is performed on the 3D points corresponding to the 2D points projected into each 2D bounding box, dividing 3D points with the same attributes into 3D point subsets. The physical distance between the pose points corresponding to any two 2D bounding boxes is calculated, and it is determined whether the physical distance meets a preset condition. If the physical distance meets the preset condition, the two 2D bounding boxes corresponding to the physical distance are combined as a target 2D bounding box. A reference 3D point is calculated using the center point corresponding to the target 2D bounding box combination. The interval distance between the 3D point subset and the reference 3D point is calculated. Based on the interval distance, the target 3D point subset is determined from the 3D point subset. The target traffic light is labeled based on the target points in the target 3D point subset. Terminal 102 can be, but is not limited to, at least one of various personal computers, laptops, smartphones, tablets, and computing devices deployed in vehicles. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0053] In one embodiment, such as Figure 2 As shown, a traffic light marking method is provided. This method can be applied to computer devices, which can be terminals or servers. It can be executed independently by the terminal or server, or through interaction between the terminal and server. This embodiment illustrates the method applied to a computer device, including the following steps:
[0054] Step 202: Obtain multiple frames of 3D point cloud data and 2D bounding boxes of target traffic lights in multiple frames of images in the target road segment; the acquisition time of each frame of image is the same as the acquisition time of a frame of 3D point cloud data.
[0055] In 3D (Three-Dimensional) engineering, a point cloud refers to a massive collection of points representing the surface characteristics of a target object, obtained through data acquisition using measuring instruments. Each point in the point cloud contains X, Y, and Z geometric coordinates, intensity values, and classification values. Essentially, a point cloud is a collection of multiple points, each with corresponding coordinates, intensity values, and classification values. 3D point clouds can be acquired using vehicle-mounted LiDAR or from cloud servers. Traffic lights are signals that direct traffic flow. They can be divided into motor vehicle traffic lights (usually composed of red, yellow, and green lights) and pedestrian crossing traffic lights (usually composed of red and green lights). A two-dimensional bounding box is a bounding box composed of two-dimensional points representing a target traffic light in an image. A two-dimensional bounding box can be represented by the two-dimensional coordinates of the four vertices of the target traffic light, or by multiple two-dimensional coordinate points forming the outline of the target traffic light. Essentially, a two-dimensional bounding box is a collection of multiple two-dimensional coordinate points.
[0056] Specifically, the computer equipment acquires multiple frames of 3D point cloud and multiple frames of images in the target road segment. The acquisition time of each frame of 3D point cloud is the same as the acquisition time of one of the images. The two-dimensional bounding box of the target traffic light in each image is extracted.
[0057] In one embodiment, the computer device acquires multiple frames of images taken on the target road segment, assigns an identifier to each traffic light in the images, and assigns the same identifier to the same traffic light in different images. For example, one frame of the image has two traffic lights, one of which is identified as traffic light number 1 and the other as traffic light number 2. The identifier corresponding to traffic light number 1 in other images is also traffic light number 1. The target image with traffic light number 1 is selected from the multiple frames of images taken on the target road segment, and two-dimensional bounding boxes representing traffic light number 1 are extracted from the multiple target images respectively.
[0058] In one embodiment, the computer device sets the pitch angle of the lidar sensor according to the height of the traffic lights on the target road segment, and each frame of the 3D point cloud collected in the target road segment does not contain 3D points of the road surface.
[0059] Step 204: Project each frame of 3D point cloud onto the plane containing the 2D bounding box corresponding to the same acquisition time of the 3D point cloud, and perform clustering processing on the 3D points corresponding to the 2D points projected onto each 2D bounding box to obtain a 3D point subset.
[0060] Projection refers to the method of projecting an object onto a selected projection surface through a point or other object, and obtaining the corresponding projection of the object on that surface. Projection can be divided into orthographic projection and oblique projection. Orthographic projection is when the projection ray is perpendicular to the projection surface, while oblique projection is when the projection ray is not perpendicular to the projection surface. Clustering refers to dividing a dataset into different classes or clusters according to a specific criterion, maximizing the similarity of data objects within the same cluster and maximizing the differences between data objects in different clusters. Clustering can be performed using clustering methods, such as statistical model methods, neural network model methods, and point clustering algorithms. Clustering can also be performed using PCL (Point Cloud Library, a large-scale cross-platform open-source C++ programming library built upon point cloud research, implementing numerous general-purpose algorithms and efficient data structures related to point cloud acquisition, filtering, segmentation, registration, retrieval, feature extraction, recognition, tracking, surface reconstruction, visualization, etc., supporting multiple operating system platforms) segmentation, such as planar model segmentation, Euclidean cluster extraction, region growing subdivision, etc.
[0061] Specifically, the computer equipment projects the 3D point cloud onto the plane containing the 2D bounding box of the image at the same acquisition time, then obtains the 3D points corresponding to the 2D points projected into each 2D bounding box, and performs clustering processing on the obtained 3D points to obtain multiple 3D point subsets.
[0062] In one embodiment, the computer device first solves for the normal of the plane containing the two-dimensional bounding box, then projects the three-dimensional point cloud at the same acquisition time onto the plane containing the two-dimensional bounding box according to the direction of the normal, obtains the two-dimensional points corresponding to the three-dimensional points in the three-dimensional point cloud, determines whether the two-dimensional points are in the two-dimensional bounding box, obtains the three-dimensional points corresponding to the two-dimensional points in the two-dimensional bounding box, and performs clustering processing on the obtained three-dimensional points to obtain multiple three-dimensional point subsets.
[0063] Step 206: Calculate the physical distance between the pose points corresponding to any two two-dimensional bounding boxes, and obtain the reference three-dimensional point by combining the center points corresponding to the target two-dimensional bounding boxes whose physical distance meets the preset conditions; the pose points represent the positions when the camera captures the image, and the image is used to extract the two-dimensional bounding boxes.
[0064] In this context, a pose point refers to a point that possesses both position and orientation information. It can be understood as a point representing the camera's position and orientation when capturing an image. Position information can be represented by coordinates, and orientation information can be represented by angles. Physical distance refers to the straight-line distance between two objects. It can be calculated based on two-dimensional coordinate points, three-dimensional coordinate points, etc., representing the object's position.
[0065] Specifically, the computer device first calculates the physical distance between the pose points corresponding to any two two-dimensional bounding boxes, and then determines whether the physical distance meets the preset conditions. If the physical distance meets the preset conditions, the two two-dimensional bounding boxes corresponding to the physical distance are combined as the target two-dimensional bounding boxes, and the three-dimensional reference point is calculated based on the center point corresponding to the target two-dimensional bounding box combination.
[0066] In one embodiment, the computer device calculates the coordinates of the center point of the two-dimensional bounding box based on the coordinates of the four vertices of the two-dimensional bounding box, calculates the straight-line distance between the center point coordinates of the two-dimensional bounding box and the center point coordinates of another two-dimensional bounding box, and uses the straight-line distance as the physical distance between the two two-dimensional bounding boxes.
[0067] Step 208: Calculate the interval distance between each set of three-dimensional points and the reference three-dimensional point, determine the target set of three-dimensional points based on the interval distance, and use the target points in the target set of three-dimensional points to mark the target traffic light.
[0068] Specifically, the computer equipment first calculates the distance between each set of three-dimensional points and the reference three-dimensional point, then compares all the distances, determines the target set of three-dimensional points from the set of three-dimensional points based on the comparison results, and marks the traffic lights based on the target points in the set of three-dimensional points.
[0069] In the aforementioned traffic light labeling method, multiple frames of 3D point clouds and 2D bounding boxes of target traffic lights in multiple frames of images are obtained from the target road segment. For the 3D point clouds and corresponding 2D bounding boxes of images at the same acquisition time, the 3D point clouds are projected onto the plane where the 2D bounding boxes are located. The 3D points corresponding to the 2D points projected onto each 2D bounding box are clustered, and 3D points with the same attributes are divided into 3D point subsets. The physical distance between the pose points corresponding to any two 2D bounding boxes is calculated, and it is determined whether the physical distance meets the preset conditions. If the physical distance meets the preset conditions, the two 2D bounding boxes corresponding to the physical distance are used as the target 2D bounding box combination. The center point corresponding to the target 2D bounding box combination is used to calculate the reference 3D point. The interval distance between the 3D point subset and the reference 3D point is calculated. The target 3D point subset is determined from the 3D point subset based on the interval distance. The target traffic light is labeled based on the target points in the target 3D point subset. By clustering 3D points, points with the same attributes are divided into subsets, each with its own characteristics. This facilitates the selection of the target 3D point subset representing the traffic light, improving the efficiency and accuracy of target 3D point subset determination. By calculating the distance between each 3D point subset and the reference 3D point, the target 3D point subset representing the traffic light is selected based on the distance, improving the accuracy of the target 3D point subset. Finally, the target traffic light is labeled based on the target points in the target 3D point subset, improving the accuracy of the target traffic light labeling.
[0070] In one embodiment, such as Figure 3 As shown, the physical distance between any two 2D bounding boxes is calculated. Based on the center point of the target 2D bounding box combination whose physical distance meets preset conditions, the reference 3D point is calculated, including:
[0071] Step 302: Obtain the pose points corresponding to each two-dimensional bounding box.
[0072] Specifically, the computer device acquires the pose points of each frame of the image and uses the pose points of each frame as the pose points of the corresponding two-dimensional bounding box of the image.
[0073] Step 304: Calculate the physical distance between any two pose points, and combine the two two-dimensional bounding boxes corresponding to the physical distances that meet the preset conditions as the target two-dimensional bounding boxes.
[0074] Here, preset conditions refer to pre-defined judgment criteria. Preset conditions can be threshold values or value ranges. For example, a preset condition is that the physical distance is greater than or equal to 10 meters and less than or equal to 20 meters.
[0075] Specifically, the computer device first randomly selects two two-dimensional bounding boxes from all the two-dimensional bounding boxes representing the target traffic lights, calculates the physical distance between the pose points corresponding to the two two-dimensional bounding boxes, and then compares the physical distance with preset conditions. If the physical distance meets the preset conditions, the two two-dimensional bounding boxes corresponding to the physical distance are used as the target two-dimensional bounding box combination. After multiple calculations and comparisons, multiple pairs of target two-dimensional bounding box combinations are obtained.
[0076] Step 306: Determine the weights corresponding to the combination of the target two-dimensional bounding boxes based on the physical distance. The weights are proportional to the physical distance.
[0077] In this context, the weight refers to the frequency of each number in the weighted average; it can also be called the weight or weighting factor. The weight is directly proportional to the physical distance, meaning the greater the physical distance, the greater the corresponding weight.
[0078] Specifically, the computer equipment determines the weight of the target's two-dimensional bounding box based on the physical distance; the greater the physical distance, the greater the corresponding weight.
[0079] In one embodiment, the weight corresponding to the target 2D bounding box is determined by the proportion of the physical distance of the target 2D bounding box to the sum of the physical distances of all target 2D bounding boxes. For example, if there are three target 2D bounding boxes, and the physical distances of each 2D bounding box are A, B, and C, then the weights corresponding to the three 2D bounding boxes are A / (A+B+C), B / (A+B+C), and C / (A+B+C), and the sum of the three weights is 1.
[0080] Step 308: Based on the weights corresponding to each target 2D bounding box combination and the center points corresponding to the two target 2D bounding boxes in the target 2D bounding box combination, the reference 3D point is calculated.
[0081] Specifically, the computer device calculates a reference 3D point based on the weights corresponding to the combination of each target 2D bounding box and the center points corresponding to the two target 2D bounding boxes within the target 2D bounding box.
[0082] In this embodiment, the camera's pose points during image capture are used as the pose points corresponding to the two-dimensional bounding boxes. The physical distance between the pose points corresponding to the two two-dimensional bounding boxes is calculated, and the physical distance is compared with preset conditions. The two two-dimensional bounding boxes corresponding to the physical distances that meet the preset conditions are used as the target two-dimensional bounding box combination. Through the above-described physical distance calculation and comparison process, the accuracy of determining the target two-dimensional bounding box is improved. The weight of the target two-dimensional bounding box is determined based on the magnitude of the physical distance. Since the greater the physical distance, the higher the accuracy of the three-dimensional points used in the reference three-dimensional point calculation obtained by calculating the center point corresponding to the target two-dimensional bounding box combination, the larger the weight of the three-dimensional point with higher accuracy, thus improving the accuracy of the reference three-dimensional point.
[0083] In one embodiment, such as Figure 4 As shown, based on the weights corresponding to each combination of target 2D bounding boxes, and the center points corresponding to the two target 2D bounding boxes in the combination, the reference 3D points are calculated as follows:
[0084] Step 402: Based on the center coordinates and corresponding pose points of the two target 2D bounding boxes in the target 2D bounding box combination, obtain the center points corresponding to the two target 2D bounding boxes respectively.
[0085] Here, the center coordinates refer to the coordinates of the center point of the target's two-dimensional bounding box. The center coordinates and the two-dimensional points that make up the bounding box lie in the same plane. For example, if the two-dimensional bounding box is in the plane formed by the X and Y axes, and the bounding box is a quadrilateral with the coordinates of its four vertices (x1, y1), (x2, y2), (x3, y3), and (x4, y4), then the coordinates of the center point are ((x1, y1), (x2, y2), (x3, y3), and (x4, y4). 1+ x 2+ x 3+ x4) / 4,(y 1+ y 2+ y 3+ (y4) / 4). The orientation angle is the angle between the straight line between the center point of the target 2D bounding box and the reference 3D point, and the straight line between the two center points of the target 2D bounding box combination. The center point is the point containing the center coordinates and the orientation angle. The orientation angle can be calculated based on the pose information of the pose points corresponding to the 2D bounding box.
[0086] Specifically, the computer device uses the center coordinates of each target 2D bounding box as the center coordinates of the center point of the target 2D bounding box, and determines the orientation angle of the center point of the target 2D bounding box based on the pose information of the pose point corresponding to each target 2D bounding box, thus obtaining the center points corresponding to the two target 2D bounding boxes respectively.
[0087] Step 404: Based on the two center points, calculate the first reference point corresponding to the combination of the target two-dimensional bounding box.
[0088] The first reference point refers to a three-dimensional point reconstructed from the two center points corresponding to the combination of the target's two-dimensional bounding box. The first reference point can be calculated using methods such as triangulation.
[0089] Specifically, the computer device calculates the first reference point corresponding to the target two-dimensional bounding box based on the center coordinates and orientation angles of the two center points corresponding to the target two-dimensional bounding box combination.
[0090] Step 406: Calculate the first reference point and weight corresponding to each combination of two-dimensional bounding boxes of the target to obtain the reference three-dimensional point.
[0091] Specifically, the computer device first multiplies the first reference point corresponding to each target two-dimensional bounding box combination with the weight, then sums the multiplication results corresponding to each target two-dimensional bounding box combination, and uses the summed result as the reference three-dimensional point.
[0092] In this embodiment, the center points corresponding to the two target 2D bounding boxes in the target 2D bounding box combination are first calculated. Then, the first reference point of the target 2D bounding box combination is recovered based on the two center points. The first reference point corresponding to each target 2D bounding box combination is multiplied by a weight, and the results are summed to obtain a reference 3D point. The first reference point is calculated using the center points corresponding to the target 2D bounding box combination. The sum of the products of the first reference point and its corresponding weight is used as the reference 3D point. The higher the accuracy of the first reference point, the larger the corresponding weight, thereby increasing the proportion of high-accuracy first reference points in the calculation of reference 3D points and improving the accuracy of the reference 3D points.
[0093] In one embodiment, calculating the interval distance between each subset of 3D points and a reference 3D point, and determining the target set of 3D points based on the interval distance includes:
[0094] Plane fitting is performed on the 3D point subset to obtain candidate 3D point subsets; the center point of the subset corresponding to the candidate 3D point in the candidate 3D point subset is calculated; the interval distance between the center point of each subset and the reference 3D point is calculated, and the candidate 3D point subset corresponding to the smallest interval distance is determined as the target 3D point subset.
[0095] Plane fitting refers to the process of optimizing and fitting discrete points in space to a plane. There are various methods for space plane fitting, which can be selected according to the specific circumstances. The space plane equation is the expression representing a plane in space. It can be understood as the expression of the space plane containing the discrete points after space plane fitting. For example, the expression for a space plane in three-dimensional space is Ax + By + Cz + D = 0, where A, B, C, and D are the parameters of the space plane expression.
[0096] Specifically, the computer device performs plane fitting on the three-dimensional point set to obtain a spatial plane expression. The spatial plane expression is used to solve for the candidate three-dimensional point sets corresponding to the three-dimensional point set. The center point of each candidate three-dimensional point set is solved, the interval distance between the center point of the subset and the reference three-dimensional point is calculated, the interval distances corresponding to each candidate three-dimensional point set are compared, and the candidate three-dimensional point set with the smallest interval distance is determined as the target three-dimensional point set.
[0097] In one embodiment, the computer device performs plane fitting on the three-dimensional point subset to obtain a spatial plane expression, and the three-dimensional points that satisfy the spatial plane expression are taken as candidate three-dimensional points. Each candidate three-dimensional point forms a candidate three-dimensional point subset. The average of the sums of the three-dimensional points in the candidate three-dimensional point subset is obtained to obtain the center point of the subset corresponding to the three-dimensional point subset.
[0098] In one embodiment, the computer device performs planar fitting on a subset of three-dimensional points to obtain a spatial plane expression. Three-dimensional points that satisfy the spatial plane expression are selected as first candidate three-dimensional points, and each first candidate three-dimensional point is assigned the same first weight. Three-dimensional points that do not satisfy the spatial plane expression are solved using the spatial plane expression to obtain second candidate three-dimensional points that satisfy the spatial plane expression, and each second candidate three-dimensional point is assigned the same second weight. The first candidate three-dimensional points and the second candidate three-dimensional points form a subset of candidate three-dimensional points, and the first weight is greater than the second weight. The sum of the weights of each candidate three-dimensional point is 1. The center point of the subset corresponding to the subset of three-dimensional points is obtained by multiplying each three-dimensional point in the subset of candidate three-dimensional points by its corresponding weight and summing the results.
[0099] In this embodiment, a candidate 3D point subset is obtained by performing planar fitting on the 3D point subset. By performing planar fitting on the 3D point subset, errors caused by the acquisition of one or more 3D points in the 3D point subset are eliminated, improving the accuracy of the 3D points in the 3D point subset. The center point of the subset corresponding to each candidate 3D point subset is solved, and the interval distance between the center point of the subset and the reference 3D point is calculated. By comparing the interval distances, the candidate 3D point subset with the smallest distance from the reference 3D point is determined as the target 3D point subset. The smaller the interval distance with the reference 3D point, the greater the probability that the candidate 3D point subset is the target 3D point subset. The target traffic light is labeled based on the target 3D point subset, improving the accuracy of the target traffic light labeling.
[0100] In one embodiment, the method for marking traffic lights further includes:
[0101] If the three-dimensional points corresponding to the two-dimensional points projected onto each two-dimensional bounding box are clustered to obtain a set of three-dimensional points, then the target traffic light is labeled using the target points in the set of three-dimensional points.
[0102] Specifically, the computer device acquires the two-dimensional points projected onto each two-dimensional bounding box, and then performs clustering processing on the three-dimensional points corresponding to the two-dimensional points. If only one set of three-dimensional points is obtained after clustering, the target traffic light is labeled according to the target points in the obtained set of three-dimensional points.
[0103] In one embodiment, the computer device acquires the three-dimensional points corresponding to the two-dimensional points projected onto the two-dimensional bounding box, performs clustering processing on the three-dimensional points to obtain only a subset of three-dimensional points, calculates the interval distance between the subset of three-dimensional points and the reference three-dimensional points, compares the interval distance with the interval threshold, and if the interval distance is greater than or equal to the interval threshold, the reference three-dimensional points are used to mark the traffic light; if the interval distance is less than the interval threshold, the target points in the subset of three-dimensional points are used to mark the target traffic light.
[0104] In this embodiment, if the three-dimensional points corresponding to the two-dimensional points projected onto the two-dimensional bounding box only result in a subset of three-dimensional points after clustering, then the target traffic light is labeled based on the target points in the subset of three-dimensional points, thereby improving the efficiency of traffic light labeling.
[0105] In one embodiment, the method for marking traffic lights further includes:
[0106] If there are no projected 2D points in any of the 2D bounding boxes, calculate the physical distance between any two 2D bounding boxes, and obtain the reference 3D point by combining the center points of the target 2D bounding boxes whose physical distances meet the preset conditions; use the reference 3D point to mark the target traffic light.
[0107] Specifically, if the computer device does not obtain the two-dimensional points projected onto each of the two-dimensional bounding boxes, it calculates the physical distance between any two two-dimensional bounding boxes, determines whether the physical distance meets the preset conditions, takes any two two-dimensional bounding boxes whose physical distance meets the preset conditions as the target two-dimensional bounding box combination, calculates the three-dimensional reference point based on the center point corresponding to the target two-dimensional bounding box combination, and uses the reference three-dimensional point to mark the target traffic light.
[0108] In this embodiment, since there are no projected two-dimensional points in each two-dimensional bounding box, but there are two-dimensional bounding boxes, it indicates that there are omissions in the three-dimensional point cloud. By marking the target traffic lights with three-dimensional reference points, the missing traffic light markings are avoided and the accuracy of traffic light markings is improved.
[0109] In one specific embodiment, the method for traffic light marking is as follows: Figure 5 As shown:
[0110] The process involves acquiring multiple frames of 3D point clouds and 2D bounding boxes of target traffic lights in the target road segment and the images. A normal to the plane containing each 2D bounding box is established. For the 3D point clouds and corresponding 2D bounding boxes in the images acquired at the same time, the 3D point clouds are projected onto the plane containing the 2D bounding boxes according to the direction of the corresponding normals. If a 2D bounding box has projected 2D points, the corresponding 3D points are acquired. Clustering is then performed on the 3D points. If clustering yields only one subset of 3D point clouds, a target point is selected from this subset, and the target traffic light is labeled based on the target point. If clustering yields multiple subsets of 3D point clouds, planar segmentation filtering is performed on these subsets. If only one subset of 3D point clouds remains after planar segmentation filtering, a target point is selected from this subset, and the target traffic light is labeled based on the target point. If multiple subsets of 3D point clouds still exist after planar segmentation filtering, visual-assisted labeling of the traffic lights is performed.
[0111] The method for visually assisted annotation of traffic lights is as follows: obtain the pose points corresponding to each two-dimensional bounding box, calculate the physical distance between the pose points corresponding to two two-dimensional bounding boxes, compare the physical distance with preset conditions, if the physical distance meets the preset conditions, then take the two two-dimensional bounding boxes corresponding to the physical distance as the target two-dimensional bounding box combination, determine the weight corresponding to the target two-dimensional bounding box combination according to the physical distance, calculate the first reference point by using the triangulation algorithm on the two center points corresponding to the target two-dimensional bounding box combination, multiply the first reference point corresponding to each target two-dimensional bounding box combination with the weight, and sum the results of the multiplication to obtain the reference three-dimensional point.
[0112] A spatial plane expression is obtained by fitting a 3D point subset to a plane. The spatial plane expression is then used to solve for the candidate 3D point subsets corresponding to the 3D point subset. The center point of each candidate 3D point subset is then calculated, and the distance between the center point of the subset and the reference 3D point is calculated. The distances between the candidate 3D point subsets are compared, and the candidate 3D point subset with the smallest distance is determined as the target 3D point subset. Target points are then selected from the target 3D point subset, and traffic lights are labeled based on the three target points.
[0113] In this embodiment, multiple frames of 3D point clouds and 2D bounding boxes of target traffic lights in multiple frames of images are acquired in the target road segment. For the 3D point clouds and images corresponding to the same acquisition time, the 3D point clouds are projected onto the plane where the 2D bounding boxes are located. The 3D points corresponding to the 2D points projected into each 2D bounding box are clustered. 3D points with the same attributes are divided into 3D point subsets. The physical distance between the pose points corresponding to any two 2D bounding boxes is calculated. It is determined whether the physical distance meets the preset conditions. If the physical distance meets the preset conditions, the two 2D bounding boxes corresponding to the physical distance are used as the target 2D bounding box combination. The center point corresponding to the target 2D bounding box combination is used to calculate the reference 3D point. The interval distance between the 3D point subset and the reference 3D point is calculated. The target 3D point subset is determined from the 3D point subset based on the interval distance. The target traffic lights are labeled based on the target points in the target 3D point subset. By clustering 3D points, points with the same attributes are divided into subsets, each with its own characteristics. This facilitates the selection of the target 3D point subset representing the traffic light, improving the efficiency and accuracy of target 3D point subset determination. By calculating the distance between each 3D point subset and the reference 3D point, the target 3D point subset representing the traffic light is selected based on the distance, improving the accuracy of the target 3D point subset. Finally, the target traffic light is labeled based on the target points in the target 3D point subset, improving the accuracy of the target traffic light labeling.
[0114] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0115] Based on the same inventive concept, this application also provides a traffic light marking device for implementing the traffic light marking method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more traffic light marking device embodiments provided below can be found in the limitations of the traffic light marking method described above, and will not be repeated here.
[0116] In one embodiment, such as Figure 6As shown, a traffic light marking device is provided, including an acquisition module, a segmentation module, a calculation module, and a marking module, wherein:
[0117] The acquisition module 602 is used to acquire multiple frames of 3D point cloud and the 2D bounding box of the target traffic light in the target road segment; the acquisition time of each frame of image is the same as the acquisition time of a frame of 3D point cloud.
[0118] The segmentation module 604 is used to project each frame of 3D point cloud onto the plane containing the 2D bounding box corresponding to the same acquisition time of the 3D point cloud, and to perform clustering processing on the 3D points corresponding to the 2D points projected onto each 2D bounding box to obtain a 3D point subset.
[0119] The calculation module 606 is used to calculate the physical distance between the pose points corresponding to any two two-dimensional bounding boxes. Based on the center point corresponding to the target two-dimensional bounding box combination whose physical distance meets the preset conditions, a reference three-dimensional point is obtained. The pose point represents the position of the camera when the image is captured, and the image is used to extract the two-dimensional bounding box.
[0120] The annotation module 608 is used to calculate the interval distance between each set of three-dimensional points and the reference three-dimensional point, determine the target set of three-dimensional points based on the interval distance, and use the target points in the target set of three-dimensional points to annotate the target traffic light.
[0121] In one embodiment, the calculation module 606 is further configured to: obtain the pose points corresponding to each two-dimensional bounding box; calculate the physical distance between any two pose points, and take the two two-dimensional bounding boxes corresponding to the physical distance that meets the preset conditions as a combination of target two-dimensional bounding boxes; determine the weight corresponding to the combination of target two-dimensional bounding boxes based on the physical distance, wherein the weight is proportional to the physical distance; and calculate the reference three-dimensional point based on the weight corresponding to each combination of target two-dimensional bounding boxes and the center points corresponding to the two target two-dimensional bounding boxes in the combination of target two-dimensional bounding boxes.
[0122] In one embodiment, the calculation module 606 is further configured to: obtain the center points corresponding to the two target two-dimensional bounding boxes based on the center coordinates and corresponding pose points of the two target two-dimensional bounding boxes in the target two-dimensional bounding box combination; calculate the first reference point corresponding to the target two-dimensional bounding box combination based on the two center points; and statistically analyze the first reference point and weight corresponding to each target two-dimensional bounding box combination to obtain the reference three-dimensional point.
[0123] In one embodiment, the segmentation module 604 is further configured to: perform planar fitting on the three-dimensional point subset to obtain a candidate three-dimensional point subset; calculate the center point of the subset corresponding to the candidate three-dimensional point in the candidate three-dimensional point subset; calculate the interval distance between the center point of each subset and the reference three-dimensional point, and determine the candidate three-dimensional point subset corresponding to the smallest interval distance as the target three-dimensional point subset.
[0124] In one embodiment, the annotation module 608 is further configured to: if the three-dimensional points corresponding to the two-dimensional points projected onto each two-dimensional bounding box are clustered to obtain a set of three-dimensional points, then the target traffic light is annotated based on the target points in the set of three-dimensional points.
[0125] In one embodiment, the annotation module 608 is further configured to: if there are no projected two-dimensional points in each two-dimensional bounding box, calculate the physical distance between any two two-dimensional bounding boxes, obtain a reference three-dimensional point based on the center point corresponding to the target two-dimensional bounding box combination whose physical distance meets the preset conditions; and use the reference three-dimensional point to annotate the target traffic light.
[0126] Each module in the aforementioned traffic light marking device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0127] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a traffic light marking method. The display screen can be an LCD screen or an e-ink display screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.
[0128] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0129] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0130] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0131] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0132] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0133] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0134] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0135] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for marking traffic lights, characterized in that, The method includes: Obtain multiple frames of 3D point cloud data and 2D bounding boxes of target traffic lights in multiple frames of images in the target road segment; the acquisition time of each frame of the image is the same as the acquisition time of one frame of the 3D point cloud. Each frame of the 3D point cloud is projected onto the plane containing the 2D bounding box corresponding to the same acquisition time of the 3D point cloud. The 3D points corresponding to the 2D points projected onto each 2D bounding box are clustered to obtain a 3D point subset. The process involves: acquiring pose points corresponding to each of the two-dimensional bounding boxes; calculating the physical distance between any two pose points; selecting two two-dimensional bounding boxes whose physical distances fall within a preset range as a target two-dimensional bounding box combination; determining the weights corresponding to the target two-dimensional bounding box combination based on the physical distances, where the weights are proportional to the physical distances; calculating reference three-dimensional points based on the weights corresponding to each target two-dimensional bounding box combination and the center points corresponding to the two target two-dimensional bounding boxes in the target two-dimensional bounding box combination; the pose points represent the positions of the camera when capturing images, and the images are used to extract the two-dimensional bounding boxes. Calculate the interval distance between each of the three-dimensional point subsets and the reference three-dimensional point, determine the target three-dimensional point subset based on the interval distance, and use the target points in the target three-dimensional point subset to mark the target traffic light.
2. The method according to claim 1, characterized in that, The step of projecting each frame of the 3D point cloud onto the plane containing the 2D bounding box corresponding to the same acquisition time of the 3D point cloud, and performing clustering processing on the 3D points corresponding to the 2D points projected onto each 2D bounding box to obtain a 3D point subset includes: Solve for the normal to the plane containing the two-dimensional bounding box; The three-dimensional point cloud at the same acquisition time is projected onto the plane of the two-dimensional bounding box according to the direction of the normal, so as to obtain the two-dimensional point corresponding to the three-dimensional point in the three-dimensional point cloud. Determine whether the two-dimensional point is within the two-dimensional bounding box, and obtain the three-dimensional point corresponding to the two-dimensional point within the two-dimensional bounding box; The acquired 3D points are clustered to obtain multiple 3D point subsets.
3. The method according to claim 1, characterized in that, The reference 3D point is calculated based on the weights corresponding to each combination of target 2D bounding boxes and the center points corresponding to the two target 2D bounding boxes in the combination of target 2D bounding boxes, including: Based on the center coordinates and corresponding pose points of the two target two-dimensional bounding boxes in the target two-dimensional bounding box combination, the center points corresponding to the two target two-dimensional bounding boxes are obtained respectively. Based on the two center points, the first reference point corresponding to the combination of the target two-dimensional bounding box is calculated; The reference three-dimensional point is obtained by statistically analyzing the first reference point and weight corresponding to each combination of the two-dimensional bounding boxes of the target.
4. The method according to claim 1, characterized in that, The step of calculating the interval distance between each of the three-dimensional point subsets and the reference three-dimensional point, and determining the target three-dimensional point subset based on the interval distance, includes: Plane fitting is performed on the set of three-dimensional points to obtain a candidate set of three-dimensional points; Calculate the center point of the subset corresponding to the candidate 3D point in the subset of candidate 3D points; Calculate the distance between the center point of each subset and the reference 3D point, and determine the candidate 3D point subset corresponding to the smallest distance as the target 3D point subset.
5. The method according to claim 1, characterized in that, The method further includes: If the three-dimensional points corresponding to the two-dimensional points projected onto each of the two-dimensional bounding boxes are clustered to obtain a three-dimensional point subset, then the target traffic light is labeled based on the target points in the three-dimensional point subset.
6. The method according to claim 1, characterized in that, The method further includes: If there are no projected two-dimensional points in any of the two-dimensional bounding boxes, then calculate the physical distance between any two two-dimensional bounding boxes, and obtain a reference three-dimensional point based on the center point corresponding to the combination of target two-dimensional bounding boxes whose physical distances conform to a preset value range. The target traffic light is labeled using the reference 3D points.
7. A traffic light marking device, characterized in that, The device includes: The acquisition module is used to acquire multiple frames of 3D point cloud data and 2D bounding boxes of target traffic lights in multiple frames of images of the target road segment; the acquisition time of each frame of the image is the same as the acquisition time of one frame of the 3D point cloud. The segmentation module is used to project each frame of the 3D point cloud onto the plane containing the 2D bounding box corresponding to the same acquisition time of the 3D point cloud, and to perform clustering processing on the 3D points corresponding to the 2D points projected onto each 2D bounding box to obtain a 3D point subset. The calculation module is used to obtain the pose points corresponding to each of the two-dimensional bounding boxes; calculate the physical distance between any two pose points, and take the two two-dimensional bounding boxes corresponding to the physical distance that meets the preset value range as a target two-dimensional bounding box combination; determine the weight corresponding to the target two-dimensional bounding box combination based on the physical distance, and the weight is proportional to the physical distance; calculate the reference three-dimensional point based on the weight corresponding to each target two-dimensional bounding box combination and the center point corresponding to the two target two-dimensional bounding boxes in the target two-dimensional bounding box combination; the pose points represent the position when the camera captures the image, and the image is used to extract the two-dimensional bounding boxes; The annotation module is used to calculate the interval distance between each of the three-dimensional point subsets and the reference three-dimensional point, determine the target three-dimensional point subset based on the interval distance, and annotate the target traffic light using the target points in the target three-dimensional point subset.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.