A method for generating bird's-eye view semantic segmentation labels based on inverse perspective transformation and point cloud projection
Through inverse perspective transformation and point cloud projection technology, high-precision bird's-eye view semantic segmentation labels are generated directly from synchronized camera and lidar data, which solves the limitations of high-precision maps and drone aerial photography in the existing technology, and achieves low-cost, Diversified data collection and label generation improve the iterative update capabilities of autonomous driving models.
Patent Information
- Application Number
- CN202210111850.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-29
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-01-29
AI Technical Summary
The existing method of obtaining bird's-eye view semantic segmentation labels has problems such as dependence on the accuracy of high-precision maps, high acquisition cost, long cycle, and limited geographical range. In addition, drones are restricted in the restricted data collection range in restricted no-fly areas, resulting in scene diversity. Limited, affecting model iterative update.
Using a method based on inverse perspective transformation and point cloud projection, by synchronizing camera and lidar data collection, jointly annotating images and point cloud data, generating high-precision bird's-eye view semantic segmentation labels, and generating accurate bird's-eye view semantic segmentation labels directly from original images and point clouds. BEV tags avoid the cumbersome process of high-precision maps and drone aerial photography.
It reduces the cost of data tags, expands the scenarios that can be collected, realizes high-precision BEV tag generation, avoids the limitations of high-precision maps and drone aerial photography, and improves data diversity and the flexibility of model iterative updates.
Smart Images

Figure CN114445592B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of surround perception technology for autonomous driving vehicles, and in particular to a method for generating bird's-eye view semantic segmentation labels based on inverse perspective transformation and point cloud projection. Background Art
[0002] The autonomous driving system is one of the core systems of current smart cars. It is mainly composed of three major modules, namely the perception fusion module, the decision-making and planning module, and the control module. Among them, the perception fusion is the pre-module of the other two modules, and its perception accuracy will directly determine the performance of the entire autonomous driving system.
[0003] Currently, many autonomous driving companies are beginning to focus on surround perception. Specifically, they are distributing multiple cameras around the vehicle body, such as Figure 1 As shown in the figure, it is the most common arrangement. The six cameras collect image information from different perspectives respectively, and then send the image information to the perception model to directly output the bird's-eye view (BEV: Bird Eyes View) semantic information. The bird's-eye view is a picture obtained by looking down from directly above the vehicle relative to the vehicle. The bird's-eye view semantic information refers to the semantic segmentation of the bird's-eye view, which mainly includes four categories: pedestrians, vehicles, drivable areas, and lane lines.
[0004] In order to train such a bird's-eye view semantic segmentation model, it is necessary to obtain the corresponding bird's-eye view semantic segmentation label (hereinafter referred to as BEV label). Currently, there are two main ways to obtain BEV labels in the industry:
[0005] The first method is to generate HD maps offline, and then generate corresponding BEV labels through the semantic information elements of the HD maps. This method has two shortcomings. First, BEV labels are easily affected by the accuracy of HD maps. Second, HD maps are expensive to obtain and take a long time to obtain. In addition, the geographical scope of HD maps is limited, which restricts the diversity of data.
[0006] The second method is to use drones to take aerial photos of the bird's-eye view, and then manually annotate the bird's-eye view. The biggest disadvantage of this method is that the data collection vehicle cannot collect data in the no-fly zone where drones are controlled, so the scope of data collection is limited, and the diversity of scenes is limited. At the same time, this collection model cannot automatically collect data through shadow mode, which affects the iterative update of the model. Summary of the invention
[0007] The purpose of the present invention is to provide a method for generating semantic segmentation labels for a bird's-eye view based on inverse perspective transformation and point cloud projection, and to solve the following technical problems: Currently, there are two main ways to obtain BEV labels in the industry. One is to generate a high-precision map offline, and then generate corresponding BEV labels through the semantic information elements of the high-precision map. This method has two defects. First, the BEV label is easily affected by the accuracy of the high-precision map. Second, the acquisition cost of the high-precision map is high and the cycle is long. In addition, the geographical scope of the high-precision map is limited, which restricts the data diversity.
[0008] Second, the drone is used to take aerial photos of the bird's-eye view, and then the bird's-eye view is manually annotated. The disadvantage of this method is that the data collection vehicle cannot collect data in the no-fly zone where drones are controlled, so the scope of data collection is limited, and the diversity of scenes is limited. At the same time, this collection model cannot automatically collect data through the shadow mode, which affects the iterative update of the model.
[0009] In order to solve the above technical problems, the technical solution adopted by the present invention is: a method for generating bird's-eye view semantic segmentation labels based on inverse perspective transformation and point cloud projection, comprising the following steps:
[0010] S01: Data collection, using synchronization signals to synchronize the camera and lidar data at the same time, and the timestamp difference of all camera and lidar sensor data at each moment does not exceed the set value;
[0011] S02: Data annotation: m images and n point cloud data are jointly annotated at the same time. The static area of the road surface is marked on the image, and the 3D bounding box of the dynamic object is marked on the point cloud.
[0012] S03: Generate the road area of BEV label by inverse perspective transformation. Based on the inverse perspective transformation of affine geometry, the semantic segmentation labels of the road surface from each camera perspective are perspectively transferred to the BEV canvas and spliced, and the spliced images are processed in detail.
[0013] S04: Generate BEV label moving target by projecting point cloud, transform point cloud into vehicle body coordinate system through rigid body transformation, and then project 3D bounding box onto BEV canvas through point projection transformation;
[0014] S05: Merge road surface and moving targets: Merge the semantic segmentation labels generated by S03 and S04 to obtain a complete high-precision BEV label.
[0015] Preferably,
[0016] S01 also includes sensor configuration and calibration. The sensors are cameras and lidars, which are arranged on the data collection vehicle. The calibration uses a camera calibration board to calibrate the external parameters of each camera relative to the vehicle body and its own internal parameters, and uses a joint calibration method of camera and lidar to calibrate the external parameters of the lidar relative to the vehicle body.
[0017] Preferably,
[0018] The cameras are distributed around the vehicle body, and the viewing angles of each camera partially overlap. The laser radar is mounted on the top of the vehicle body, with a horizontal FOV of 360 degrees and a vertical FOV of -20 degrees to 20 degrees. The external parameters are the yaw angle yaw, pitch angle pitch, roll angle roll, translation distance tx, translation distance ty, and translation distance tz of the camera relative to the vehicle body. The internal parameters are the pixel scale f in the x and y directions of the camera. x 、f y and pixel center p x 、p y ; The projection matrix from the body coordinate system to the camera pixel coordinate system is obtained through external parameters and internal parameters, and the transformation derivation formula is:
[0019]
[0020]
[0021]
[0022] R=R yaw R pitch R roll ,
[0023]
[0024]
[0025]
[0026]
[0027] Among them, R is the rigid body rotation matrix, the rotation direction is from the body coordinate system to the camera coordinate system, T is the translation matrix, the translation direction is from the body coordinate system to the camera coordinate system; K is the intrinsic parameter matrix composed of the camera intrinsic parameters, where R, T, and K together constitute a 3x4 projection matrix P, which converts the homogeneous coordinates of a point in the body coordinate system into Projected to pixel coordinates on the camera pixel plane, Z c The depth of this point in camera coordinates.
[0028] Preferably,
[0029] In the S02, six images and one point cloud data at the same time are jointly labeled, wherein only the road surface area is marked on the image, including the drivable area and the road lane lines; and the pedestrians and vehicles of the moving targets are marked on the point cloud.
[0030] Preferably,
[0031] A point (u, v) on the road surface in the camera image corresponds to a road surface point in the vehicle body coordinate system: The subscript r represents road, Z r 0. The pixel coordinate system of the canvas (u r ,v r ) and the road surface point of the vehicle body coordinate system The relationship is:
[0032]
[0033]
[0034] Among them, W target , H target is the width and height of the BEV canvas, ppx target 、ppy target The number of pixels per meter in the width and height directions of the BEV canvas.
[0035] The relationship between the camera road point pixel coordinates and the BEV road point pixel coordinates:
[0036]
[0037] PM is a 3x3 square matrix and is reversible, so we get
[0038]
[0039] Where P∈{P 1 ,P 2 ,P 3 ,P 4 ,P 5 ,P 6}, which are the projection matrices of the six surrounding cameras, where the P and M matrices are known quantities, (u, v) is the road pixel coordinate point given on the camera original image, and its corresponding homogeneous coordinate of the projected pixel point on the BEV canvas The pixel coordinates are:
[0040]
[0041]
[0042] Preferably,
[0043] In the S04, the coordinates of the four grounding points of the marked 3D bounding box of each moving target are transformed into the vehicle body coordinate system by rigid body transformation, and the transformation is performed according to the following formula:
[0044]
[0045] This formula converts the four ground points of the bounding box of each moving target in the lidar coordinate system to the vehicle
[0046] The four grounding points in the body coordinate system are projected onto the BEV graph and generated on the graph.
[0047] The bounding matrix is formed, and then the label of the moving target on the BEV canvas is generated.
[0048] Preferably,
[0049] The generated static BEV map of the road surface and the generated dynamic target map are superimposed and fused to generate a BEV label map including the drivable area, lane lines, vehicles, and pedestrian attributes.
[0050] By adopting the above technical scheme, the beneficial technical effects that can be achieved by the present invention are stated as follows: The present invention refers to the high-precision map generation method. The present invention does not focus on the generation of high-precision maps, but focuses on a set of low-cost BEV label automatic generation algorithms, and designs a set of cost-reducing BEV label automatic generation algorithm processes, which eliminates the tediousness of drones and high-precision maps, and directly obtains high-precision BEV labels from original images and point clouds. Specifically, the present invention directly generates accurate bird's-eye view semantic segmentation labels from the original image and point cloud synchronized at a certain moment, thereby avoiding the acquisition of bird's-eye view and labeling by drone aerial photography of the road surface, greatly reducing the cost of data labels, and at the same time
[0051] The scenarios in which data can be collected have been expanded (scenarios where drones are regulated). BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A schematic diagram of the sensor configuration for the data collection vehicle;
[0053] Figure 2 This is an example of annotation (a is the original picture);
[0054] Figure 3 The mask generated by the label of the labeled example image (b) is the mask generated by the label of the original image;
[0055] Figure 4 Generate BEV label diagram for inverse perspective transformation;
[0056] Figure 5 Generate BEV label diagram for point cloud projection (a BEV projection diagram of pedestrian);
[0057] Figure 6 Generate BEV label schematic diagram for point cloud projection (b BEV projection diagram of vehicle);
[0058] Figure 7 Schematic diagram of the generated BEV label;
[0059] Figure 8 Automatically generate an algorithm flow chart for the entire BEV label. DETAILED DESCRIPTION
[0060] The present invention will be further described below in conjunction with the accompanying drawings.
[0061] The method for generating a bird's-eye view semantic segmentation label based on inverse perspective transformation and point cloud projection described in the present invention has the following specific implementation steps:
[0062] The first step is to configure the data collection vehicle: Figure 1 As shown in the figure, the data collection vehicle is configured. For surround perception, six 2-megapixel cameras are distributed around the vehicle body, and the viewing angles of each camera are partially overlapped, so as to ensure 360-degree environmental perception without blind spots. As for the lidar, it is mounted on the top of the vehicle body, with a horizontal FOV of 360 degrees and a vertical FOV of about -20 degrees to 20 degrees.
[0063] The second step is sensor calibration: use the camera calibration board to calibrate the extrinsic parameters and intrinsic parameters of each camera relative to the ego vehicle. The extrinsic parameters refer to the yaw angle, pitch angle, roll angle, translation distance tx, translation distance ty, translation distance tz of the camera relative to the vehicle body, and the intrinsic parameters refer to the pixel scale f in the x and y directions of the camera. x 、f y and pixel center p x 、p y Then, the annotated camera and lidar are jointly calibrated to calibrate the external parameters of the lidar relative to the vehicle body. The projection matrix from the vehicle body coordinate system to the camera pixel coordinate system can be calculated using the external parameters and internal parameters. The specific transformation derivation is shown in formulas (1)-(8).
[0064]
[0065]
[0066]
[0067] R=R yaw R pitchR roll (4)
[0068]
[0069]
[0070]
[0071]
[0072]
[0073] Where R is the rigid body rotation matrix, the rotation direction is from the body coordinate system to the camera coordinate system, and T is the translation matrix, the translation direction is also from the body coordinate system to the camera coordinate system, and K is the intrinsic parameter matrix composed of the camera intrinsic parameters. From equations (6) and (8), equation (9) can be derived, where R, T, and K together form a 3x4 projection matrix P, which converts the homogeneous coordinates of a point in the body coordinate system into Projected to pixel coordinates on the camera pixel plane, where Z c The depth of this point in camera coordinates.
[0074] For Lidar, the transformation from the body coordinate system to its own coordinate system satisfies equation (6). Since Lidar has no internal parameters, only the external parameter matrices R and T are considered. In the following discussion, let the projection matrix of the i-th camera be P i , the external parameter matrix of Lidar is R lidar , T lidar .
[0075] The third step is data collection: During the data collection process, the most important thing is the synchronization between all 6 cameras and LiDAR. The synchronization method of this patent is that each time the LiDAR scans a camera, this camera triggers exposure, so when the LiDAR scans 360 degrees, all cameras are exposed once. The scanning frequency of LiDAR is 20Hz, so it takes about 50ms for LiDAR to rotate one circle, so the maximum time difference of the 6-way camera synchronization is (50 / 6)x5=41.6ms, which meets the requirement of less than 45ms.
[0076] Step 4: Data annotation: Jointly annotate 6 images and 1 point cloud data at the same time. The image only identifies the road area, including the drivable area and road lane lines, while the point cloud identifies the pedestrians and vehicles in motion. For annotation examples, refer to Figure 2 and Figure 3 .
[0077] Step 5: Inverse perspective transformation to generate the road surface area of the BEV label and refine the label: For a point (u, v) in the road surface area on the camera image, the corresponding road surface point in the vehicle body coordinate system is The subscript r represents road. Since the height of the road area relative to the vehicle body is 0, Z r = 0. Figure 4 As shown, according to the coordinate system setting of the canvas, the pixel coordinate system of the canvas (u r ,v r ) and the road surface point of the vehicle body coordinate system The relationship is:
[0078]
[0079]
[0080] Here W target , H target Respectively represent the width and height of the BEV canvas, ppx target 、ppy target Indicates the number of pixels per meter in the width direction (x direction) and height direction (y direction) of the BEV canvas.
[0081] By combining equations (9) and (10), we can get the relationship between the pixel coordinates of the camera road point and the pixel coordinates of the BEV road point:
[0082]
[0083] Since P is a 3x4 matrix and M is a 4x3 matrix, PM is a 3x3 square matrix and is reversible, so we can get
[0084]
[0085] Where P∈{P 1 ,P 2 ,P 3 ,P 4 ,P 5 ,P 6}, which is the projection matrix of the six surrounding cameras. This formula is the inverse perspective transformation formula, where the P and M matrices are known quantities, (u, v) is the road pixel coordinate point given on the camera original image, so the corresponding homogeneous coordinates of the projection pixel point on the BEV canvas can be inversely calculated. From this we can derive the pixel coordinates as:
[0086]
[0087]
[0088] First, the original images taken by the six surround cameras were annotated with the road area, in which the lane lines and drivable areas were marked, and the following Figure 4 Then, using formulas (12)-(14), the mask labels of each view are projected onto the same BEV canvas. Figure 3 As shown in the figure, the mask labels of each view are stitched together on the BEV canvas to generate a holographic BEV projection image. Due to the camera shaking and the vibration of the vehicle body, the camera external parameters will change, resulting in misalignment of the stitched BEV projection image. Therefore, it needs to be repaired manually. The repaired BEV road label is as follows: Figure 4 shown.
[0089] like Figure 5 and Figure 6 As shown, the sixth step is to generate BEV labeled moving targets through point cloud projection: For moving targets, the coordinates of the four grounding points of the labeled 3D bounding box of each moving target are transformed into the vehicle body coordinate system through rigid body transformation. The transformation is performed according to formula (15):
[0090]
[0091] This formula transforms the four ground points of the bounding box of each moving target in the Lidar coordinate system into the four ground points in the vehicle body coordinate system, then projects these four ground points onto the BEV graph and generates an enclosing matrix on the graph, thereby generating the label of the moving target on the BEV canvas.
[0092] Step 7: Merge the road surface and moving targets: The static BEV map of the road surface generated in step 5 and the moving target map generated in step 6 are simply superimposed and fused to generate a BEV label map containing four attributes: drivable area, lane line, vehicle, and pedestrian, as shown in Figure 1. Figure 7 As shown; the entire BEV label generation process is as follows Figure 8 That is, collect data from 6 cameras, annotate the road area of 6 images, generate masks based on the annotations, perform inverse perspective transformation on the masks, splice the masks after inverse perspective transformation, refine the BEV road label, collect lidar data, annotate the 3D bounding box of the point cloud moving target, rigidly transform the 4 grounding points to the vehicle body coordinate system, project the point cloud to generate a moving target mask, and fuse the moving and static masks to generate the BEV label.
Claims
1. A method for generating bird's-eye view semantic segmentation labels based on inverse perspective transformation and point cloud projection, It is characterized in that The following steps are involved: S01: Data collection, using synchronization signals to synchronize the camera and lidar data at the same time, and the timestamp difference of all camera and lidar sensor data at each moment does not exceed the set value; S02: Data annotation: joint annotation of m images and n point cloud data at the same time. The static area of the road surface is marked on the image, and the 3D bounding box of the dynamic object is marked on the point cloud. S03: Generate the road area of BEV label by inverse perspective transformation. Based on the inverse perspective transformation of affine geometry, the semantic segmentation labels of the road surface from each camera perspective are perspectively transferred to the BEV canvas and spliced, and the spliced images are processed in detail. S04: Generate BEV label moving target by projecting point cloud, transform point cloud into vehicle body coordinate system through rigid body transformation, and then project 3D bounding box onto BEV canvas through point projection transformation; S05: Merge road surface and moving targets: Merge the semantic segmentation labels generated by S03 and S04 to obtain a complete high-precision BEV label.
2. According to the method for generating bird's-eye view semantic segmentation labels based on inverse perspective transformation and point cloud projection according to claim 1, It is characterized in that S01 also includes sensor configuration and calibration. The sensors are cameras and lidars, which are arranged on the data collection vehicle. The calibration uses a camera calibration board to calibrate the external parameters of each camera relative to the vehicle body and its own internal parameters, and uses a joint calibration method of camera and lidar to calibrate the external parameters of the lidar relative to the vehicle body.
3. According to the method for generating bird's-eye view semantic segmentation labels based on inverse perspective transformation and point cloud projection according to claim 2, It is characterized in that The cameras are distributed around the vehicle body, and the viewing angles of each camera partially overlap. The laser radar is mounted on the top of the vehicle body, with a horizontal FOV of 360 degrees and a vertical FOV of -20 degrees to 20 degrees. The external parameters are the yaw angle yaw, pitch angle pitch, roll angle roll, translation distance tx, translation distance ty, and translation distance tz of the camera relative to the vehicle body. The internal parameters are the pixel scale f in the x and y directions of the camera. x 、f y and pixel center p x 、p y ; The projection matrix from the body coordinate system to the camera pixel coordinate system is obtained through external parameters and internal parameters, and the transformation derivation formula is: R=R yaw R pitch R roll , Among them, R is the rigid body rotation matrix, the rotation direction is from the body coordinate system to the camera coordinate system, T is the translation matrix, the translation direction is from the body coordinate system to the camera coordinate system; K is the intrinsic parameter matrix composed of the camera intrinsic parameters, R, T, and K together form a 3x4 projection matrix P, which transforms the homogeneous coordinates of a point in the vehicle body coordinate system into Projected to pixel coordinates on the camera pixel plane, Z c The depth of this point in camera coordinates.
4. The method for generating bird's-eye view semantic segmentation labels based on inverse perspective transformation and point cloud projection according to claim 1, It is characterized in that In the S02, six images and one point cloud data at the same time are jointly annotated, wherein only the road surface area is marked on the image, including the drivable area and the road lane lines; and the pedestrians and vehicles of the moving targets are marked on the point cloud.
5. The method for generating bird's-eye view semantic segmentation labels based on inverse perspective transformation and point cloud projection according to claim 3, It is characterized in that A point (u, v) on the road surface in the camera image corresponds to a road surface point in the vehicle body coordinate system: The subscript r represents road, Z r is 0, the pixel coordinate system of the canvas (u r ,v r ) and the body coordinate system road point The relationship is: Among them, W target , H target is the width and height of the BEV canvas, ppx target 、ppy target is the number of pixels per meter in the width and height directions of the BEV canvas, and the relationship between the pixel coordinates of the camera road point and the pixel coordinates of the BEV road point: PM is a 3x3 square matrix and is reversible, so we get Where P∈{P 1 ,P 2 ,P 3 ,P 4 ,P 5 ,P 6 }, which is the projection matrix of the six surrounding cameras, where the P and M matrices are known quantities, (u, v) is the road pixel coordinate point given on the camera original image, and its corresponding homogeneous coordinate of the projected pixel point on the BEV canvas The pixel coordinates are:
6. The method for generating bird's-eye view semantic segmentation labels based on inverse perspective transformation and point cloud projection according to claim 5, It is characterized in that In the S04, the coordinates of the four grounding points of the marked 3D bounding box of each moving target are transformed into the vehicle body coordinate system by rigid body transformation, and the transformation is performed according to the following formula: This formula transforms the four ground points of the bounding box of each moving target in the lidar coordinate system into the four ground points in the vehicle body coordinate system, projects the four ground points onto the BEV graph, generates an enclosing matrix on the graph, and then generates the label of the moving target on the BEV canvas.
7. The method for generating bird's-eye view semantic segmentation labels based on inverse perspective transformation and point cloud projection according to claim 6, It is characterized in that The generated static BEV map of the road surface and the generated dynamic target map are superimposed and fused to generate a BEV label map including the drivable area, lane lines, vehicles, and pedestrian attributes.
