Training method of ground depth measurement model, ground depth measurement method and device

By training target markers in sample images, predicting and adjusting ground depth information solves the problems of high cost and low accuracy in ground depth measurement, achieving efficient and accurate ground depth measurement.

CN117669760BActive Publication Date: 2026-11-24MOMENTA (SUZHOU) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211042030.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-29
Publication Date
2026-11-24
Estimated Expiration
2042-08-29

AI Technical Summary

Technical Problem

Existing ground depth measurement methods are costly and have low accuracy, especially those that rely solely on binocular camera pixel matching, which suffer from parallax map errors.

Method used

By acquiring multiple training sample images, a ground depth measurement model is trained using target markers (depth values, lane lines, and horizon). The radial depth, centerline depth, and horizon information are predicted and adjusted. The target loss value is calculated, and the model parameters are optimized until the preset conditions are met.

Benefits of technology

It achieves high-accuracy ground depth measurement, reduces costs, does not rely on expensive LiDAR, and improves the measurement accuracy and training efficiency of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117669760B_ABST
    Figure CN117669760B_ABST
Patent Text Reader

Abstract

This application discloses a training method for a ground depth measurement model, a ground depth measurement method, and an apparatus, which can solve the problems of high cost and low accuracy in ground depth measurement. The model training method includes: acquiring multiple training sample images including target markers; during the training of an initial ground depth measurement model based on the multiple training sample images, predicting the radial depth information, centerline depth information of the current lane, initial ground depth information of the current lane, and horizon information of the training sample images based on at least one of the target markers; adjusting the initial ground depth information based on the predicted information to obtain the target ground depth information of the current lane; and adjusting the model parameters of the initial ground depth measurement model based on the target ground depth information and its corresponding ground depth ground value, until the target loss value meets a preset loss condition, thereby obtaining the target ground depth measurement model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and more specifically, to a training method for a ground depth measurement model, a ground depth measurement method, and an apparatus. Background Technology

[0002] Constructing 3D scenes, especially 3D terrain, is an essential part of intelligent navigation and autonomous driving. Measuring the ground depth at any point on the ground greatly facilitates the construction of 3D scenes. Ground depth refers to the distance from that point to the vehicle's sensors needed to construct the 3D scene.

[0003] The methods for measuring ground depth in related technologies mainly include: (1) directly detecting the ground depth based on lidar; (2) determining the disparity map by matching the pixels of the left and right images acquired by a binocular camera, and calculating the ground depth based on the disparity map. However, lidar is expensive, and simply determining the disparity map by matching the pixels of the left and right images may result in non-unique matching, leading to errors in the disparity map and thus inaccurate measurement of ground depth.

[0004] Therefore, it is urgent to find a way to provide a ground depth measurement method that is both cost-effective and highly accurate. Summary of the Invention

[0005] This application provides a training method for a ground depth measurement model, a ground depth measurement method, and an apparatus, which can solve the problems of high cost and low accuracy in ground depth measurement in related technologies.

[0006] The specific technical solution is as follows:

[0007] In a first aspect, embodiments of this application provide a method for training a ground depth measurement model, the method comprising:

[0008] Acquire multiple training sample images, where each training sample image includes target markers, which include depth value markers, lane line markers, and horizon markers for target pixels, and target pixels include pixels in the ground region;

[0009] During the training of the initial ground depth measurement model based on multiple training sample images, the radial depth information, centerline depth information of the current lane, initial ground depth information of the current lane, and horizon information of each training sample image are predicted according to at least one of the target labels. The radial depth information of the training sample image includes the depth value of each target pixel on the vertical line of the training sample image. The current lane is the lane that the acquisition vehicle travels in when acquiring the training sample image. The centerline depth information of the current lane includes the depth value of each target pixel on the centerline of the current lane. The initial ground depth information of the current lane includes the initial depth value of each target pixel in the ground region of the current lane.

[0010] For each training sample image, the initial ground depth information is adjusted based on the range defined by the horizon information, radial depth information, and centerline depth information to obtain the target ground depth information of the current lane in the training sample image. The target ground depth information of the current lane includes the final depth value of each target pixel in the ground region of the current lane.

[0011] Based on the target ground depth information and its corresponding ground depth true value, the target loss value of the initial ground depth measurement model is calculated, and the model parameters of the initial ground depth measurement model are adjusted based on the target loss value until the target loss value meets the preset loss condition, thus obtaining the target ground depth measurement model.

[0012] As can be seen from the above scheme, this embodiment of the application can train on training sample images containing depth value markers, lane line markers, and horizon markers. First, it predicts the radial depth information, the centerline depth information of the current lane, the initial ground depth information of the current lane, and the horizon information for each training sample image. Then, it adjusts the initial ground depth information based on the radial depth information, the centerline depth information of the current lane, and the horizon information to obtain more accurate target ground depth information. A target loss value is calculated based on the target ground depth information and the ground depth true value. The model parameters are adjusted based on the target loss value. Finally, through continuous training of the model, a target ground depth measurement model that meets the preset loss conditions is obtained, so that the ground depth of the target road image to be identified can be directly measured based on the target ground depth measurement model. Therefore, this embodiment of the application can train a high-quality target ground depth measurement model using only images captured by a monocular camera. Based on the target ground depth measurement model, the ground depth information contained in the image to be measured can be accurately identified without involving the problem of inaccurate pixel matching or relying on expensive LiDAR, thus improving accuracy and saving costs.

[0013] In a first possible implementation of the first aspect, where the target marker also includes a slope angle marker for the target pixel, the method further includes:

[0014] During the training of the initial ground depth measurement model based on multiple training sample images, the radial ground slope angle information of each training sample image is predicted according to the slope angle marker, and the centerline ground slope angle information of the current lane of each training sample image is predicted according to the slope angle marker and the lane line marker. The radial ground slope angle information includes the ground slope angle of each target pixel on the vertical line of the training sample image, and the centerline ground slope angle information includes the ground slope angle of each target pixel on the centerline of the current lane.

[0015] Based on the target ground depth information and its corresponding ground depth true value, the target loss value of the initial ground depth measurement model is calculated, including:

[0016] Based on the target ground depth information and its corresponding ground depth true value, the first loss value of the initial ground depth measurement model is calculated; based on the radial ground slope angle information and its corresponding radial ground slope angle true value, the second loss value of the initial ground depth measurement model is calculated; and based on the centerline ground slope angle information and its corresponding centerline ground slope angle true value, the third loss value of the initial ground depth measurement model is calculated.

[0017] The sum of the first loss value, the second loss value, and the third loss value is determined as the target loss value.

[0018] As can be seen from the above scheme, the embodiments of this application can also add slope angle markers of target pixels to the training sample images. Thus, during the model training process, the target loss value is no longer calculated solely based on the single dimension of target ground depth information. Instead, the radial ground slope angle information is predicted first based on the slope angle markers, and the centerline ground slope angle information of the current lane is predicted based on the slope angle markers and lane line markers. Then, the target loss value is calculated by combining the target ground depth information, radial ground slope angle information, centerline ground slope angle information, and their corresponding ground truth values. This improves the accuracy of the target loss value, thereby not only improving the accuracy of a single adjustment of model parameters and the measurement accuracy of the target ground depth measurement model, but also reducing the number of model adjustments and accelerating the model convergence efficiency.

[0019] In a second possible implementation of the first aspect, the method for determining depth value labels in training sample images includes:

[0020] Acquire multiple raw road images captured by the camera and the radar point cloud corresponding to each raw road image;

[0021] When the target pixel includes any pixel in the original road image, the radar point cloud is mapped to the corresponding original road image to obtain the depth value of each target pixel in the original road image, and the depth value is marked based on the depth value of the target pixel.

[0022] When the target pixel only includes pixels in the ground area, a first plane in the radar point cloud is fitted, and the radar point cloud in the first plane is mapped to the corresponding original road image to obtain the depth value of each target pixel in the original road image. The depth value is then labeled based on the depth value of the target pixel. The first plane is the largest plane obtained when fitting points with the same features in the radar point cloud.

[0023] As can be seen from the above scheme, the embodiments of this application can achieve depth value marking of the original road image by mapping radar point cloud to the original road image without manual intervention, thereby improving the efficiency of depth value marking.

[0024] In a third possible implementation of the first aspect, the method for determining the slope angle markers in the training sample images includes:

[0025] Based on the location information of the acquisition vehicle and the depth value of the target pixel when acquiring the original road image, the slope angle of the target pixel is calculated, and the slope angle is marked based on the slope angle of the target pixel.

[0026] As can be seen from the above scheme, the embodiments of this application can automatically mark the slope angle of the target pixel using vehicle positioning information and the depth value of the target pixel without manual intervention, thereby improving the efficiency of slope angle marking.

[0027] In the fourth possible implementation of the first aspect, the method for determining the horizon markers in the training sample images includes:

[0028] When the target pixel includes any pixel in the original road image, after mapping the radar point cloud to the corresponding original road image to obtain the first mapped point cloud, the second plane in the first mapped point cloud is fitted, and a horizontal line is drawn through the target pixel corresponding to the largest ordinate in the second plane to obtain the horizon mark. The second plane is the largest plane obtained when fitting points with the same features in the first mapped point cloud.

[0029] When the target pixels only include pixels in the ground area, after mapping the radar point cloud in the first plane to the corresponding original road image to obtain the second mapped point cloud, a horizontal line is drawn through the target pixel with the largest ordinate in the second mapped point cloud to obtain the horizon marker.

[0030] As can be seen from the above scheme, the embodiments of this application can automatically find the maximum vertical coordinate of the ground area in the original road image by fitting points with the same characteristics in the radar point cloud, or by performing planar fitting on the mapped point cloud after the radar point cloud is mapped to the original road image, and obtain the horizon mark by drawing a horizontal line based on the target pixel point corresponding to the maximum vertical coordinate, without the need for manual intervention, thereby improving the efficiency of horizon marking.

[0031] In the fifth possible implementation of the first aspect, the formulas for calculating the first loss value, the second loss value, or the third loss value satisfy:

[0032]

[0033] Where, when i = 1, x i This represents the difference between the target ground depth information and its corresponding true ground depth value. `smooth_i` represents the first loss value. When i = 2, `x`... i This represents the difference between the radial ground slope angle information and its corresponding true value, where smooth_i represents the second loss value. When i = 3, x i This represents the difference between the centerline ground slope angle information and its corresponding true value, with smooth_i representing the third loss value.

[0034] In the sixth possible implementation of the first aspect, before adjusting the initial ground depth information based on the horizon-defined range, radial depth information, and centerline depth information for each training sample image, the method further includes:

[0035] The initial ground depth information is smoothed according to the smoothing formula to obtain the smoothed initial ground depth information.

[0036] The smoothing formula satisfies:

[0037] D′(x,y)=(D(x0,y)-D(x,y)×(x-x0) a )+D(x,y)

[0038] Where x and y represent the horizontal and vertical coordinates of any target pixel, respectively, x0 represents the mean horizontal coordinate of the target pixel with vertical coordinate y, a represents the smoothing coefficient, D(x, y) represents the initial ground depth information of the target pixel with coordinates (x, y) before smoothing, D(x0, y) represents the initial ground depth information of the target pixel with coordinates (x0, y) before smoothing, and D′(x, y) represents the initial ground depth information of the target pixel with coordinates (x, y) after smoothing.

[0039] As can be seen from the above scheme, the embodiments of this application can first smooth the predicted initial ground depth information, and then adjust it after obtaining a smoother initial ground depth information that is closer to the real world, thereby improving the smoothness and accuracy of the target ground depth information.

[0040] Secondly, embodiments of this application provide a ground depth measurement method, the method comprising:

[0041] The target road image is processed based on the target ground depth measurement model to predict the radial depth information of the target road image, the centerline depth information of the target lane, the initial ground depth information of the target lane, and the horizon information of the target road image. The target ground depth measurement model is trained according to any of the possible implementation methods in the first aspect. The radial depth information of the target road image includes the depth value of each target pixel on the vertical line of the target road image. The target pixel includes the pixels in the ground area. The target lane is the lane that the target vehicle travels in when the target road image is acquired. The centerline depth information of the target lane includes the depth value of each target pixel on the centerline of the target lane. The initial ground depth information of the target lane includes the initial depth value of each target pixel in the ground area of ​​the target lane.

[0042] Based on the range defined by the horizon information of the target road image, the radial depth information of the target road image, and the centerline depth information of the target lane, the initial ground depth information of the target lane is adjusted to obtain the target ground depth information of the target lane in the target road image. The target ground depth information of the target lane includes the final depth value of each target pixel in the ground region of the target lane.

[0043] As can be seen from the above scheme, the embodiments of this application can utilize a target ground depth measurement model trained based on training sample images to first predict the radial depth information of the target road image, the centerline depth information of the target lane, the initial ground depth information of the target lane, and the horizon information of the target road image. Then, the initial ground depth information is adjusted according to the radial depth information, centerline depth information, and horizon information, thereby obtaining more accurate target ground depth information. Therefore, the embodiments of this application can train a high-quality target ground depth measurement model using only images captured by a monocular camera. Based on this model, the ground depth information contained in the image to be measured can be accurately identified without addressing the problem of inaccurate pixel matching or relying on expensive LiDAR, thus improving accuracy and saving costs.

[0044] In one possible implementation of the second aspect, before adjusting the initial ground depth information of the target lane based on the range defined by the horizon information of the target road image, the radial depth information of the target road image, and the centerline depth information of the target lane, the method further includes:

[0045] The initial ground depth information of the target lane is smoothed according to the smoothing formula to obtain the smoothed initial ground depth information of the target lane.

[0046] As can be seen from the above scheme, the embodiments of this application can first smooth the predicted initial ground depth information, and then adjust it after obtaining a smoother initial ground depth information that is closer to the real world, thereby improving the smoothness and accuracy of the target ground depth information.

[0047] Thirdly, embodiments of this application provide a training device for a ground depth measurement model, the device comprising:

[0048] The acquisition unit is used to acquire multiple training sample images, wherein each training sample image includes target markers, the target markers include depth value markers of target pixels, lane line markers and horizon markers, and the target pixels include pixels of the ground area;

[0049] The prediction unit is used to predict the radial depth information, centerline depth information of the current lane, initial ground depth information and horizon information of the current lane respectively according to the target marker during the training of the initial ground depth measurement model based on multiple training sample images. The radial depth information of the training sample image includes the depth value of each target pixel on the vertical line of the training sample image. The current lane is the lane that the acquisition vehicle travels in when acquiring the training sample image. The centerline depth information of the current lane includes the depth value of each target pixel on the centerline of the current lane. The initial ground depth information of the current lane includes the initial depth value of each target pixel in the ground region of the current lane.

[0050] The depth adjustment unit is used to adjust the initial ground depth information for each training sample image based on the range defined by the horizon information, radial depth information, and centerline depth information, so as to obtain the target ground depth information of the current lane in the training sample image. The target ground depth information of the current lane includes the final depth value of each target pixel in the ground region of the current lane.

[0051] The calculation unit is used to calculate the target loss value of the initial ground depth measurement model based on the target ground depth information and its corresponding ground depth true value.

[0052] The parameter adjustment unit is used to adjust the model parameters of the initial ground depth measurement model based on the target loss value until the target loss value meets the preset loss condition, thereby obtaining the target ground depth measurement model.

[0053] In a first possible implementation of the third aspect, the prediction unit is further configured to, when the target marker also includes a slope angle marker for the target pixel, predict the radial ground slope angle information of each training sample image based on the slope angle marker, and predict the centerline ground slope angle information of the current lane of each training sample image based on the slope angle marker and the lane line marker, during the training of the initial ground depth measurement model based on multiple training sample images. The radial ground slope angle information includes the ground slope angle of each target pixel on the vertical line of the training sample image, and the centerline ground slope angle information includes the ground slope angle of each target pixel on the centerline of the current lane.

[0054] The computing unit includes:

[0055] The first calculation module is used to calculate the first loss value of the initial ground depth measurement model based on the target ground depth information and its corresponding ground depth true value, calculate the second loss value of the initial ground depth measurement model based on the radial ground slope angle information and its corresponding radial ground slope angle true value, and calculate the third loss value of the initial ground depth measurement model based on the centerline ground slope angle information and its corresponding centerline ground slope angle true value.

[0056] The determination module is used to determine the sum of the first loss value, the second loss value, and the third loss value as the target loss value.

[0057] In a second possible implementation of the third aspect, the device further includes:

[0058] The first determining unit is used to determine the depth value labels in the training sample images;

[0059] The first defined unit includes:

[0060] The acquisition module is used to acquire multiple raw road images captured by the camera and the radar point cloud corresponding to each raw road image;

[0061] The depth value labeling module is used to map the radar point cloud to the corresponding original road image when the target pixel includes any pixel in the original road image, obtain the depth value of each target pixel in the original road image, and label the depth value based on the depth value of the target pixel; when the target pixel only includes pixels in the ground area, it fits a first plane in the radar point cloud, maps the radar point cloud in the first plane to the corresponding original road image, obtains the depth value of each target pixel in the original road image, and labels the depth value based on the depth value of the target pixel. The first plane is the largest plane obtained when fitting points with the same characteristics in the radar point cloud.

[0062] In a third possible implementation of the third aspect, the apparatus further includes:

[0063] The second determining unit is used to determine the slope angle markers in the training sample images;

[0064] The second determining unit includes:

[0065] The second calculation module is used to calculate the slope angle of the target pixel based on the positioning information of the acquisition vehicle and the depth value of the target pixel when acquiring the original road image;

[0066] The slope angle marking module is used to mark the slope angle based on the slope angle of the target pixel.

[0067] In a fourth possible implementation of the third aspect, the device further includes:

[0068] The third determining unit is used to determine the horizon marker in the training sample image;

[0069] The third determining unit includes:

[0070] The first horizon marking module is used to obtain a first mapped point cloud after mapping the radar point cloud to the corresponding original road image when the target pixel includes any pixel in the original road image. Then, it fits a second plane in the first mapped point cloud and draws a horizontal line through the target pixel with the largest ordinate in the second plane to obtain the horizon mark. The second plane is the largest plane obtained when fitting points with the same features in the first mapped point cloud.

[0071] The second horizon marker module is used to obtain a horizon marker by drawing a horizontal line through the target pixel corresponding to the maximum ordinate in the second mapped point cloud after mapping the radar point cloud in the first plane to the corresponding original road image to obtain the second mapped point cloud when the target pixel only includes pixels in the ground area.

[0072] In the fifth possible implementation of the third aspect, the formulas for calculating the first loss value, the second loss value, or the third loss value satisfy:

[0073]

[0074] Where, when i = 1, x i This represents the difference between the target ground depth information and its corresponding true ground depth value. `smooth_i` represents the first loss value. When i = 2, x... i This represents the difference between the radial ground slope angle information and its corresponding true value, where smooth_i represents the second loss value. When i = 3, x i This represents the difference between the centerline ground slope angle information and its corresponding true value, with smooth_i representing the third loss value.

[0075] In the sixth possible implementation of the third aspect, the device further includes:

[0076] The smoothing unit is used to smooth the initial ground depth information according to the smoothing formula before adjusting the initial ground depth information based on the range defined by the horizon information, radial depth information and centerline depth information for each training sample image, so as to obtain the smoothed initial ground depth information.

[0077] The smoothing formula satisfies:

[0078] D′(x,y)=(D(x0,y)-D(x,y)×(x-x0) a )+D(x,y)

[0079] Where x and y represent the horizontal and vertical coordinates of any target pixel, respectively, x0 represents the mean horizontal coordinate of the target pixel with vertical coordinate y, a represents the smoothing coefficient, D(x, y) represents the initial ground depth information of the target pixel with coordinates (x, y) before smoothing, D(x0, y) represents the initial ground depth information of the target pixel with coordinates (x0, y) before smoothing, and D′(x, y) represents the initial ground depth information of the target pixel with coordinates (x, y) after smoothing.

[0080] The ground depth measurement model training device provided in this application embodiment can train on training sample images containing depth value markers, lane line markers, and horizon markers. First, it predicts the radial depth information, the centerline depth information of the current lane, the initial ground depth information of the current lane, and the horizon information for each training sample image. Then, it adjusts the initial ground depth information based on the radial depth information, the centerline depth information of the current lane, and the horizon information to obtain more accurate target ground depth information. A target loss value is calculated based on the target ground depth information and the true ground depth value. The model parameters are adjusted based on the target loss value. Finally, through continuous training, a target ground depth measurement model that meets preset loss conditions is obtained, allowing for subsequent direct ground depth measurement of the target road image to be identified based on the target ground depth measurement model. Therefore, this application embodiment can train a high-quality target ground depth measurement model using only images captured by a monocular camera. Based on this model, the ground depth information contained in the image to be measured can be accurately identified without addressing pixel matching inaccuracies or relying on expensive LiDAR, thus improving accuracy and saving costs.

[0081] Fourthly, embodiments of this application provide a ground depth measuring device, the device comprising:

[0082] The prediction unit is used to process the target road image based on the target ground depth measurement model, and predict the radial depth information of the target road image, the centerline depth information of the target lane, the initial ground depth information of the target lane, and the horizon information of the target road image, respectively. The target ground depth measurement model is trained according to any possible implementation method in the first aspect. The radial depth information of the target road image includes the depth value of each target pixel on the vertical line of the target road image. The target pixel includes the pixels in the ground area. The target lane is the lane that the target vehicle travels in when the target road image is acquired. The centerline depth information of the target lane includes the depth value of each target pixel on the centerline of the target lane. The initial ground depth information of the target lane includes the initial depth value of each target pixel in the ground area of ​​the target lane.

[0083] The adjustment unit is used to adjust the initial ground depth information of the target lane based on the range defined by the horizon information of the target road image, the radial depth information of the target road image, and the centerline depth information of the target lane, so as to obtain the target ground depth information of the target lane in the target road image. The target ground depth information of the target lane includes the final depth value of each target pixel in the ground region of the target lane.

[0084] In one possible implementation of the fourth aspect, the apparatus includes:

[0085] The smoothing unit is used to smooth the initial ground depth information of the target lane according to the smoothing formula before adjusting the initial ground depth information of the target lane based on the horizon information defined by the target road image, the radial depth information of the target road image, and the centerline depth information of the target lane, so as to obtain the smoothed initial ground depth information of the target lane.

[0086] The ground depth measurement device provided in this application embodiment can first predict the radial depth information of the target road image, the centerline depth information of the target lane, the initial ground depth information of the target lane, and the horizon information of the target road image using a target ground depth measurement model trained based on training sample images. Then, the initial ground depth information is adjusted based on the radial depth information, centerline depth information, and horizon information, thereby obtaining more accurate target ground depth information. Therefore, this application embodiment can train a high-quality target ground depth measurement model using only images captured by a monocular camera. Based on this model, the ground depth information contained in the image under test can be accurately identified without addressing pixel matching inaccuracies or relying on expensive LiDAR, thus improving accuracy and saving costs.

[0087] Fifthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any possible implementation of the first or second aspect.

[0088] Sixthly, embodiments of this application provide an electronic device, which includes:

[0089] One or more processors;

[0090] The processor is coupled to a storage device, which stores one or more programs.

[0091] When one or more programs are executed by one or more processors, the electronic device performs the method as described in either the first aspect or the second aspect.

[0092] In a seventh aspect, embodiments of this application provide a vehicle that includes the means as described in any possible implementation of the third or fourth aspect, or the electronic equipment as described in the sixth aspect.

[0093] Eighthly, embodiments of this application provide a computer program product containing instructions that, when executed on a computer or processor, cause the computer or processor to perform the method described in any possible implementation of the first or second aspect. Attached Figure Description

[0094] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0095] Figure 1 A flowchart illustrating a training method for a ground depth measurement model provided in an embodiment of this application;

[0096] Figure 2 An example diagram of a horizon provided for an embodiment of this application;

[0097] Figure 3 A schematic flowchart illustrating a ground depth measurement method provided in an embodiment of this application;

[0098] Figure 4 A block diagram illustrating the composition of a training device for a ground depth measurement model provided in this application embodiment;

[0099] Figure 5 A block diagram illustrating the composition of a ground depth measuring device provided in this application embodiment;

[0100] Figure 6 This is a block diagram illustrating the composition of an electronic device or computer device provided in an embodiment of this application. Detailed Implementation

[0101] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0102] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The terms "comprising" and "having," and any variations thereof, in the embodiments and drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0103] Figure 1This is a flowchart illustrating a training method for a ground depth measurement model provided in an embodiment of this application. This method can be applied to electronic devices or computer equipment, specifically to vehicles or servers, and may include the following steps:

[0104] S110: Obtain multiple training sample images.

[0105] Each training sample image includes target markers, which include depth value markers, lane line markers, and horizon markers for target pixels. Target pixels include pixels in the ground region.

[0106] The methods for determining each target marker are described below:

[0107] (I) Depth value marking

[0108] In this application embodiment, depth value markers can be added manually to the original road image or automatically to improve the efficiency of depth value markers.

[0109] The method for automatically adding depth value labels includes: acquiring multiple original road images captured by the camera and the radar point cloud corresponding to each original road image; when the target pixel includes any pixel in the original road image, mapping the radar point cloud to the corresponding original road image to obtain the depth value of each target pixel in the original road image, and labeling the depth value based on the depth value of the target pixel; when the target pixel only includes pixels in the ground area, fitting a first plane in the radar point cloud, mapping the radar point cloud in the first plane to the corresponding original road image to obtain the depth value of each target pixel in the original road image, and labeling the depth value based on the depth value of the target pixel, wherein the first plane is the largest plane obtained when fitting points with the same characteristics in the radar point cloud.

[0110] The camera can be a monocular camera, which can determine the correspondence between the original road image and the radar point cloud based on the acquisition time. That is, when the acquisition time is the same or the acquisition time difference is less than or equal to a preset time difference threshold, the original road image and the radar point cloud are determined to have a correspondence.

[0111] In practical applications, when labeling depth values ​​in the original road image, depth information can be labeled only for the ground area or for the entire road image. Therefore, the target pixel can include only pixels in the ground area or any pixel in the original road image. When the target pixel includes any pixel in the original road image, the radar point cloud can be directly mapped to the corresponding original road image. When the target pixel includes any pixel in the original road image, a first plane (i.e., the ground area) can be fitted first, and then the radar point cloud in the first plane can be mapped to the corresponding original road image.

[0112] Methods for mapping radar point clouds to original road images include: transforming the radar point cloud from the radar coordinate system to the image coordinate system based on lidar calibration parameters. After mapping the radar point cloud to the original road image, there may be situations where mapped points jump out of the original road image or where there are missing mapped points in the original road image. Therefore, the problem of missing mapped points can be solved by cropping the mapped points according to the size of the original road image, and the problems of missing or sparse mapped points can be solved by adding mapped points through nearest neighbor interpolation.

[0113] Furthermore, methods for fitting the first plane include, but are not limited to, the RANSAC (Random Sample Consensus) algorithm.

[0114] (ii) Lane markings

[0115] The embodiments of this application allow lane lines to be marked manually in the original road image.

[0116] (III) Horizon Marker

[0117] like Figure 2 As shown, the horizon can also be called the ground cutoff line, that is, the boundary line between the ground and the sky. In this application embodiment, horizon markers can be added manually to the original road image, or they can be added automatically to improve the efficiency of horizon marker addition.

[0118] The method for automatically adding horizon markers includes: when the target pixel includes any pixel in the original road image, after mapping the radar point cloud to the corresponding original road image to obtain a first mapped point cloud, a second plane in the first mapped point cloud is fitted, and a horizontal line is drawn through the target pixel corresponding to the largest ordinate in the second plane to obtain the horizon marker. Here, the second plane is the largest plane obtained when fitting points with the same characteristics in the first mapped point cloud. When the target pixel only includes pixels in the ground area, after mapping the radar point cloud in the first plane to the corresponding original road image to obtain a second mapped point cloud, a horizontal line is drawn through the target pixel corresponding to the largest ordinate in the second mapped point cloud to obtain the horizon marker. Methods for fitting the second plane include, but are not limited to, the RANSAC algorithm.

[0119] As can be seen from the above scheme, the embodiments of this application can automatically find the maximum vertical coordinate of the ground area in the original road image by fitting points with the same characteristics in the radar point cloud, or by performing planar fitting on the mapped point cloud after the radar point cloud is mapped to the original road image, and obtain the horizon mark by drawing a horizontal line based on the target pixel point corresponding to the maximum vertical coordinate, without the need for manual intervention, thereby improving the efficiency of horizon marking.

[0120] It should be noted that this embodiment only illustrates the example of adding the aforementioned target markers to the original road image. In reality, the target markers may be added simultaneously or in a certain order, such as manually adding lane line markers first, followed by depth value markers and horizon markers in sequence. However, this embodiment does not limit the order in which the target markers are added.

[0121] S120: During the training of the initial ground depth measurement model based on multiple training sample images, the radial depth information, centerline depth information of the current lane, initial ground depth information of the current lane, and horizon information of each training sample image are predicted according to at least one of the target labels.

[0122] The radial depth information of the training sample image includes the depth value of each target pixel on the vertical axis of the training sample image. The current lane is the lane the acquisition vehicle traveled in when acquiring the training sample image. The centerline depth information of the current lane includes the depth value of each target pixel on the centerline of the current lane. The initial ground depth information of the current lane includes the initial depth value of each target pixel in the ground region of the current lane. Generally, the area encompassed by a lane belongs to the ground region. The horizon information includes the pixel coordinates of each target pixel on the horizon in the image.

[0123] In this embodiment, the radial depth information of each training sample image can be predicted based on the depth value marker of the target pixel, the centerline depth information and the initial ground depth information of the current lane in each training sample image can be predicted based on the depth value marker of the target pixel and the lane line marker, and the horizon information can be predicted based on the horizon marker.

[0124] S130: For each training sample image, the initial ground depth information is adjusted based on the range defined by the horizon information, the radial depth information, and the centerline depth information to obtain the target ground depth information of the current lane in the training sample image.

[0125] To improve the accuracy of ground depth information, the initial map depth information can be adjusted based on horizon information, radial depth information, and centerline depth information. Specific adjustment methods include, but are not limited to, weighting the radial depth information, centerline depth information, and initial ground depth information within a range defined by the horizon information.

[0126] The formula for weighted calculation satisfies:

[0127] Depth(x, y) y≤l(x) =αD1(y)+βD2(y)+γD(x,y)

[0128] Where l(x) represents horizon information, D1(y) represents radial depth information, D2(y) represents centerline depth information of the current lane, D(x, y) represents initial ground depth information, and α, β and γ represent weighting coefficients, which can be adjusted automatically through learning during the initial ground depth measurement model training process.

[0129] This weighted formula means that all target ground depth information corresponding to the horizon information that exceeds the vertical coordinate y can be assigned a value of 0, and the target ground depth information of the pixels within the horizon information can be calculated using the above weighted formula.

[0130] S140: Based on the target ground depth information and its corresponding ground depth true value, calculate the target loss value of the initial ground depth measurement model, and adjust the model parameters of the initial ground depth measurement model based on the target loss value until the target loss value meets the preset loss condition, and obtain the target ground depth measurement model.

[0131] The ground depth ground truth refers to the true depth value of a target pixel on the ground. It can be obtained from LiDAR, i.e., by transforming the LiDAR point cloud to an image coordinate system to obtain the ground depth ground truth value of the corresponding target pixel. Alternatively, it can be measured manually. There are various loss functions for calculating the target loss value; for example, [the functions could be...].

[0132]

[0133] Wherein, smooth_1 represents the first loss value. In this embodiment of the application, the first loss value can be directly determined as the target loss value, and x1 represents the difference between the target ground depth information and its corresponding ground depth true value.

[0134] The preset loss condition can be either that the target loss value is less than the preset loss threshold, or that the target loss value of the loss function reaches its minimum value.

[0135] The ground depth measurement model training method provided in this application embodiment can be trained on training sample images containing depth value markers, lane line markers, and horizon markers. First, the radial depth information, centerline depth information of the current lane, initial ground depth information of the current lane, and horizon information of each training sample image are predicted. Then, the initial ground depth information is adjusted based on the radial depth information, centerline depth information of the current lane, and horizon information to obtain more accurate target ground depth information. A target loss value is calculated based on the target ground depth information and the ground depth true value. The model parameters are adjusted based on the target loss value. Finally, through continuous training of the model, a target ground depth measurement model that meets preset loss conditions is obtained, so that ground depth measurement of the target road image to be identified can be directly performed based on the target ground depth measurement model. Therefore, this application embodiment can train a high-quality target ground depth measurement model using only images captured by a monocular camera. Based on the target ground depth measurement model, the ground depth information contained in the image to be measured can be accurately identified without involving pixel matching inaccuracies or relying on expensive LiDAR, thus improving accuracy and saving costs.

[0136] It should be added that although LiDAR is required when automatically adding target markers and automatically obtaining ground truth, this data is only the values ​​that need to be prepared before model training. LiDAR data is not involved in the entire model training process or the process of identifying ground depth based on the model. Therefore, the embodiments of this application can be applied to user vehicles without LiDAR. That is, when the user's vehicle does not have LiDAR, automatic ground depth measurement can also be achieved based on the embodiments of this application.

[0137] In one embodiment, the target marker may further include a slope angle marker for the target pixel. Furthermore, when the slope angle marker for the target pixel is included, during the training of the initial ground depth measurement model based on multiple training sample images, the radial ground slope angle information of each training sample image can be predicted based on the slope angle marker, and the centerline ground slope angle information of the current lane in each training sample image can be predicted based on the slope angle marker and the lane line marker. The radial ground slope angle information includes the ground slope angle of each target pixel on the perpendicular bisector of the training sample image, and the centerline ground slope angle information includes the ground slope angle of each target pixel on the centerline of the current lane.

[0138] When calculating the target loss value, a first loss value for the initial ground depth measurement model can be calculated based on the target ground depth information and its corresponding ground depth true value. A second loss value can be calculated based on the radial ground slope angle information and its corresponding radial ground slope angle true value. A third loss value can be calculated based on the centerline ground slope angle information and its corresponding centerline ground slope angle true value. The sum of the first, second, and third loss values ​​is determined as the target loss value. Specifically, the radial ground slope angle true value is the ground slope angle true value of each target pixel on the perpendicular bisector of the training sample image, and the centerline ground slope angle true value is the ground slope angle true value of each target pixel on the centerline of the current lane.

[0139] The formulas for calculating the first loss value, the second loss value, or the third loss value satisfy:

[0140]

[0141] Where, when i = 1, x i This represents the difference between the target ground depth information and its corresponding true ground depth value. `smooth_i` represents the first loss value. When i = 2, `x`... i This represents the difference between the radial ground slope angle information and its corresponding true value, where smooth_i represents the second loss value. When i = 3, x i This represents the difference between the centerline ground slope angle information and its corresponding true value, with smooth_i representing the third loss value.

[0142] The method for determining the slope angle marker in the training sample image includes: calculating the slope angle of the target pixel based on the positioning information of the acquisition vehicle and the depth value of the target pixel when acquiring the original road image, and marking the slope angle based on the slope angle of the target pixel.

[0143] When the vehicle's location information is represented by v(vx, vy, vz) and the depth value of the target pixel is represented by p(px, py, pz), the formula for calculating the slope angle roll includes: roll = arcsin((pz - vz) / (dist(v, p))).

[0144] dist(v, p) = [(px - vx)] 2 +(pz-vz) 2 ] 0.5

[0145] Where dist(v, p) represents the Euclidean distance.

[0146] As can be seen from the above scheme, the embodiments of this application can also add slope angle markers for target pixels in the training sample images. Therefore, during model training, the target loss value is no longer calculated solely based on the single dimension of target ground depth information. Instead, the radial ground slope angle information is predicted first based on the slope angle markers, and the centerline ground slope angle information of the current lane is predicted based on the slope angle markers and lane line markers. Then, the target loss value is calculated by combining the target ground depth information, radial ground slope angle information, centerline ground slope angle information, and their corresponding ground truth values. This improves the accuracy of the target loss value, thereby not only improving the accuracy of a single model parameter adjustment and the measurement precision of the target ground depth measurement model, but also reducing the number of model adjustments and accelerating model convergence. Furthermore, when marking slope angles, the vehicle positioning information and the depth value of the target pixel can be used to automatically mark the slope angle of the target pixel without manual intervention, thus improving the efficiency of slope angle marking.

[0147] In one embodiment, in order to make the initial ground depth information smoother and closer to the ground depth in the real world, thereby improving the smoothness and accuracy of the target ground depth information, this application embodiment can first smooth the initial ground depth information according to the smoothing formula before adjusting the initial ground depth information based on the range defined by the horizon information, radial depth information and centerline depth information for each training sample image, to obtain the smoothed initial ground depth information, and then adjust the smoothed initial ground depth information based on the range defined by the horizon information, radial depth information and centerline depth information for each training sample image.

[0148] The smoothing formula satisfies:

[0149] D′(x,y)=(D(x0,y)-D(x,y)×(x-x0) a )+D(x,y)

[0150] Where x and y represent the horizontal and vertical coordinates of any target pixel, respectively, x0 represents the mean horizontal coordinate of the target pixel with vertical coordinate y, and a represents the smoothing coefficient, which can be adjusted automatically through learning during the initial ground depth measurement model training process. D(x, y) represents the initial ground depth information of the target pixel with coordinates (x, y) before smoothing, D(x0, y) represents the initial ground depth information of the target pixel with coordinates (x0, y) before smoothing, and D′(x, y) represents the initial ground depth information of the target pixel with coordinates (x, y) after smoothing.

[0151] Based on the above embodiments, another embodiment of this application provides a ground depth measurement method, which can be applied to electronic devices or computer equipment, specifically to vehicles or servers, such as... Figure 3 As shown, the method includes:

[0152] S210: Based on the target ground depth measurement model, the target road image is processed to predict the radial depth information of the target road image, the centerline depth information of the target lane, the initial ground depth information of the target lane, and the horizon information of the target road image.

[0153] The target ground depth measurement model is trained according to the training method of the ground depth measurement model described above. The radial depth information of the target road image includes the depth value of each target pixel on the vertical line of the target road image. The target pixel includes pixels in the ground area. The target lane is the lane that the target vehicle travels in when acquiring the target road image. The centerline depth information of the target lane is the depth information of each target pixel on the centerline of the target lane. The centerline depth information of the target lane includes the depth value of each target pixel on the centerline of the target lane. The initial ground depth information of the target lane includes the initial depth value of each target pixel in the ground area of ​​the target lane.

[0154] When this application embodiment is applied to a server, the target vehicle can send the collected target road image to the server. The server, through this application embodiment, identifies the target ground depth information of the target lane in the target road image, and constructs a 3D scene based on the target ground depth information, such as constructing 3D lane lines. Alternatively, the server can feed back the target ground depth information to the target vehicle so that the target vehicle can construct a 3D scene based on the target ground depth information. When this application embodiment is applied to a target vehicle, the target vehicle identifies the target ground depth information of the target lane in the target road image it has collected, and constructs a 3D scene based on the target ground depth information, or sends the target ground depth information to the server so that the server can construct a 3D scene.

[0155] S220: Based on the range defined by the horizon information of the target road image, the radial depth information of the target road image, and the centerline depth information of the target lane, adjust the initial ground depth information of the target lane to obtain the target ground depth information of the target lane in the target road image.

[0156] The target ground depth information of the target lane includes the final depth value of each target pixel in the ground region of the target lane. Methods for adjusting the initial ground depth information of the target lane include, but are not limited to: weighting the radial depth information of the target road image, the centerline depth information of the target lane, and the initial ground depth information of the target lane based on the range defined by the horizon information of the target road image.

[0157] The formula for weighted calculation is the same as that used in the model training method described above. The weight coefficients α, β, and γ involved are the weight coefficients used in the final trained target ground depth measurement model.

[0158] The ground depth measurement method provided in this application can first predict the radial depth information of the target road image, the centerline depth information of the target lane, the initial ground depth information of the target lane, and the horizon information of the target road image using a target ground depth measurement model trained based on training sample images. Then, the initial ground depth information is adjusted according to the radial depth information, centerline depth information, and horizon information, thereby obtaining more accurate target ground depth information. Therefore, this application embodiment can train a high-quality target ground depth measurement model using only images captured by a monocular camera. Based on the target ground depth measurement model, the ground depth information contained in the image to be measured can be accurately identified without involving pixel matching inaccuracies or relying on expensive LiDAR, thus improving accuracy and saving costs.

[0159] In one embodiment, to further smooth the initial ground depth information and make it closer to the ground depth in the real world, thereby improving the smoothness and accuracy of the target ground depth information, this embodiment can first smooth the initial ground depth information of the target lane according to a smoothing formula before adjusting it based on the range defined by the horizon information of the target road image, the radial depth information of the target road image, and the centerline depth information of the target lane. This results in smoothed initial ground depth information of the target lane. Then, the initial ground depth information of the target lane is adjusted based on the range defined by the horizon information of the target road image, the radial depth information of the target road image, and the centerline depth information of the target lane. The smoothing formula used in this embodiment is the same as the smoothing formula used in the model training embodiment described above, and will not be repeated here.

[0160] Corresponding to the above method embodiments, another embodiment of this application provides a training device for a ground depth measurement model, such as... Figure 4 As shown, the device includes:

[0161] The acquisition unit 30 is used to acquire multiple training sample images, wherein each training sample image includes target markers, the target markers include depth value markers of target pixels, lane line markers and horizon markers, and the target pixels include pixels of the ground area;

[0162] The prediction unit 32 is used to predict the radial depth information, the centerline depth information of the current lane, the initial ground depth information and the horizon information of each training sample image according to the target marker during the training of the initial ground depth measurement model based on multiple training sample images. The radial depth information of the training sample image includes the depth value of each target pixel on the vertical line of the training sample image. The current lane is the lane that the acquisition vehicle travels in when acquiring the training sample image. The centerline depth information of the current lane includes the depth value of each target pixel on the centerline of the current lane. The initial ground depth information of the current lane includes the initial depth value of each target pixel in the ground region of the current lane.

[0163] The depth adjustment unit 34 is used to adjust the initial ground depth information based on the range defined by the horizon information, the radial depth information and the centerline depth information for each training sample image, so as to obtain the target ground depth information of the current lane in the training sample image. The target ground depth information of the current lane includes the final depth value of each target pixel in the ground region of the current lane.

[0164] The calculation unit 36 ​​is used to calculate the target loss value of the initial ground depth measurement model based on the target ground depth information and its corresponding ground depth true value.

[0165] The parameter adjustment unit 38 is used to adjust the model parameters of the initial ground depth measurement model based on the target loss value until the target loss value meets the preset loss condition, thereby obtaining the target ground depth measurement model.

[0166] In one possible implementation, prediction unit 32 is further configured to, when the target marker also includes a slope angle marker for the target pixel, predict the radial ground slope angle information of each training sample image based on the slope angle marker during the training of the initial ground depth measurement model based on multiple training sample images, and predict the centerline ground slope angle information of the current lane of each training sample image based on the slope angle marker and the lane line marker, wherein the radial ground slope angle information includes the ground slope angle of each target pixel on the vertical line of the training sample image, and the centerline ground slope angle information includes the ground slope angle of each target pixel on the centerline of the current lane;

[0167] The computing unit 36 ​​includes:

[0168] The first calculation module is used to calculate the first loss value of the initial ground depth measurement model based on the target ground depth information and its corresponding ground depth true value, calculate the second loss value of the initial ground depth measurement model based on the radial ground slope angle information and its corresponding radial ground slope angle true value, and calculate the third loss value of the initial ground depth measurement model based on the centerline ground slope angle information and its corresponding centerline ground slope angle true value.

[0169] The determination module is used to determine the sum of the first loss value, the second loss value, and the third loss value as the target loss value.

[0170] In one possible implementation, the device further includes:

[0171] The first determining unit is used to determine the depth value labels in the training sample images;

[0172] The first defined unit includes:

[0173] The acquisition module is used to acquire multiple raw road images captured by the camera and the radar point cloud corresponding to each raw road image;

[0174] The depth value labeling module is used to map the radar point cloud to the corresponding original road image when the target pixel includes any pixel in the original road image, obtain the depth value of each target pixel in the original road image, and label the depth value based on the depth value of the target pixel; when the target pixel only includes pixels in the ground area, it fits a first plane in the radar point cloud, maps the radar point cloud in the first plane to the corresponding original road image, obtains the depth value of each target pixel in the original road image, and labels the depth value based on the depth value of the target pixel. The first plane is the largest plane obtained when fitting points with the same characteristics in the radar point cloud.

[0175] In one possible implementation, the device further includes:

[0176] The second determining unit is used to determine the slope angle markers in the training sample images;

[0177] The second determining unit includes:

[0178] The second calculation module is used to calculate the slope angle of the target pixel based on the positioning information of the acquisition vehicle and the depth value of the target pixel when acquiring the original road image;

[0179] The slope angle marking module is used to mark the slope angle based on the slope angle of the target pixel.

[0180] In one possible implementation, the device further includes:

[0181] The third determining unit is used to determine the horizon marker in the training sample image;

[0182] The third determining unit includes:

[0183] The first horizon marking module is used to obtain a first mapped point cloud after mapping the radar point cloud to the corresponding original road image when the target pixel includes any pixel in the original road image. Then, it fits a second plane in the first mapped point cloud and draws a horizontal line through the target pixel with the largest ordinate in the second plane to obtain the horizon mark. The second plane is the largest plane obtained when fitting points with the same features in the first mapped point cloud.

[0184] The second horizon marker module is used to obtain a horizon marker by drawing a horizontal line through the target pixel corresponding to the maximum ordinate in the second mapped point cloud after mapping the radar point cloud in the first plane to the corresponding original road image to obtain the second mapped point cloud when the target pixel only includes pixels in the ground area.

[0185] In one possible implementation, the formulas for calculating the first loss value, the second loss value, or the third loss value satisfy:

[0186]

[0187] Where, when i = 1, x i This represents the difference between the target ground depth information and its corresponding true ground depth value. `smooth_i` represents the first loss value. When i = 2, `x`... i This represents the difference between the radial ground slope angle information and its corresponding true value, where smooth_i represents the second loss value. When i = 3, x i This represents the difference between the centerline ground slope angle information and its corresponding true value, with smooth_i representing the third loss value.

[0188] In one possible implementation, the device further includes:

[0189] The smoothing unit is used to smooth the initial ground depth information according to the smoothing formula before adjusting the initial ground depth information based on the range defined by horizon information, radial depth information and centerline depth information for each training sample image, so as to obtain the smoothed initial ground depth information.

[0190] The smoothing formula satisfies:

[0191] D′(x,y)=(D(x0,y)-D(x,y)×(x-x0) a )+D(x,y)

[0192] Where x and y represent the horizontal and vertical coordinates of any target pixel, respectively, x0 represents the mean horizontal coordinate of the target pixel with vertical coordinate y, a represents the smoothing coefficient, D(x, y) represents the initial ground depth information of the target pixel with coordinates (x, y) before smoothing, D(x0, y) represents the initial ground depth information of the target pixel with coordinates (x0, y) before smoothing, and D′(x, y) represents the initial ground depth information of the target pixel with coordinates (x, y) after smoothing.

[0193] The ground depth measurement model training device provided in this application embodiment can train on training sample images containing depth value markers, lane line markers, and horizon markers. First, it predicts the radial depth information, the centerline depth information of the current lane, the initial ground depth information of the current lane, and the horizon information for each training sample image. Then, it adjusts the initial ground depth information based on the radial depth information, the centerline depth information of the current lane, and the horizon information to obtain more accurate target ground depth information. A target loss value is calculated based on the target ground depth information and the true ground depth value. The model parameters are adjusted based on the target loss value. Finally, through continuous training, a target ground depth measurement model that meets preset loss conditions is obtained, allowing for subsequent direct ground depth measurement of the target road image to be identified based on the target ground depth measurement model. Therefore, this application embodiment can train a high-quality target ground depth measurement model using only images captured by a monocular camera. Based on this model, the ground depth information contained in the image to be measured can be accurately identified without addressing pixel matching inaccuracies or relying on expensive LiDAR, thus improving accuracy and saving costs.

[0194] Corresponding to the above method embodiments, another embodiment of this application provides a ground depth measuring device, such as... Figure 5 As shown, the device includes:

[0195] The prediction unit 40 is used to process the target road image based on the target ground depth measurement model, and predict the radial depth information of the target road image, the centerline depth information of the target lane, the initial ground depth information of the target lane, and the horizon information of the target road image, respectively. The target ground depth measurement model is trained according to any embodiment of the above-mentioned ground depth measurement model training method. The radial depth information of the target road image includes the depth value of each target pixel on the vertical line of the target road image. The target pixel includes the pixel in the ground area. The target lane is the lane that the target vehicle travels in when the target road image is acquired. The centerline depth information of the target lane includes the depth value of each target pixel on the centerline of the target lane. The initial ground depth information of the target lane includes the initial depth value of each target pixel in the ground area of ​​the target lane.

[0196] The adjustment unit 42 is used to adjust the initial ground depth information of the target lane based on the range defined by the horizon information of the target road image, the radial depth information of the target road image, and the centerline depth information of the target lane, so as to obtain the target ground depth information of the target lane in the target road image. The target ground depth information of the target lane includes the final depth value of each target pixel in the ground region of the target lane.

[0197] In one possible implementation, the device includes:

[0198] The smoothing unit is used to smooth the initial ground depth information of the target lane according to the smoothing formula before adjusting the initial ground depth information of the target lane based on the range defined by the horizon information of the target road image, the radial depth information of the target road image, and the centerline depth information of the target lane, so as to obtain the smoothed initial ground depth information of the target lane.

[0199] The ground depth measurement device provided in this application embodiment can first predict the radial depth information of the target road image, the centerline depth information of the target lane, the initial ground depth information of the target lane, and the horizon information of the target road image using a target ground depth measurement model trained based on training sample images. Then, the initial ground depth information is adjusted based on the radial depth information, centerline depth information, and horizon information, thereby obtaining more accurate target ground depth information. Therefore, this application embodiment can train a high-quality target ground depth measurement model using only images captured by a monocular camera. Based on this model, the ground depth information contained in the image under test can be accurately identified without addressing pixel matching inaccuracies or relying on expensive LiDAR, thus improving accuracy and saving costs.

[0200] Based on the above method embodiments, another embodiment of this application provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method described in any of the above embodiments.

[0201] Based on the above method embodiments, another embodiment of this application provides an electronic device or computer device, such as... Figure 6 As shown, it includes:

[0202] One or more processors 50;

[0203] Processor 50 is coupled to storage device 52, which is used to store one or more programs.

[0204] When the one or more programs are executed by the one or more processors 50, the electronic device or computer device performs the method as described in any of the above embodiments.

[0205] Based on the above method embodiments, another embodiment of this application provides a vehicle that includes the apparatus as described in any of the above embodiments, or includes electronic equipment as described above.

[0206] The vehicle includes a camera, a CPU (Central Processing Unit), and a T-Box (Telematics Box). The camera is used to acquire road images. The CPU acquires the road images acquired by the camera and executes any embodiment of the above-described ground depth measurement model training method, or executes any embodiment of the above-described ground depth measurement method; alternatively, the T-Box acquires the road images acquired by the camera and sends them to a server, where the server executes any embodiment of the above-described ground depth measurement model training method, or executes any embodiment of the above-described ground depth measurement method. A GPS positioning device is used to obtain the vehicle's current geographical location.

[0207] Based on the above embodiments, another embodiment of this application provides a computer program product, which includes instructions that, when executed on a computer or processor, cause the computer or processor to perform the method described in any of the above embodiments.

[0208] The above-described apparatus embodiments correspond to the method embodiments and have the same technical effects. For detailed descriptions, please refer to the method embodiments. The apparatus embodiments are derived from the method embodiments; detailed descriptions can be found in the method embodiments section, and will not be repeated here. Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of one embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application.

[0209] Those skilled in the art will understand that the modules in the apparatus of the embodiments can be distributed in the apparatus of the embodiments as described in the embodiments, or they can be located in one or more devices different from this embodiment with corresponding changes. The modules of the above embodiments can be combined into one module, or they can be further divided into multiple sub-modules.

[0210] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A training method for a ground depth measurement model, characterized in that, The method includes: Multiple training sample images are acquired, wherein each training sample image includes a target marker, the target marker includes a depth value marker, a lane line marker, and a horizon marker for the target pixel, and the target pixel includes pixels in the ground region; During the training of the initial ground depth measurement model based on the multiple training sample images, the radial depth information of each training sample image is predicted according to the depth value marker in the target marker; the centerline depth information and the initial ground depth information of the current lane in each training sample image are predicted according to the depth value marker and the lane line marker; and the horizon information of each training sample image is predicted according to the horizon marker. The radial depth information of the training sample image includes the depth value of each target pixel on the perpendicular bisector of the training sample image. The current lane is the lane the acquisition vehicle travels on when acquiring the training sample image. The centerline depth information of the current lane includes the depth value of each target pixel on the centerline of the current lane. The initial ground depth information of the current lane includes the initial depth value of each target pixel in the ground region of the current lane. For each training sample image, the initial ground depth information is adjusted based on the range defined by the horizon information, the radial depth information, and the centerline depth information to obtain the target ground depth information of the current lane in the training sample image. The target ground depth information of the current lane includes the final depth value of each target pixel in the ground region of the current lane. Based on the target ground depth information and its corresponding ground depth true value, the target loss value of the initial ground depth measurement model is calculated, and the model parameters of the initial ground depth measurement model are adjusted based on the target loss value until the target loss value meets the preset loss condition, thus obtaining the target ground depth measurement model.

2. The method according to claim 1, characterized in that, If the target marker also includes a slope angle marker for the target pixel, the method further includes: During the training of the initial ground depth measurement model based on the multiple training sample images, the radial ground slope angle information of each training sample image is predicted according to the slope angle marker, and the centerline ground slope angle information of the current lane in each training sample image is predicted according to the slope angle marker and the lane line marker. The radial ground slope angle information includes the ground slope angle of each target pixel on the vertical line of the training sample image, and the centerline ground slope angle information includes the ground slope angle of each target pixel on the centerline of the current lane. The step of calculating the target loss value of the initial ground depth measurement model based on the target ground depth information and its corresponding ground depth true value includes: Based on the target ground depth information and its corresponding ground depth true value, the first loss value of the initial ground depth measurement model is calculated; based on the radial ground slope angle information and its corresponding radial ground slope angle true value, the second loss value of the initial ground depth measurement model is calculated; and based on the centerline ground slope angle information and its corresponding centerline ground slope angle true value, the third loss value of the initial ground depth measurement model is calculated. The sum of the first loss value, the second loss value, and the third loss value is determined as the target loss value.

3. The method according to claim 2, characterized in that, The method for determining the depth value label in the training sample image includes: Acquire multiple raw road images captured by the camera and the radar point cloud corresponding to each raw road image; When the target pixel includes any pixel in the original road image, the radar point cloud is mapped to the corresponding original road image to obtain the depth value of each target pixel in the original road image, and the depth value is marked based on the depth value of the target pixel. When the target pixel only includes pixels in the ground area, a first plane in the radar point cloud is fitted, and the radar point cloud in the first plane is mapped to the corresponding original road image to obtain the depth value of each target pixel in the original road image. The depth value is then marked based on the depth value of the target pixel. The first plane is the largest plane obtained when fitting points with the same characteristics in the radar point cloud.

4. The method according to claim 3, characterized in that, The method for determining the slope angle marker in the training sample image includes: Based on the positioning information of the acquisition vehicle and the depth value of the target pixel when acquiring the original road image, the slope angle of the target pixel is calculated, and the slope angle is marked based on the slope angle of the target pixel.

5. The method according to claim 3, characterized in that, The method for determining the horizon marker in the training sample image includes: When the target pixel includes any pixel in the original road image, after mapping the radar point cloud to the corresponding original road image to obtain the first mapped point cloud, a second plane in the first mapped point cloud is fitted, and a horizontal line is drawn through the target pixel corresponding to the largest ordinate in the second plane to obtain the horizon mark. The second plane is the largest plane obtained when fitting points with the same characteristics in the first mapped point cloud. When the target pixel only includes pixels in the ground area, after mapping the radar point cloud in the first plane to the corresponding original road image to obtain the second mapped point cloud, a horizontal line is drawn through the target pixel with the largest ordinate in the second mapped point cloud to obtain the horizon marker.

6. A method for measuring ground depth, characterized in that, The method includes: The target road image is processed based on the target ground depth measurement model to predict the radial depth information, centerline depth information, initial ground depth information, and horizon information of the target road image. The target ground depth measurement model is trained according to any one of claims 1-5. The radial depth information of the target road image includes the depth value of each target pixel on the vertical axis of the target road image, and the target pixels include pixels in the ground area. The target lane is the lane the target vehicle travels in when acquiring the target road image. The centerline depth information of the target lane includes the depth value of each target pixel on the centerline of the target lane. The initial ground depth information of the target lane includes the initial depth value of each target pixel in the ground area of ​​the target lane. Based on the range defined by the horizon information of the target road image, the radial depth information of the target road image, and the centerline depth information of the target lane, the initial ground depth information of the target lane is adjusted to obtain the target ground depth information of the target lane in the target road image. The target ground depth information of the target lane includes the final depth value of each target pixel in the ground region of the target lane.

7. The method according to claim 6, characterized in that, Before adjusting the initial ground depth information of the target lane based on the range defined by the horizon information of the target road image, the radial depth information of the target road image, and the centerline depth information of the target lane, the method further includes: The initial ground depth information of the target lane is smoothed according to the smoothing formula to obtain the smoothed initial ground depth information of the target lane.

8. A training device for a ground depth measurement model, characterized in that, The device includes: An acquisition unit is used to acquire multiple training sample images, wherein each training sample image includes a target marker, the target marker includes a depth value marker, a lane line marker, and a horizon marker for the target pixel, and the target pixel includes pixels in the ground area; The prediction unit is configured to, during the training of an initial ground depth measurement model based on the multiple training sample images, predict the radial depth information of each training sample image according to the depth value marker in the target marker, predict the centerline depth information and the initial ground depth information of the current lane in each training sample image according to the depth value marker and the lane line marker, and predict the horizon information of each training sample image according to the horizon marker. The radial depth information of the training sample image includes the depth value of each target pixel on the perpendicular bisector of the training sample image. The current lane is the lane the acquisition vehicle travels on when acquiring the training sample images. The centerline depth information of the current lane includes the depth value of each target pixel on the centerline of the current lane. The initial ground depth information of the current lane includes the initial depth value of each target pixel in the ground region of the current lane. A depth adjustment unit is used to adjust the initial ground depth information for each training sample image based on the range defined by the horizon information, the radial depth information, and the centerline depth information, to obtain the target ground depth information of the current lane in the training sample image. The target ground depth information of the current lane includes the final depth value of each target pixel in the ground region of the current lane. The calculation unit is used to calculate the target loss value of the initial ground depth measurement model based on the target ground depth information and its corresponding ground depth true value. The parameter adjustment unit is used to adjust the model parameters of the initial ground depth measurement model based on the target loss value until the target loss value meets the preset loss condition, thereby obtaining the target ground depth measurement model.

9. The apparatus according to claim 8, characterized in that, The prediction unit is further configured to, when the target marker also includes the slope angle marker of the target pixel, predict the radial ground slope angle information of each training sample image based on the slope angle marker during the training of the initial ground depth measurement model based on the multiple training sample images, and predict the centerline ground slope angle information of the current lane of each training sample image based on the slope angle marker and the lane line marker, wherein the radial ground slope angle information includes the ground slope angle of each target pixel on the perpendicular bisector of the training sample image, and the centerline ground slope angle information includes the ground slope angle of each target pixel on the centerline of the current lane; The computing unit includes: The first calculation module is used to calculate a first loss value of the initial ground depth measurement model based on the target ground depth information and its corresponding ground depth true value, calculate a second loss value of the initial ground depth measurement model based on the radial ground slope angle information and its corresponding radial ground slope angle true value, and calculate a third loss value of the initial ground depth measurement model based on the centerline ground slope angle information and its corresponding centerline ground slope angle true value. The determination module is used to determine the sum of the first loss value, the second loss value, and the third loss value as the target loss value.

10. The apparatus according to claim 9, characterized in that, The device further includes: The first determining unit is used to determine the depth value marker in the training sample image; The first determining unit includes: The acquisition module is used to acquire multiple original road images captured by the camera and the radar point cloud corresponding to each original road image; A depth value marking module is used to map the radar point cloud to the corresponding original road image when the target pixel includes any pixel in the original road image, obtain the depth value of each target pixel in the original road image, and mark the depth value based on the depth value of the target pixel; when the target pixel only includes pixels in the ground area, a first plane in the radar point cloud is fitted, the radar point cloud in the first plane is mapped to the corresponding original road image, the depth value of each target pixel in the original road image is obtained, and the depth value is marked based on the depth value of the target pixel, wherein the first plane is the largest plane obtained when fitting points with the same characteristics in the radar point cloud.

11. The apparatus according to claim 10, characterized in that, The device further includes: The second determining unit is used to determine the slope angle marker in the training sample image; The second determining unit includes: The second calculation module is used to calculate the slope angle of the target pixel based on the positioning information of the acquisition vehicle when acquiring the original road image and the depth value of the target pixel. The slope angle marking module is used to mark the slope angle based on the slope angle of the target pixel.

12. The apparatus according to claim 10, characterized in that, The device further includes: The third determining unit is used to determine the horizon marker in the training sample image; The third determining unit includes: The first horizon marking module is used to, when the target pixel includes any pixel in the original road image, after mapping the radar point cloud to the corresponding original road image to obtain the first mapped point cloud, fit a second plane in the first mapped point cloud, and draw a horizontal line through the target pixel corresponding to the largest ordinate in the second plane to obtain the horizon mark. The second plane is the largest plane obtained when fitting points with the same characteristics in the first mapped point cloud. The second horizon marker module is used to obtain the horizon marker by drawing a horizontal line through the target pixel corresponding to the maximum ordinate in the second mapped point cloud after mapping the radar point cloud in the first plane to the corresponding original road image to obtain the second mapped point cloud when the target pixel only includes the pixels in the ground area.

13. A ground depth measuring device, characterized in that, The device includes: The prediction unit is used to process a target road image based on a target ground depth measurement model, and predict the radial depth information of the target road image, the centerline depth information of the target lane, the initial ground depth information of the target lane, and the horizon information of the target road image, respectively. The target ground depth measurement model is trained according to any one of claims 1-5. The radial depth information of the target road image includes the depth value of each target pixel on the vertical axis of the target road image, and the target pixels include pixels in the ground area. The target lane is the lane the target vehicle travels in when acquiring the target road image. The centerline depth information of the target lane includes the depth value of each target pixel on the centerline of the target lane. The initial ground depth information of the target lane includes the initial depth value of each target pixel in the ground area of ​​the target lane. An adjustment unit is used to adjust the initial ground depth information of the target lane based on the range defined by the horizon information of the target road image, the radial depth information of the target road image, and the centerline depth information of the target lane, so as to obtain the target ground depth information of the target lane in the target road image. The target ground depth information of the target lane includes the final depth value of each target pixel in the ground region of the target lane.

14. The apparatus according to claim 13, characterized in that, The device further includes: A smoothing unit is configured to smooth the initial ground depth information of the target lane according to a smoothing formula before adjusting the initial ground depth information of the target lane based on the horizon information defined by the target road image, the radial depth information of the target road image, and the centerline depth information of the target lane, so as to obtain the smoothed initial ground depth information of the target lane.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-5 or any one of claims 6-7.

16. An electronic device, characterized in that, The electronic device includes: One or more processors; The processor is coupled to a storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the electronic device performs the method as claimed in any one of claims 1-5 or any one of claims 6-7.

17. A vehicle, characterized in that, The vehicle includes a device as claimed in any one of claims 8-12 or any one of claims 13-14, or includes an electronic device as claimed in claim 16.

Citation Information

Patent Citations

  • Road target depth estimation method based on scene depth mapping

    CN106204572A

  • Image depth estimation model training method and image depth information processing method

    CN112634343A