WO2022151664A1 - 一种基于单目摄像头的3d物体检测方法 - Google Patents

一种基于单目摄像头的3d物体检测方法 Download PDF

Info

Publication number
WO2022151664A1
WO2022151664A1 PCT/CN2021/102534 CN2021102534W WO2022151664A1 WO 2022151664 A1 WO2022151664 A1 WO 2022151664A1 CN 2021102534 W CN2021102534 W CN 2021102534W WO 2022151664 A1 WO2022151664 A1 WO 2022151664A1
Authority
WO
WIPO (PCT)
Prior art keywords
image data
depth
original image
point cloud
object detection
Prior art date
Application number
PCT/CN2021/102534
Other languages
English (en)
French (fr)
Inventor
黄梓航
伍小军
周航
刘妮妮
董萌
陈炫翰
Original Assignee
惠州市德赛西威汽车电子股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 惠州市德赛西威汽车电子股份有限公司 filed Critical 惠州市德赛西威汽车电子股份有限公司
Publication of WO2022151664A1 publication Critical patent/WO2022151664A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/64Three-dimensional objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering

Definitions

  • the invention relates to the technical field of 3D object detection, in particular to a 3D object detection method based on a monocular camera.
  • the present invention provides a 3D object detection method based on a monocular camera, the method comprising:
  • the target object is detected in the original image data
  • Project the target object into the corresponding predicted depth map generate an anchor area, and perform 3D reconstruction on the anchor area to obtain the three-dimensional coordinate value of the target object in the world coordinate system.
  • the step of establishing a depth estimation model includes:
  • the depth estimation model is calculated according to the Scale-invariant Error loss loss function.
  • step of establishing the depth estimation model before the step of detecting the target object in the original image data, it also includes the step of establishing an object detection model:
  • the object detection model is trained according to the Focal Loss loss function, and the object detection model is used to detect the target object in the original image data.
  • Focal Loss loss function is as follows:
  • the pt is the detection probability
  • the ⁇ is the inter-class parameter
  • (1-pt) ⁇ is the easy/hard sample adjustment factor
  • the step of acquiring several frames of original image data and depth image data matching each original image data, and establishing a training set includes:
  • a training set is established with several frames of original image data and depth image data matched with each original image data.
  • the step of projecting the three-dimensional point cloud in the lidar data into the image plane to form a point cloud map includes:
  • the rotation and translation matrix between the vehicle camera and the vehicle lidar is calculated by the joint calibration method
  • the three-dimensional point cloud in the lidar data is converted into a two-dimensional point cloud image.
  • the step of performing depth expansion processing on the point cloud image to obtain depth image data matching the original image data includes:
  • the point cloud image processed by the third kernel expansion is processed by the second dynamic blur to remove outliers;
  • a bilateral filter is used to remove outliers, keep local boundary features, and implement secondary inversion processing to obtain depth image data that matches the original image data.
  • the described utilizing the depth estimation model to obtain the predicted depth map step that matches with the original image data including:
  • Dense121Net is used as the encoding layer to extract the feature parameters in the original image data
  • Convolution calculations are performed on the concatenated layers to analyze the local structure to obtain the predicted depth map corresponding to the depth image data.
  • the encoding layer is decoded to obtain three branches, so as to extract relative local structural features under different sizes through the three branches, and connect the outputs of the three branches in series, and the unified size is the input image size, Get concatenated layer steps, including:
  • the estimated depth features generated by the first branch, the second branch and the third branch are concatenated, and the size is unified to the input image size, and the concatenated layer is obtained.
  • the characteristic parameters include image texture, color and spatial structure.
  • the invention discloses a 3D object detection method based on a monocular camera.
  • the 3D object detection method can complete the accurate detection of 3D objects only by means of a monocular camera, and the whole calculation process does not depend on the assumption that the road is completely smooth.
  • the detection accuracy has been significantly improved, which can provide more accurate reference data for the driver, which is conducive to improving driving safety, and at the same time significantly reduces the 3D object.
  • the detection cost has a very important use value.
  • FIG. 1 is a schematic flowchart of a 3D object detection method based on a monocular camera in Embodiment 1. As shown in FIG. 1
  • FIG. 2 is a schematic diagram of a process of establishing a training set in Embodiment 1.
  • FIG. 2 is a schematic diagram of a process of establishing a training set in Embodiment 1.
  • FIG. 3 is a schematic diagram of a 3D object detection method based on a monocular camera in Embodiment 1.
  • FIG. 4 is a schematic diagram of a specific flow of obtaining a predicted depth map by using a depth estimation model in Embodiment 1. As shown in FIG.
  • FIG. 5 is a schematic diagram of original image data and annotation information in Embodiment 1.
  • FIG. 5 is a schematic diagram of original image data and annotation information in Embodiment 1.
  • FIG. 6 is a schematic diagram of a predicted depth map and an anchor area in Embodiment 1.
  • FIG. 6 is a schematic diagram of a predicted depth map and an anchor area in Embodiment 1.
  • This embodiment provides a 3D object detection method based on a monocular camera, and the implementation of the method is mainly based on a vehicle-mounted camera and a vehicle-mounted lidar.
  • Vehicle cameras and vehicle lidars can be set to one or more, and the number is not limited.
  • the in-vehicle camera and the in-vehicle lidar should be installed on the same side of the test vehicle as possible, or in a similar position, so as to obtain the original image data and lidar data from the same angle.
  • a 3D object detection method based on a monocular camera includes the following steps:
  • the main purpose of building a depth estimation model is to quickly obtain a predicted depth map that matches the original image data.
  • it is first necessary to obtain several frames of original image data and depth image data matching each original image data, and establish a training set. Each frame of original image data in the training set and the corresponding depth image data constitute a sample. Then, using each sample in the training set as a training factor, the depth estimation model is calculated according to the Scale-invariant Error loss loss function.
  • the depth estimation model is used to obtain a predicted depth map that matches the original image data.
  • the prediction model is trained using the above-mentioned training set combined with the loss function to obtain the final depth estimation model.
  • the input of the depth estimation model is the original image data, and the depth estimation model can directly The feature parameters of , directly output the corresponding predicted depth map.
  • the pixel information in the predicted depth map refers to the distance between the object and the vehicle, so the depth estimation model is a model that measures the distance.
  • the Scale-invariant Error loss loss function is as follows:
  • Loss loss function
  • n is the effective pixel
  • d i represents the depth at position i
  • 0.5
  • a training set is established.
  • the matching mentioned here means that the shooting angles and shooting objects of the lidar data and the original image data are consistent with each other.
  • the lidar data and the original image data are processed in time synchronization to form a one-to-one correspondence, so as to ensure good simultaneity between the two, that is, to ensure that the shooting times of the two are also consistent.
  • the three-dimensional point cloud in the lidar data is projected into the image plane to form a point cloud map.
  • the depth image data matching the original image data can be obtained.
  • a training set can be formed by forming a data set with several frames of original image data and depth image data matched with each original image data.
  • the vehicle camera and the vehicle lidar will record the timestamp of each frame of the image respectively.
  • the internal parameter matrix of the vehicle camera needs to be obtained first (the internal parameter matrix of the camera is fixed, and can generally be directly obtained by the manufacturer. acquisition), and at the same time, the rotation and translation matrix between the vehicle camera and the vehicle lidar is calculated by the joint calibration method.
  • the three-dimensional point cloud in the lidar data is projected into the image plane to convert the three-dimensional point cloud in the lidar data into a two-dimensional point cloud image.
  • the pixel value is the depth information of the lidar point.
  • D inv 100 ⁇ D gt , where D gt represents the true depth value. For example, if the true depth value of D gt is set to 16m, then D inv is 84m. Then use a 5x5 kernel matrix with a value of 1 to perform the first kernel expansion process on the reversed point cloud image to complete the small hole closure. Then use the median filter (the kernel size is 5) to perform the first dynamic blurring to remove outliers on the point cloud image that has undergone the first kernel expansion processing.
  • the second kernel expansion process is performed on the point cloud image that has undergone the first motion blurring to remove outliers to complete the hole distance filling.
  • a 15x15 kernel with a value of 1 to perform a third kernel expansion process on the point cloud image processed by the second kernel expansion to complete the closure of large holes.
  • the median filter the kernel size is 5
  • a bilateral filter is used to remove outliers while maintaining local boundary features.
  • the depth estimation model When the depth estimation model is established, it means that the corresponding predicted depth map can be obtained directly from the original image data obtained by the vehicle camera. At this point, the original image data that really needs to be analyzed can be obtained through the vehicle camera to detect the 3D information of the object in the original image data.
  • the basic working principle is to first use Dense121Net as the encoding layer to extract the feature parameters in the depth image data. Then, the coding layer is decoded to obtain three branches, and the decoded sizes of the three branches are different. The relative local structural features of different sizes are extracted through three branches, and the outputs of the three branches are connected in series, and the unified size is the size of the input image, and the concatenated layer is obtained. Finally, convolution calculations are performed on the concatenated layers to analyze the local structure to obtain the predicted depth map corresponding to the depth image data. The size of each pixel in the predicted depth map is the depth value.
  • the encoded dense features in order to obtain the concatenated layer of the three branches, it is necessary to reduce the dimensionality of the encoded dense features to H/8, extract the context structure information through the spatial pyramid pooling layer, and connect the extracted structure information.
  • the local plane guidance layer (8x8) its local geometry information is parsed, thereby generating the estimated depth feature of the first branch.
  • the expansion rate of the spatial pyramid pooling layer is 3, 6, 12, 18, 24.
  • the encoded dense features are reduced to H/4, the depth features generated by the first branch are connected in series, and connected to the local plane guidance layer (4x4) to analyze its local geometric structure information, thereby generating the estimation of the second branch. deep features.
  • the encoded dense features are reduced to H/2, the depth features generated by the second branch are connected in series, and connected to the local plane guidance layer (2x2) to analyze its local geometric structure information, thereby generating the estimated depth of the third branch. feature.
  • the estimated depth features generated by the first branch, the second branch, and the third branch are connected in series, and the unified size is the size of the input image, and the concatenated layer is obtained.
  • the concatenated layers are connected to the convolutional layers to finally generate the predicted depth map corresponding to the depth image data.
  • the feature parameters in this technical solution include but are not limited to image texture, color and spatial structure.
  • the original image data can be marked with a two-dimensional bounding box, so as to detect and mark all the target objects in the original image data.
  • the target objects mentioned here include at least cars, trucks, trucks, pedestrians, and cyclists.
  • an object detection model may also be selected.
  • the target object in the original image data is detected and marked by using the established object detection model.
  • establishing an object detection model also needs to be completed based on the above-established training set.
  • an object detection training set is formed with each detected object in each original image data in the training set.
  • the object detection model can be trained according to the Focal Loss loss function.
  • the input of an object detection model is raw image data, and the output is a target object, such as a person, car, or truck. There is no relationship between the object detection model and the depth estimation model, and the two can operate independently.
  • the p t is the detection probability
  • the ⁇ is an inter-class parameter
  • the anchor region can be generated. It is equivalent to directly projecting the two-dimensional bounding box around the detection object to the corresponding predicted depth map, instead of directly projecting the outline of the detected object into the predicted depth map, which reduces the difficulty of operation. Then 3D reconstruction is performed on the anchored area, so as to obtain the 3D coordinate value of the detected object in the world coordinate system.
  • the 3D object detection method based on a monocular camera disclosed in this embodiment can obtain the three-dimensional coordinate information of objects within 100 meters, which can achieve high accuracy at a low cost, and the calculation efficiency is also obtained. Significantly improved.
  • This embodiment provides a 3D object detection method based on a monocular camera, which can complete the accurate detection of 3D objects with the help of a monocular camera and a vehicle-mounted lidar.
  • the entire calculation process does not depend on the assumption that the road surface is completely flat.
  • the detection accuracy has been significantly improved, which can provide drivers with more accurate reference data, which is conducive to improving driving safety and significantly reduces the detection of 3D objects. cost, has a very important use value.

Abstract

一种基于单目摄像头的3D物体检测方法,该方法包括:建立深度估计模型,所述深度估计模型用于获取与原始图像数据相匹配的预测深度图(101);通过车载摄像头获取原始图像数据(102);利用深度估计模型获取与原始图像数据相匹配的预测深度图(103);在原始图像数据中检测出目标物体(104);将目标物体投射至对应的预测深度图中,生成锚定区域,并对锚定区域进行3D重建,获得目标物体在世界坐标系中的三维坐标值(105);该方法仅凭借单目摄像头就能获得物体的三维坐标信息,不依赖于路面完全平整的假设基础,成本低,检测精度高,能够为驾驶员提供较为准确的参考数据,利于提高驾驶安全性。

Description

一种基于单目摄像头的3D物体检测方法 技术领域
本发明涉及3D物体检测技术领域,特别涉及一种基于单目摄像头的3D物体检测方法。
背景技术
在计算机视觉中,检测感兴趣物体并推断其三维特性是一个核心问题,目前已取得了广泛应用。特别是在过去的十年中,随着无人驾驶技术和移动机器人的快速发展,物体检测在感知系统中发挥了极其重要的作用,精准,高效的感知系统能够有效确保机器人与其他周围移动物体的安全。近年来,虽然二维的物体检测在无人驾驶系统中也得到了迅猛地发展,但将检测到的物体从图像平面转换到真实世界姿态仍需更多的改进。而常规三维物体检测的任务通常又严重依赖激光雷达或毫米波雷达等深度传感器,不仅计算量较大,而且成本也较高。
鉴于越来越多的车辆已经配备了高清摄像头,因此,借助于单目摄像头来执行3D目标的检测,以降低成本,已逐渐成为行业的发展趋势。在现有的基于单目摄像头的3D物体检测算法中,其实时性与精度都远远不及使用其他传感器的方法(如激光雷达)。这是因为,现有基于单目摄像头的3D物体检测算法都依赖于一个假设,即地面(或地球)是平的。基于这个假设,可以使用二维信息源对三维信息建模。例如,由于假设地面是平的,传统方法进一步假设被检测物体对应的二维目标框的底部位于地平面上。因此,当一个物体被检测到,基于这个平面假设,简单的几何结构计算就可算出障碍物与本车的距离。
然而,实际路面不可能是完全平整的,当路面是弯曲或者不平整时,这些传统办法就会受到影响。例如,当假设地平面是平的时候,实际上是不平的,行驶面上的曲线会导致不准确的预测,对环境中障碍物的距离估计就会出现过高或过低的判断。在这两种情况中,不准确的距离估计会对车辆的各种操作产生直接的负面影响,从而可能危及横向和纵向控制或者驾驶的安全性与可靠性。例如,低估的距离会导致Adaptive Cruise Control(ACC,主动巡航控制系统)功能失效,更严重地,在防止潜在的交通事故中,Automatic Energency Brake(AEB,自动紧急制动系统)功能的失效。反之,高估的距离可能导致ACC或AEB功能在不需要 的时候被激活,从而对乘客造成潜在的不适或伤害,同时也降低了乘客对车辆安全运行能力的信心。
发明内容
为了克服上述缺陷,本发明提供了一种基于单目摄像头的3D物体检测方法,该方法包括:
建立深度估计模型,所述深度估计模型用于获取与原始图像数据相匹配的预测深度图;
通过车载摄像头获取原始图像数据;
利用深度估计模型获取与原始图像数据相匹配的预测深度图;
在原始图像数据中检测出目标物体;
将目标物体投射至对应的预测深度图中,生成锚定区域,并对锚定区域进行3D重建,获得目标物体在世界坐标系中的三维坐标值。
进一步的,所述建立深度估计模型步骤包括:
获取若干帧原始图像数据以及与各原始图像数据相匹配的深度图像数据,并建立训练集,所述训练集中每帧原始图像数据和与其相对应的深度图像数据组成一个样本;
以训练集中的各样本作为训练因素,根据Scale-invariant Error loss损失函数计算出深度估计模型。
进一步的,在所述建立深度估计模型步骤之后,在所述在原始图像数据中检测出目标物体步骤之前,还包括建立物体检测模型步骤:
利用深度学习模型框架Darknet53作为特征提取框架,以训练集中的各原始图像数据作为训练因素,根据Focal Loss损失函数训练出物体检测模型,所述物体检测模型用于检测原始图像数据中的目标物体。
进一步的,所述Focal Loss损失函数如下:
FL(pt)=-α(1-pt)γlog(pt)
其中,所述pt为检测概率,所述α为类别间参数,(1-pt)γ为简单/困难样本调节因子,且α=0.5γ=2。
进一步的,所述获取若干帧原始图像数据以及与各原始图像数据相匹配的深度图像数据,并建立训练集步骤,包括:
同时获取若干帧原始图像数据以及与各原始图像数据相匹配的激光雷达数 据;
将各所述激光雷达数据与各所述原始图像数据进行时间同步处理,形成一一对应关系;
将激光雷达数据中的三维点云投射至图像平面内,形成点云图;
对点云图分别进行深度扩充处理,以获取与原始图像数据相匹配的深度图像数据;
以若干帧原始图像数据以及与各原始图像数据相匹配的深度图像数据建立训练集。
进一步的,所述将激光雷达数据中的三维点云投射至图像平面内,形成点云图步骤,包括:
获取车载摄像头的内参矩阵;
通过联合标定法计算出车载摄像头与车载激光雷达之间的旋转平移矩阵;
根据内参矩阵以及旋转平移矩阵,将激光雷达数据中的三维点云转换成二维的点云图。
进一步的,所述对点云图进行深度扩充处理,以获取与原始图像数据相匹配的深度图像数据步骤,包括:
对点云图进行逆转处理;
对经过逆转处理的点云图进行第一次内核扩张处理,以完成小孔闭合;
使用中值滤波器,对经过第一次内核扩张处理的点云图进行第一次动态模糊去除异常值处理;
对经过第一次动态模糊去除异常值处理的点云图进行第二次内核扩张处理,以完成孔距填充;
对经过第二次内核扩张处理的点云图进行第三内核扩张处理,以完成大孔闭合;
使用中值滤波器,对经过第三次内核扩张处理的点云图进行第二次动态模糊去除异常值处理;
针对经过第二次动态模糊去除异常值处理的点云图,采用双边滤波器去除异常值,保持局部边界特征,并实现二次逆转处理,以获取与原始图像数据相匹配的深度图像数据。
进一步的,所述利用深度估计模型获取与原始图像数据相匹配的预测深度图 步骤,包括:
采用Dense121Net作为编码层,提取原始图像数据中的特征参数;
对编码层进行解码,获取三个支路,以通过三个支路提取不同尺寸下的相对局部结构特征,并将三个支路的输出串联,统一尺寸为输入图像大小,获取串联层;
对串联层进行卷积计算,分析局部结构,以获取与深度图像数据相对应的预测深度图。
进一步的,所述对编码层进行解码,获取三个支路,以通过三个支路提取不同尺寸下的相对局部结构特征,并将三个支路的输出串联,统一尺寸为输入图像大小,获取串联层步骤,包括:
将编码后的特征降维至H/8,通过空间金字塔池化层提取上下文结构信息,并将提取出的结构信息连接至局部平面引导层解析其局部几何结构信息,从而生成第一支路的估计深度特征;
将编码后的特征降维至H/4,串联第一支路生成的深度特征,并连接至局部平面引导层解析其局部几何结构信息,从而生成第二支路的估计深度特征;
将编码后的特征降维至H/2,串联第二支路生成的深度特征,并连接至局部平面引导层解析其局部几何结构信息,从而生成第三支路的估计深度特征;
将第一支路、第二支路以及第三支路生成的估计深度特征串联起来,并统一尺寸为输入图像大小,获取串联层。
进一步的,所述特征参数包括图像纹理、色彩以及空间结构。
与现有技术相比,本发明的有益效果是如下:
本发明公开了一种基于单目摄像头的3D物体检测方法,该3D物体检测方法仅借助于单目摄像头即可完成对3D物体的准确检测,整个计算过程中,不依赖于路面完全平整的假设基础,与传统借助于单目摄像头来执行3D目标的检测方案相比,检测精度得到了明显提高,能够为驾驶员提供较为准确的参考数据,利于提高驾驶安全性,同时明显降低了3D物体的检测成本,具有非常重要的使用价值。
附图说明
图1为实施例1中基于单目摄像头的3D物体检测方法流程示意图。
图2为实施例1中训练集的建立过程示意图。
图3为实施例1中基于单目摄像头的3D物体检测方法原理图。
图4为实施例1中利用深度估计模型获取预测深度图的具体流程示意图。
图5为实施例1中原始图像数据以及标注信息示意图。
图6为实施例1中预测深度图以及锚定区域的示意图。
附图仅用于示例性说明,不能理解为对本专利的限制;为了更好说明本实施例,附图某些部件会有省略、放大或缩小,并不代表实际尺寸;对于本领域技术人员来说,附图中某些公知结构及其说明可能省略是可以理解的;相同或相似的标号对应相同或相似的部件;附图中描述位置关系的用语仅用于示例性说明,不能理解为对本专利的限制。
具体实施方式
下面对本发明的较佳实施例进行详细阐述,以使本发明的优点和特征更易被本领域技术人员理解,从而对本发明的保护范围作出更为清楚的界定。
实施例1
本实施例提供了一种基于单目摄像头的3D物体检测方法,该方法的实现主要基于车载摄像头以及车载激光雷达。车载摄像头与车载激光雷达可以设置一个也可以设置多个,数量不做限制。车载摄像头与车载激光雷达尽量安装在测试车辆的同一侧,或相近位置,以便于获取同一角度的原始图像数据和激光雷达数据。
如图1-图6所示,一种基于单目摄像头的3D物体检测方法,包括如下步骤:
101、建立深度估计模型,所述深度估计模型用于获取与原始图像数据相匹配的预测深度图。
建立深度估计模型主要是为了能够快速获取与原始图像数据相匹配的预测深度图。在建立深度估计模型的具体过程中,首先需要先获取若干帧原始图像数据以及与各原始图像数据相匹配的深度图像数据,并建立训练集。所述训练集中每帧原始图像数据和与其相对应的深度图像数据即组成一个样本。然后以训练集中的各样本作为训练因素,根据Scale-invariant Error loss损失函数计算出深度估计模型。
所述深度估计模型用于获取与原始图像数据相匹配的预测深度图。简单来讲,就是使用上述形成的训练集结合损失函数,对该预测模型进行训练,从而获得最终的深度估计模型,深度估计模型的输入是原始图像数据,深度估计模型能够直接根据原始图像数据中的特征参数直接输出相对应的预测深度图。预测深度 图中的像素信息是指物体与车辆之间的距离,因此深度估计模型是测量距离的模型。本技术方案中,所述Scale-invariant Error loss损失函数如下:
Figure PCTCN2021102534-appb-000001
其中,Loss=损失函数,n为有效的像素,d i代表在i位置处的深度,
Figure PCTCN2021102534-appb-000002
分别为特征值和i对应的深度真值,而λ=0.5时,效果最佳。
在本技术方案中,为了获取若干帧原始图像数据以及与各原始图像数据相匹配的深度图像数据,以建立训练集。一般需要先通过车载摄像头和车载激光雷达来同时获取原始图像数据以及与原始图像数据相匹配的激光雷达数据。这里所说的匹配是指激光雷达数据与原始图像数据的拍摄角度以及拍摄物体等均相互吻合。并将所述激光雷达数据与所述原始图像数据进行时间同步处理,形成一一对应关系,以保证两者之间具有良好的同时性,即保证两者的拍摄时间也是吻合的。然后,再将激光雷达数据中的三维点云投射至图像平面内,形成点云图。最后,对点云图进行深度扩充处理,即可获取到与原始图像数据相匹配的深度图像数据。以若干帧原始图像数据以及与各原始图像数据相匹配的深度图像数据组成数据集,便可形成训练集。
一般来讲,在通过车载摄像头和车载激光雷达分别获取原始图像数据和激光雷达数据时,车载摄像头和车载激光雷达会分别记录各自每一帧图像的时间戳。而在将所述激光雷达数据与所述原始图像数据进行时间同步处理过程中,只需要根据每一帧激光雷达数据的时间戳找出离其最近的原始图像数据时间戳进行匹配,即可获取时间匹配的激光雷达数据与所述原始图像数据。
本实施例中,在将激光雷达数据中的三维点云投射至图像平面内,形成点云图的过程中,需要先获取车载摄像头的内参矩阵(摄像头的内参矩阵是固定的,一般可以通过厂家直接获取),同时通过联合标定法计算出车载摄像头与车载激光雷达之间的旋转平移矩阵。根据内参矩阵以及旋转平移矩阵,进而将激光雷达数据中的三维点云投射至图像平面内,以将激光雷达数据中的三维点云转换成二维的点云图。在二维的点云图中,像素值是激光雷达点的深度信息。
作为优选的,为了对点云图进行深度扩充处理,以获取与原始图像数据相匹 配的深度图像数据,通常需要先对点云图进行逆转处理,逆转处理时,通常设置最远距离为100米,使D inv=100–D gt,其中,D gt代表深度真值,例如将D gt的深度真值设定为16m,那么D inv则为84m。然后使用5x5数值为1的内核矩阵,对经过逆转处理的点云图进行第一次内核扩张处理,以完成小孔闭合。再使用中值滤波器(内核尺寸为5),对经过第一次内核扩张处理的点云图进行第一次动态模糊去除异常值处理。使用7x7数值为1的内核,对经过第一次动态模糊去除异常值处理的点云图进行第二次内核扩张处理,以完成孔距填充。并使用15x15数值为1的内核对经过第二次内核扩张处理的点云图进行第三内核扩张处理,以完成大孔闭合。随后,继续使用中值滤波器(内核尺寸为5),对经过第三次内核扩张处理的点云图进行第二次动态模糊去除异常值处理。最后,针对经过第二次动态模糊去除异常值处理的点云图,采用双边滤波器去除异常值,同时保持局部边界特征。在采用双边滤波器去除异常值过程中,直径可设为5,色彩θ=0.5,θ'=2。并将经过双边滤波器去除异常值处理所得到的深度原始图再进行二次逆转处理,以获取与原始图像数据相匹配的深度图像数据(即深度原始图),其中,深度信息D=100-D inv
为了便于理解,在此特对训练集的建立过程进行具体的举例说明,例如,一次路采,我们可以采集回来2万张图片与1W个点云数据,针对这一次采集回来的数据,做数据清理,并进行时间同步处理,以及后续将激光雷达数据转换成点云图、对点云图进行深度扩充等。假设最后洗出了5000张有效的原始图片数据与5000张与之对应的深度图像数据,那么两两成一组为样本,训练集按照8:1:1区分,那么就有4000组训练样本,500组验证样本,500组测试样本。
102、通过车载摄像头获取原始图像数据。
当深度估计模型建立完成后,就意味着,可以根据车载摄像头获取的原始图像数据直接得到与其对应的预测深度图了。此时,便可以通过车载摄像头获取真正需要分析的原始图像数据,以对原始图像数据中的物体3D信息进行检测。
103、利用深度估计模型获取与原始图像数据相匹配的预测深度图。
在利用深度估计模型获取与原始图像数据相匹配的预测深度图的过程中,基本工作原理是,先采用Dense121Net作为编码层,提取深度图像数据中的特征参数。然后对编码层进行解码,获取三个支路,三个支路所解码的尺寸不同。以通过三个支路提取不同尺寸下的相对局部结构特征,并将三个支路的输出串联,统 一尺寸为输入图像大小,获取串联层。最后,对串联层进行卷积计算,分析局部结构,以获取与深度图像数据相对应的预测深度图。预测深度图中的每一个像素点的大小即为深度值。
在本实施例中,为了获取三个支路的串联层,需要先将编码后的密集特征降维至H/8,通过空间金字塔池化层提取上下文结构信息,并将提取出的结构信息连接至局部平面引导层(8x8)解析其局部几何结构信息,从而生成第一支路的估计深度特征。其中,空间金字塔池化层的扩张率为3、6、12、18、24。然后再将编码后的密集特征降维至H/4,串联第一支路生成的深度特征,并连接至局部平面引导层(4x4)解析其局部几何结构信息,从而生成第二支路的估计深度特征。最后将编码后的密集特征降维至H/2,串联第二支路生成的深度特征,并连接至局部平面引导层(2x2)解析其局部几何结构信息,从而生成第三支路的估计深度特征。并将第一支路、第二支路以及第三支路生成的估计深度特征串联起来,并统一尺寸为输入图像大小,获取串联层。将串联层连接卷积层,最终生成与深度图像数据相对应的预测深度图。
本技术方案中的所说的特征参数包括但不限于图像纹理、色彩以及空间结构。
104、在原始图像数据中检测出目标物体。
在具体实施过程中,可以利用二维包围框对原始图像数据进行标注,以将原始图像数据中的目标物体全部检测并标注出来。这里所说的目标物体至少包括小轿车、卡车、货车、行人、骑行人员等。
作为优选的,在所述建立深度估计模型步骤之后,在所述在原始图像数据中检测出目标物体步骤之前,还可以选择建立物体检测模型。以利用建立的物体检测模型来实现对原始图像数据中的目标物体进行检测标注。具体的,建立物体检测模型,同样需要基于上述所建立的训练集来完成。一般来讲,以训练集中各原始图像数据中的各检测物体形成物体检测训练集。利用深度学习模型框架Darknet53作为特征提取框架,以训练集中的各原始图像数据的检测物体作为训练因素,根据Focal Loss损失函数即可训练出物体检测模型。物体检测模型的输入是原始图像数据,输出结果是目标物体,如人、车或卡车等。物体检测模型与深度估计模型之间是无关联的,两者可分别独立运行。
本技术方案中的Focal Loss损失函数如下:
FL(p t)=-α(1-p t) γlog(p t);
其中,所述p t为检测概率,所述α为类别间参数,(1-p t) γ为简单/困难样本调节因子,且当α=0.5γ=2时,效果最好。
105、将目标物体投射至对应的预测深度图中,生成锚定区域,并对锚定区域进行3D重建,获得目标物体在世界坐标系中的三维坐标值。
在具体实施过程中,直接将检测物体的轮廓投射至预测深度图中的操作难度相对较大,一般只要是将步骤104中物体检测形成的二维包围框一一投射至对应的预测深度图中,即可生成锚定区域。相当于是将围设在检测物体周围的二维包围框直接投射至对应的预测深度图,以此替代将检测物体的轮廓直接投射在预测深度图中,降低操作难度。然后对锚定区域进行3D重建,从而获得检测物体在世界坐标系中的三维坐标值。
经过多次反复验证,通过本实施例公开的基于单目摄像头的3D物体检测方法来获取100米内的物体三维坐标信息,能够在较低成本条件下实现较高的精度,且计算效率也得到了明显提高。
本实施例提供的一种基于单目摄像头的3D物体检测方法,借助于单目摄像头与车载激光雷达即可完成对3D物体的准确检测,整个计算过程中,不依赖于路面完全平整的假设基础,与传统借助于单目摄像头来执行3D目标的检测方案相比,检测精度得到了明显提高,能够为驾驶员提供较为准确的参考数据,利于提高驾驶安全性,同时明显降低了3D物体的检测成本,具有非常重要的使用价值。
显然,本发明的上述实施例仅仅是为清楚地说明本发明所作的举例,而并非是对本发明的实施方式的限定。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动。这里无需也无法对所有的实施方式予以穷举。凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明权利要求的保护范围之内。

Claims (10)

  1. 一种基于单目摄像头的3D物体检测方法,其特征在于,该方法包括:
    建立深度估计模型,所述深度估计模型用于获取与原始图像数据相匹配的预测深度图;
    通过车载摄像头获取原始图像数据;
    利用深度估计模型获取与原始图像数据相匹配的预测深度图;
    在原始图像数据中检测出目标物体;
    将目标物体投射至对应的预测深度图中,生成锚定区域,并对锚定区域进行3D重建,获得目标物体在世界坐标系中的三维坐标值。
  2. 如权利要求1所述一种基于单目摄像头的3D物体检测方法,其特征在于,所述建立深度估计模型步骤包括:
    获取若干帧原始图像数据以及与各原始图像数据相匹配的深度图像数据,并建立训练集,所述训练集中每帧原始图像数据和与其相对应的深度图像数据组成一个样本;
    以训练集中的各样本作为训练因素,根据Scale-invariant Error loss损失函数计算出深度估计模型。
  3. 如权利要求2所述一种基于单目摄像头的3D物体检测方法,其特征在于,在所述建立深度估计模型步骤之后,在所述在原始图像数据中检测出目标物体步骤之前,还包括建立物体检测模型步骤:
    利用深度学习模型框架Darknet53作为特征提取框架,以训练集中的各原始图像数据作为训练因素,根据Focal Loss损失函数训练出物体检测模型,所述物体检测模型用于检测原始图像数据中的目标物体。
  4. 如权利要求3所述一种基于单目摄像头的3D物体检测方法,其特征在于,所述Focal Loss损失函数如下:
    FL(p t)=-α(1-p t) γlog(p t)
    其中,所述p t为检测概率,所述α为类别间参数,(1-p t) γ为简单/困难样本调节因子,且α=0.5γ=2。
  5. 如权利要求2所述一种基于单目摄像头的3D物体检测方法,其特征在于,所述获取若干帧原始图像数据以及与各原始图像数据相匹配的深度图像数据,并建 立训练集步骤,包括:
    同时获取若干帧原始图像数据以及与各原始图像数据相匹配的激光雷达数据;将各所述激光雷达数据与各所述原始图像数据进行时间同步处理,形成一一对应关系;
    将激光雷达数据中的三维点云投射至图像平面内,形成点云图;
    对点云图分别进行深度扩充处理,以获取与原始图像数据相匹配的深度图像数据;
    以若干帧原始图像数据以及与各原始图像数据相匹配的深度图像数据建立训练集。
  6. 如权利要求5所述一种基于单目摄像头的3D物体检测方法,其特征在于,所述将激光雷达数据中的三维点云投射至图像平面内,形成点云图步骤,包括:获取车载摄像头的内参矩阵;
    通过联合标定法计算出车载摄像头与车载激光雷达之间的旋转平移矩阵;
    根据内参矩阵以及旋转平移矩阵,将激光雷达数据中的三维点云转换成二维的点云图。
  7. 如权利要求5所述一种基于单目摄像头的3D物体检测方法,其特征在于,所述对点云图进行深度扩充处理,以获取与原始图像数据相匹配的深度图像数据步骤,包括:
    对点云图进行逆转处理;
    对经过逆转处理的点云图进行第一次内核扩张处理,以完成小孔闭合;
    使用中值滤波器,对经过第一次内核扩张处理的点云图进行第一次动态模糊去除异常值处理;
    对经过第一次动态模糊去除异常值处理的点云图进行第二次内核扩张处理,以完成孔距填充;
    对经过第二次内核扩张处理的点云图进行第三内核扩张处理,以完成大孔闭合;使用中值滤波器,对经过第三次内核扩张处理的点云图进行第二次动态模糊去除异常值处理;
    针对经过第二次动态模糊去除异常值处理的点云图,采用双边滤波器去除异常值,保持局部边界特征,并实现二次逆转处理,以获取与原始图像数据相匹配的 深度图像数据。
  8. 如权利要求1所述一种基于单目摄像头的3D物体检测方法,其特征在于,所述利用深度估计模型获取与原始图像数据相匹配的预测深度图步骤,包括:
    采用Dense121Net作为编码层,提取原始图像数据中的特征参数;
    对编码层进行解码,获取三个支路,以通过三个支路提取不同尺寸下的相对局部结构特征,并将三个支路的输出串联,统一尺寸为输入图像大小,获取串联层;对串联层进行卷积计算,分析局部结构,以获取与深度图像数据相对应的预测深度图。
  9. 如权利要求8所述一种基于单目摄像头的3D物体检测方法,其特征在于,所述对编码层进行解码,获取三个支路,以通过三个支路提取不同尺寸下的相对局部结构特征,并将三个支路的输出串联,统一尺寸为输入图像大小,获取串联层步骤,包括:
    将编码后的特征降维至H/8,通过空间金字塔池化层提取上下文结构信息,并将提取出的结构信息连接至局部平面引导层解析其局部几何结构信息,从而生成第一支路的估计深度特征;
    将编码后的特征降维至H/4,串联第一支路生成的深度特征,并连接至局部平面引导层解析其局部几何结构信息,从而生成第二支路的估计深度特征;
    将编码后的特征降维至H/2,串联第二支路生成的深度特征,并连接至局部平面引导层解析其局部几何结构信息,从而生成第三支路的估计深度特征;
    将第一支路、第二支路以及第三支路生成的估计深度特征串联起来,并统一尺寸为输入图像大小,获取串联层。
  10. 如权利要求8所述一种基于单目摄像头的3D物体检测方法,其特征在于,所述特征参数包括图像纹理、色彩以及空间结构。
PCT/CN2021/102534 2021-01-15 2021-06-25 一种基于单目摄像头的3d物体检测方法 WO2022151664A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110056909.9A CN112883790A (zh) 2021-01-15 2021-01-15 一种基于单目摄像头的3d物体检测方法
CN202110056909.9 2021-01-15

Publications (1)

Publication Number Publication Date
WO2022151664A1 true WO2022151664A1 (zh) 2022-07-21

Family

ID=76048445

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/102534 WO2022151664A1 (zh) 2021-01-15 2021-06-25 一种基于单目摄像头的3d物体检测方法

Country Status (2)

Country Link
CN (1) CN112883790A (zh)
WO (1) WO2022151664A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115546216A (zh) * 2022-12-02 2022-12-30 深圳海星智驾科技有限公司 一种托盘检测方法、装置、设备及存储介质
CN115622571A (zh) * 2022-12-16 2023-01-17 电子科技大学 一种基于数据处理的雷达目标识别方法
CN115937325A (zh) * 2022-09-27 2023-04-07 上海几何伙伴智能驾驶有限公司 一种结合毫米波雷达信息的车端摄像头标定方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112883790A (zh) * 2021-01-15 2021-06-01 惠州市德赛西威汽车电子股份有限公司 一种基于单目摄像头的3d物体检测方法
CN113705432A (zh) * 2021-08-26 2021-11-26 京东鲲鹏(江苏)科技有限公司 一种模型训练、三维目标检测方法、装置、设备及介质
CN114842287B (zh) * 2022-03-25 2022-12-06 中国科学院自动化研究所 深度引导变形器的单目三维目标检测模型训练方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108229366A (zh) * 2017-12-28 2018-06-29 北京航空航天大学 基于雷达和图像数据融合的深度学习车载障碍物检测方法
CN112001958A (zh) * 2020-10-28 2020-11-27 浙江浙能技术研究院有限公司 基于有监督单目深度估计的虚拟点云三维目标检测方法
CN112883790A (zh) * 2021-01-15 2021-06-01 惠州市德赛西威汽车电子股份有限公司 一种基于单目摄像头的3d物体检测方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3709216B1 (en) * 2018-02-09 2023-08-02 Bayerische Motoren Werke Aktiengesellschaft Methods and apparatuses for object detection in a scene represented by depth data of a range detection sensor and image data of a camera

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108229366A (zh) * 2017-12-28 2018-06-29 北京航空航天大学 基于雷达和图像数据融合的深度学习车载障碍物检测方法
CN112001958A (zh) * 2020-10-28 2020-11-27 浙江浙能技术研究院有限公司 基于有监督单目深度估计的虚拟点云三维目标检测方法
CN112883790A (zh) * 2021-01-15 2021-06-01 惠州市德赛西威汽车电子股份有限公司 一种基于单目摄像头的3d物体检测方法

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115937325A (zh) * 2022-09-27 2023-04-07 上海几何伙伴智能驾驶有限公司 一种结合毫米波雷达信息的车端摄像头标定方法
CN115546216A (zh) * 2022-12-02 2022-12-30 深圳海星智驾科技有限公司 一种托盘检测方法、装置、设备及存储介质
CN115622571A (zh) * 2022-12-16 2023-01-17 电子科技大学 一种基于数据处理的雷达目标识别方法

Also Published As

Publication number Publication date
CN112883790A (zh) 2021-06-01

Similar Documents

Publication Publication Date Title
WO2022151664A1 (zh) 一种基于单目摄像头的3d物体检测方法
JP5016022B2 (ja) 多重3次元ワーピングに基づく物体運動検出システムおよび方法とこのようなシステムを備えた車両
CN110910453B (zh) 基于无重叠视域多相机系统的车辆位姿估计方法及其系统
CN105206109B (zh) 一种基于红外ccd的车辆雾天识别预警系统及方法
CN110738121A (zh) 一种前方车辆检测方法及检测系统
CN111369617B (zh) 一种基于卷积神经网络的单目视图的3d目标检测方法
CN110826386A (zh) 基于lidar的对象检测和分类
JP7135665B2 (ja) 車両制御システム、車両の制御方法及びコンピュータプログラム
CN109917359B (zh) 基于车载单目视觉的鲁棒车辆距离估计方法
JP2016009487A (ja) 立体画像に基づいて距離情報を求めるためのセンサシステム
CN114495064A (zh) 一种基于单目深度估计的车辆周围障碍物预警方法
KR101483742B1 (ko) 지능형 차량의 차선 검출방법
CN114118252A (zh) 一种基于传感器多元信息融合的车辆检测方法及检测装置
CN112183330B (zh) 基于点云的目标检测方法
EP3389009A1 (en) Image processing device, object recognition device, apparatus control system, image processing method and program
CN107220632B (zh) 一种基于法向特征的路面图像分割方法
Mehtab et al. 3D vehicle detection using cheap LiDAR and camera sensors
CN114648639B (zh) 一种目标车辆的检测方法、系统及装置
CN116189150A (zh) 基于融合输出的单目3d目标检测方法、装置、设备和介质
CN116403186A (zh) 基于FPN Swin Transformer与Pointnet++ 的自动驾驶三维目标检测方法
Onkarappa et al. On-board monocular vision system pose estimation through a dense optical flow
Xiong et al. A 3d estimation of structural road surface based on lane-line information
Ma et al. Disparity estimation based on fusion of vision and LiDAR
Du et al. Validation of vehicle detection and distance measurement method using virtual vehicle approach
EP3540643A1 (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21918860

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21918860

Country of ref document: EP

Kind code of ref document: A1