论文总结
Jia X, Wu P, Chen L, et al. Think Twice before Driving: Towards Scalable Decoders for End-to-End Autonomous Driving[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2023: 21983-21994.
模型框架
- Encoder: “raw sensor data” -> “representation vector”
- Decoder: “representation vector” -> “future trajectories/actions”
1 BEV Encoder
1.1 相机 Backbone:
- 多视角相机输入,输出为BEV特征( C × B H × B W C\times B_{H}\times B_{W} C×BH×BW)
- 使用LSS将2D图像转化到BEV空间:首先预测每个像素的离散深度分布,沿着相机光线将每个像素分散到离散点, 其中每个点的特征是其预测深度和相应像素特征的乘积。
- 对于BEV中的每个网格,我们通过Frustum Pooling从网格中的这些点聚合特征。
- 将过去多帧BEV对齐到当前帧,然后concatenate他们得到最终BEV特征。
tracks: 1)对深度预测的真值监督非常的重要;2)在对图像特征进行分散处理时,可以增加语义分割模块,也可以对预测的语义分数进行分散处理。
1.2 LiDAR Backbone:
- 对voxelized的雷达点云使用离散3D卷积操作(SECOND)。
- 将来自多帧的对齐点云与一个额外的通道连接起来,以表示时间信息。
1.3 Fusion:
-
简单进行concatenate,然后输入进卷积层。
-
actions输出作监督过于稀疏,对BEV Feature提出额外特征级监督。
- 使用Roach的中间BEV特征作为优化目标。(这样进行监督具有比常规方法更加有优异的性能)
- 一个基于RL的教师网络,具有特权输入,它将围绕环境的栅格化BEV作为特权输入,并通过几个卷积层获得不错的性能
- 通过让学生网络的中间BEV特征与教师网络类似,每个BEV网格获得关于决策相关信息的密集监督。
2 Decoder
2.1 Coarse Prediction Module
- 使用多层2D卷积层对 H B E V H_{\mathrm{BEV}} HBEV( C × B H × B W . C\times B_H\times B_W. C×BH×BW.)进行下采样,随后flatten得到 H e n v H_{\mathrm{env}} Henv。
- 对于路由信息,包括目标点、高级命令(直走、左转、左转等)和当前车速,我们使用MLP将它们编码为紧凑向量 H m s t H_{\mathrm{mst}} Hmst。
- H e n v H_{\mathrm{env}} Henv和 H m s t H_{\mathrm{mst}} Hmst一起输入到MLP预测自车未来的动作 C t r l 0 \mathbf{Ctrl}_0 Ctrl0和轨迹 Traj 0 \textbf{Traj}_0 Traj0(粗略预测结果)。
flatten+MLP是常规操作!!!
2.2 Look Module
重用编码器的表示能力,并注入样本特定的空间先验,即将预定的位置放入特征中,这使得模型更容易被优化,并且可以带来更好的泛化能力。(没太懂这句话)
该模块的灵感:人类司机会检查目标位置,以确保没有与其他车辆或行人发生碰撞,也没有违反交通规则。(轨迹预测领域的track)根据 T r a j i \mathbf{Traj}_i Traji来检索传感器的信息。
- 相机:采用Multi-scale Deformable attention来聚合信息: H i + 1 i m g − l o o k = D e f o r m A t n ( H I m g ; T r a j i ; H e n v , H m s t ) \boldsymbol{H}_{i+1}^{\mathrm{img-look}}=\mathrm{DeformAtn}(\boldsymbol{H}_{\mathrm{Img}};\mathbf{Traj}_i;\boldsymbol{H}_{\mathrm{env}},\boldsymbol{H}_{\mathrm{mst}}) Hi+1img−look=DeformAtn(HImg;Traji;Henv,Hmst)。其中 H Img H_{\operatorname{Img}} HImg是多尺度图像特征、 T r a j i \mathbf{Traj}_i Traji作为deformable attention的参考点、 H env H_{\operatorname{env}} Henv和 H mst H_{\operatorname{mst}} Hmst是注意力的query。
- LiDAR:只需在 T r a j i \mathbf{Traj}_i Traji中检索每个坐标的周围体素,然后用MLP将它们平铺,即可获得 H i + 1 l i d a r − l o o k H_{i+1}^{\mathrm{lidar-look}} Hi+1lidar−look。
- concatenate H i + 1 i m g − l o o k H_{i+1}^{\mathrm{img-look}} Hi+1img−look和 H i + 1 l i d a r − l o o k H_{i+1}^{\mathrm{lidar-look}} Hi+1lidar−look,然后输入到MLP得到得到look ferture H i + 1 l o o k H_{i+1}^{\mathrm{look}} Hi+1look,同时使用其他MLP更新 H e n v H_{\mathrm{env}} Henv。
2.3 Prediction Module
该模块的灵感:人类驾驶员会预测周围的Agent会对他们的动作做出什么反应,并在实际执行任何动作之前检查是否会发生碰撞,即action-conditioned prediction。
- 采用空间GRU(使用2D卷积层替换了线性层),它以当前的BEV特征作为初始状态,并在每个时间步长以上一层预测的粗动作 Ctrl i t \textbf{Ctrl}_i^t Ctrlit和轨迹 Traj i t \textbf{Traj}_i^t Trajit作为输入。将其输出表示为 H predict i + 1 \boldsymbol{H}_{\text{predict}}^{i+1} Hpredicti+1( T × B H × B W × C T \times B_H \times B_W \times C T×BH×BW×C)。
- 受NLP中teacher forcing的启发,在训练阶段,向空间GRU提供一组额外的输入:当前BEV特征与ground-truth动作 Ctrl g t \textbf{Ctrl}^{gt} Ctrlgt和轨迹 T r a j g t \mathbf{Traj}^{gt} Trajgt。输出为 H i + 1 p r e d i c t , g t \boldsymbol{H}_{i+1}^{\mathrm{predict},\mathrm{gt}} Hi+1predict,gt,用收集的未来场景(Roach BEV特征)来监督这个隐藏的特征。
2.4 Refinement Module
- 输入:
H
i
+
1
look
\boldsymbol{H}_{i+1}^{\text{look}}
Hi+1look和
H
i
+
1
predict
\boldsymbol{H}_{i+1}^{\text{predict}}
Hi+1predict。使用他们调整上一层预测的动作
C
t
r
l
i
\mathbf{Ctrl}_i
Ctrli和轨迹
T
r
a
j
i
\mathbf{Traj}_i
Traji。
O i + 1 c t r l , O i + 1 t r a j = M L P ( [ H i + 1 l o o k ; H i + 1 p r e d i c t ; C t r I i ; T r a j i ; H e n v ; H m s t ] ) , \begin{aligned} \mathcal{O}_{i+1}^{\mathrm{ctrl}},\mathcal{O}_{i+1}^{\mathrm{traj}} =\mathbf{M}\mathbf{L}\mathbf{P}([\mathbf{H}_{i+1}^{\mathrm{look}};\mathbf{H}_{i+1}^{\mathrm{predict}};\mathbf{C}\mathbf{tr}\mathbf{I}_{i};\mathbf{Traj}_{i};\boldsymbol{H}_{\mathrm{env}};\boldsymbol{H}_{\mathrm{mst}}]), \end{aligned} Oi+1ctrl,Oi+1traj=MLP([Hi+1look;Hi+1predict;CtrIi;Traji;Henv;Hmst]), - 其中
O
i
+
1
c
t
r
l
\mathcal{O}_{i+1}^{\mathrm{ctrl}}
Oi+1ctrl和
O
i
+
1
traj
\mathcal{O}_{i+1}^{\text{traj}}
Oi+1traj是粗预测的值与真值之间的偏移。他们被如下方式监督:
O i + 1 c u r l = L ( C t r l i , C t r l g t ) , O i + 1 t r a j = L ( T r a j i , T r a j g t ) , \begin{gathered} \mathcal{O}_{i+1}^{\mathrm{curl}} =\mathcal{L}(\mathbf{Ctrl}_i,\mathbf{Ctrl}^{gt}), \\ \mathcal{O}_{i+1}^{\mathrm{traj}} =\mathcal{L}(\mathbf{Traj}_i,\mathbf{Traj}^{gt}), \end{gathered} Oi+1curl=L(Ctrli,Ctrlgt),Oi+1traj=L(Traji,Trajgt), - 最终通过如下公式预测动作和轨迹:
C t r l i + 1 = C t r l i + O i + 1 c u r l , T r a j i + 1 = T r a j i + O i + 1 T r a j . \begin{gathered} \mathbf{Ctrl}_{i+1}=\mathbf{Ctrl}_i+\mathcal{O}_{i+1}^{\mathrm{curl}}, \\ \mathbf{Traj}_{i+1}=\mathbf{Traj}_{i}+\mathcal{O}_{i+1}^{\mathrm{Traj}}. \end{gathered} Ctrli+1=Ctrli+Oi+1curl,Traji+1=Traji+Oi+1Traj.
3 Supervision Signals
- 预测输出的动作和轨迹,相比输入信息过于离散,会造成模型的过拟合。使用多种辅助监督可以缓解这个问题。
- 监督信号:Image Depth & Segmentation、Feature Distillation、Auxiliary Tasks和Direct Supervision。
- 编码器接受深度、分割和特征蒸馏的密集监督,解码器接受多层直接监督和预测模块中未来特征图监督的密集监督。
主要创新点
- 编码器接受深度、分割和特征蒸馏的密集监督,解码器接受多层直接监督和预测模块中未来特征图监督的密集监督。