SMOKE: Single-Stage Monocular 3D Object Detection via Keypoint Estimation

纵目发表的这篇单目3D目标检测论文不同于以往用2D预选框建立3D信息,而是采取直接回归3D信息,这种思路简单又高效,并不需要复杂的前后处理,而且是一种one stage方法,对于实际业务部署也很友好。

来源:杰读源码 微信公众号

论文:SMOKE: Single-Stage Monocular 3D Object Detection via Keypoint Estimation

  • 论文:https://arxiv.org/pdf/2002.10111.pdf
  • 代码:https://github.com/open-mmlab/mmdetection3d

Introduction


2D目标检测目前已经在精度和速度上都取得了不错的成绩,而3D目标检测由于需要同时估计出目标的位置与姿态,因此相比2D是一个更具挑战的方向。
目前性能最好的3D目标检测还是需要依赖激光雷达的点云或者点云+图像融合,考虑到成本因素,仅依靠单目摄像头的3D目标检测还是非常值得研究的。
本作有以下几个贡献点:

  • 提出了一个one-stage单目3D检测方法,思路简答,且end-to-end。
  • 3D框8个角点的计算使用了多种方式得到,每种方式都参与了loss的计算,使训练更容易收敛。
  • 在KITTI数据集上达到了SOTA。

Detection Problem


为了方便下面对细节详细展开描述,这里先将3D目标检测概述下:
给定一张RGB图像 I ∈ R W × H × 3 I\in R^{W\times H\times3} IRW×H×3 W W W H H H分别代表图像的宽高,需要识别出图像中每个目标的分类 C C C以及 3 D 3D 3D B B B的信息, B B B将由下面7个变量代表 ( h , w , l , x , y , z , θ ) (h,w,l,x,y,z,\theta) (h,w,l,x,y,z,θ) ( h , w , l ) (h,w,l) (h,w,l)代表目标的高度、宽度、长度单位为 m m m ( x , y , z ) (x,y,z) (x,y,z)是目标的中心坐标,单位为 m m m θ \theta θ代表目标框的航向角 y a w yaw yaw r o w row row p i t c h pitch pitch这两个角度在KITTI数据集中为0,此外,还假定相机的内参 K K K是已知的。

SMOKE Approach


Backbone

主干网络选择使用DLA-34,其中部分卷积换成了DCN,最后的输出相对于原始图4次下采样的特征图。论文还将BN换成了GN(GroupNorm),因为GN对batch size的大小不那么敏感,且在训练中对噪声更鲁棒。

3D Detection Network

head部分一共两条分支,一条用于检测目标中心点位置同时分类,另一条回归目标的3D信息。

Keypoint Branch

中心点的估计与 C e n t e r N e t CenterNet CenterNet那片论文的思路相似,不同的是 C e n t e r N e t CenterNet CenterNet里用的是2D框的中心点,而这里用的是3D框的中心点在图像上的投影点,如下图所示:

Regression Branch

回归分支在每张热图上预测3D信息,3D信息被编码成 τ = [ δ z , δ x c , δ y c , δ h , δ w , δ l , s i n α , c o s α ] T \tau=[\delta_z,\delta_{x_c},\delta_{y_c},\delta_h,\delta_w,\delta_l,sin\alpha,cos\alpha]^T τ=[δz,δxc,δyc,δh,δw,δl,sinα,cosα]T,其中 δ z \delta_z δz为深度补偿值, δ x \delta_x δx δ y \delta_y δy为下采样造成的误差所需的坐标补偿值, δ h \delta_h δh δ w \delta_w δw δ l \delta_l δl为尺寸的补偿值, s i n ( α ) sin(\alpha) sin(α) c o s ( α ) cos(\alpha) cos(α)为计算航向角所需的值。

深度值 z z z由预先定义的缩放系数和补偿值计算得到:

z = μ + δ z σ z z=\mu+\delta_z\sigma_z z=μ+δzσz

得到了深度值 z z z,加上下采样中的补偿值 [ δ x c , δ y c ] T [\delta_{x_c},\delta_{y_c}]^T [δxc,δyc]T和特征图上中心点的投影点 [ x c , y c ] T [x_c,y_c]^T [xc,yc]T以及相机内参的逆矩阵 K 3 ∗ 3 − 1 K^{-1}_{3*3} K331,可得目标的3D位置(单位 m m m):
[ x y z ] = K 3 × 3 − 1 [ z ⋅ ( x c + δ x c ) z ⋅ ( y c + δ y c ) z ] \begin{bmatrix} {x}\\ {y}\\ {z}\\ \end{bmatrix}=K^{-1}_{3\times3}\begin{bmatrix} {z\cdot(x_c+\delta_{x_c})}\\ {z\cdot(y_c+\delta_{y_c})}\\ {z}\\ \end{bmatrix} xyz=K3×31z(xc+δxc)z(yc+δyc)z

在3D框尺寸的计算前,先分析整个数据集得到得到所有目标的均值 [ h ˉ ] T [\bar{h}]^T [hˉ]T,然后使用预测得到的补偿系数 [ δ h , δ w , δ l ] [\delta_h,\delta_w,\delta_l] [δh,δw,δl]即可获取真正的尺寸:
[ h w l ] = [ h ˉ ⋅ e δ h w ˉ ⋅ e δ w l ˉ ⋅ e δ l ] \begin{bmatrix} {h}\\ {w}\\ {l}\\ \end{bmatrix}=\begin{bmatrix} {\bar{h}\cdot{e^{\delta_h}}}\\ {\bar{w}\cdot{e^{\delta_w}}}\\ {\bar{l}\cdot{e^{\delta_l}}}\\ \end{bmatrix} hwl=hˉeδhwˉeδwlˉeδl

在航向角 θ \theta θ的估计中,论文中采取回归角度 α z \alpha_z αz(如下图),来作为计算航向角 θ \theta θ:
θ = α z + a r c t a n ( x z ) \theta=\alpha_z+arctan(\frac{x}{z}) θ=αz+arctan(zx)

最终,可得3D框的8个角点:
B = R θ [ ± h / 2 ± w / 2 ± l / 2 ] + [ x y z ] B=R_{\theta}\begin{bmatrix} {\pm{h/2}}\\ {\pm{w/2}}\\ {\pm{l/2}}\\ \end{bmatrix}+\begin{bmatrix} {x}\\ {y}\\ {z}\\ \end{bmatrix} B=Rθ±h/2±w/2±l/2+xyz
其中 R θ R_{\theta} Rθ代表航向角 θ \theta θ转变而来的矩阵, B B B代表8个角点表示的3D框。

Loss Function

Keypoint Classification分支的loss跟 C e n t e r N e t CenterNet CenterNet中一样,用的是focal loss。

Regression分支的loss计算比较有新意,没有采取直接计算 τ \tau τ中8个参数的loss,而是通过在角度、尺寸、坐标位置三种分支下得到的3D框的8个角点去和真值比较计算loss。

总loss:

L = L c l s + ∑ i = 1 3 L r e g ( B ^ i ) L=L_{cls}+\sum_{i=1}^3L_{reg}(\hat{B}_i) L=Lcls+i=13Lreg(B^i)
其中 L c l s L_{cls} Lcls代表中心点的分类loss, i i i代表分支, B ^ i \hat{B}_i B^i代表预测框的8个角点, L r e g L_{reg} Lreg代表角点回归loss。

# mmdetection3d/mmdet3d/models/dense_heads/smoke_mono3d_head.py
# 角度分支下计算得到的3D框,所谓角度分支即只有角度用的是预测值,而坐标位置和尺寸两个用的是真值
bbox3d_yaws = self.bbox_coder.encode(gt_locations, gt_dimensions, orientations, img_metas)
# 尺寸分支下计算得到的3D框
bbox3d_dims = self.bbox_coder.encode(gt_locations, dimensions, gt_orientations, img_metas)
# 坐标位置分支下计算得到的3D框
bbox3d_locs = self.bbox_coder.encode(locations, gt_dimensions, gt_orientations, img_metas)
...
...
# 三种分支下分别计算推理出的8个角点的和真值8个角点的loss
loss_bbox_oris = self.loss_bbox(pred_bboxes['ori'].corners[reg_inds, ...], target_labels['gt_cors'][reg_inds, ...])

loss_bbox_dims = self.loss_bbox(pred_bboxes['dim'].corners[reg_inds, ...], target_labels['gt_cors'][reg_inds, ...])

loss_bbox_locs = self.loss_bbox(pred_bboxes['loc'].corners[reg_inds, ...], target_labels['gt_cors'][reg_inds, ...])

loss_bbox = loss_bbox_dims + loss_bbox_locs + loss_bbox_oris

Conclusion


纵目发表的这篇单目3D目标检测论文不同于以往用2D预选框建立3D信息,而是采取直接回归3D信息,这种思路简单又高效,并不需要复杂的前后处理,而且是一种one stage方法,对于实际业务部署也很友好。

如果本文对你有帮助,更多内容请关注微信公众号【杰读源码】

### 回答1: Triangulation Learning Network (TLN) 是一个用于从单目图像到立体图像的三维物体检测的算法,其存在一些主要问题,包括: 1. 训练数据缺乏:TLN 算法需要大量的训练数据才能准确地预测三维物体的位置和姿态。但是,由于三维物体检测数据集的获取成本很高,因此当前可用的数据集相对较少,这可能会影响算法的性能。 2. 姿态估计不准确:TLN 算法依赖于对相机姿态的准确估计,但是在实际应用中,姿态估计可能会出现误差。这些误差可能会导致算法无法准确地确定物体的三维位置和姿态。 3. 光照和背景干扰:TLN 算法对光照和背景的变化敏感,这可能会对其检测性能产生负面影响。在不同光照条件和背景下进行测试时,算法可能会出现误报或漏报。 4. 计算复杂度高:TLN 算法需要进行复杂的三角测量和卷积计算,因此需要较高的计算资源。这可能会限制算法在实时应用中的使用。 总之,尽管TLN 算法在三维物体检测方面取得了一些进展,但是它仍然面临着一些挑战和限制,需要进一步研究和改进。 ### 回答2: Triangulation Learning Network (TLN) is a type of deep learning model used for monocular to stereo 3D object detection. However, there are several main problems that currently exist with this approach. 首先,monocular-based 3D object detection methods, including TLN, heavily rely on depth estimation from a single image. This poses a challenge because estimating accurate depth information from a monocular image is inherently difficult. Monocular depth estimation is an ill-posed problem, as there are multiple possible depth solutions for a single input image. Therefore, the quality of depth estimation directly affects the accuracy of 3D object detection, and the current performance of monocular-based methods is still limited due to inaccurate depth estimation. 其次,TLN relies on stereo vision to improve the accuracy of 3D object detection. However, stereo vision has its limitations as well. It requires the presence of two or more cameras with known spatial calibration, which can be expensive and cumbersome to implement in real-world scenarios. Moreover, in challenging environments with poor lighting conditions or occlusions, the accuracy of stereo vision-based methods can be significantly affected. 此外,TLN suffers from the problem of ambiguous depth inference. Even with accurate depth estimation, it is still challenging to determine the exact 3D position of an object. This is because an object can have multiple possible 3D positions that are consistent with the observed 2D image. It becomes even more complex when multiple objects overlap or occlude each other, leading to further ambiguities in 3D object detection results. 最后,TLN requires a large amount of training data to achieve satisfactory performance. Collecting and annotating such data, especially for stereo 3D object detection, can be time-consuming, costly, and error-prone. This limits the scalability and practicality of TLN, as acquiring a diverse and representative dataset for training can be challenging. In summary, the main problems currently existing with Triangulation Learning Network (TLN) for monocular to stereo 3D object detection are inaccurate depth estimation, limitations of stereo vision, ambiguous depth inference, and the requirement for a large amount of training data. Addressing these challenges is essential for improving the accuracy, robustness, and practicality of TLN-based 3D object detection methods. ### 回答3: 目前Triangulation Learning Network: from Monocular to Stereo 3D Object Detection存在以下主要问题: 1. 数据需求高:从单目到立体的3D物体检测需要更多的数据支持。单目图像中的物体深度信息是模糊的,缺乏对立体视觉中物体准确深度的直接观测。因此,为了训练Triangulation Learning Network,需要大量的立体图像数据集,这样的数据集很难获得且成本较高。 2. 精度限制:尽管Triangulation Learning Network提供了改善单目到立体3D物体检测的方法,但其精度仍然受到一些限制。由于立体视觉中的散射和遮挡问题,物体表面的纹理信息可能会受到影响并导致深度估计的误差。此外,图像中物体的姿态和形状也会对准确的深度估计产生影响。 3. 依赖立体匹配:Triangulation Learning Network的核心思想是通过使用立体图像中的匹配点将单目图像的深度信息转换为立体深度。然而,立体匹配本身是一个复杂和计算密集的任务,尤其在具有高度纹理变化或遮挡的场景中,可能存在匹配错误的情况。 4. 硬件要求高:Triangulation Learning Network需要用于获取立体图像的专门的硬件设备,如立体相机或深度相机。这些硬件设备的成本较高,因此部署这种方法可能会面临一定的技术和经济挑战。 综上所述,尽管Triangulation Learning Network提供了一种从单目到立体的3D物体检测方法,但仍然存在着数据需求高、精度限制、依赖立体匹配和硬件要求高等问题。随着技术的进步,相信这些问题将逐渐得到解决,从而更好地推动Triangulation Learning Network的发展和应用。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值