目录

Keep your Eyes on the Lane: Real-time Attention-guided Lane Detection

标题 Keep your Eyes on the Lane: Real-time Attention-guided Lane Detection
年份: 2020 年 10 月
GB/T 7714: [1] Tabelini L , Berriel R , Paixo T M , et al. Keep your Eyes on the Lane: Real-time Attention-guided Lane Detection[J]. 2020.

摘要

本文提出了LaneATT:一种基于锚点的深车道检测模型,它与其他一般的深度目标检测器类似,使用锚点进行特征池化操作。由于车道遵循规则模式,且高度相关。全局信息可能对推断它们的位置至关重要,特别是在闭塞、车道标志缺失等情况下。因此,本研究提出了一种新的基于锚点的注意机制,可以聚集全局信息。

主要贡献

  • 一个SOTA车道线检测方法;
  • 一个更快的训练收敛时间的模型;
  • 一种新的基于锚点的车道检测注意机制。

研究方法

LaneATT是一个基于锚的单级车道检测模型(比如YOLOv3、SSD),方法框架如图1,输入为一个由前置摄像头拍摄的RGB图$I = \R^{3\times H_I\times W_I}$,输出为车道边界线。主干网络为CNN,生成一个特征映射,然后池提取每个锚的特征。将提取的特征与全局注意力特征相结合,该模型可以更方便地利用其他车道的信息,已解决遮挡问题。最后,将组合特征传递到全连通层,预测最终输出通道。

https://gitee.com/xiaomoon/image/raw/master/Img/image-20210509135412454.png
Overview of the method

主干从输入图像生成特征映射。然后,将每个锚点投影到特征图上。这个投影用于汇集与注意力模块中创建的另一组功能相连接的功能。最后,使用这个结果特征集,两个层,一个用于分类,另一个用于回归,做出最终的预测。

Lane and anchor representation

车道线点定义:$(X,Y)$

$Y = {y_i}^{N_{}{pts}-1}_{i=0}$,其中$y_i = i\cdot \frac{H_I}{N_{pts}-1} $;

$X = {x_i}^{N_{}{pts}-1}_{i=0}$

由于大多数车道不会垂直穿过整个图像,所以使用起始索引$s$和结束索引$e$来定义$X$的有效连续序列。

锚的定义:使用lines而不是boxes,预测的车道有锚(lines)作为参考,锚点是图像平面上的一条“虚”线

Origin point: $O = (x_{orig},y_{orig})$,其中 $y_{orig} \in Y$ ,位于图像的边框处,除上边框

Direction: $\theta$,使用文献[Likewise Line-CNN]中的锚集。

Backone

首先进行特征提取,使用任意的CNN网络都可以

通过池化操作输出特征图 $F_{back} \in \R^{C^\prime _F \times H_F \times W_F}$ ,

对$F_{back}$使用$1 \times 1$的卷积进行降维,得到$F \in \R^{C_F \times H_F \times W_F}$

Anchor-based feature pooling

一个锚定义了将用于各自的$F$点。由于锚点被建模为直线,对于一个给定锚点的兴趣点是那些截距锚点的虚拟线(考虑到栅格化的线减少到特征地图的尺寸)。对于每个$y_j = 0, 1, 2, … , H_F−1,$将有一个对应的x $$ x_{j}=\left\lfloor\frac{1}{\tan \theta}\left(y_{j}-y_{\text {orig }} / \delta_{\text {back }}\right)+x_{\text {orig }} / \delta_{\text {back }}\right\rfloor $$

式中$(x_{orig}, y_{orig})$和$θ$分别为锚定线的原点和斜率,$δ_{back}$为全局步幅。每个锚$i$将有其对应的特征向量$a^{loc }_i∈\R ^{C_F·H_F}$(列向量表示法)从携带局部特征信息(局部特征)的F中池化。锚的一部分在$F$的边界之外的情况下,$a^{loc}_i$填充零。

Attention mechanism

作用于局部特性$a^{loc}_.$来产生辅助特性$a^{glob}_.$来聚合全局信息。由全连接层$L_{att}$组成,$L_{att}$处理局部特征向量$a^{loc}_.$,以及 每个锚点$j, j \neq i$输出概率(权重)$w_{i,j}$

https://gitee.com/xiaomoon/image/raw/master/Img/image-20210509163911177.png

然后,将这些权重与局部特征相结合,得到相同维数的全局特征向量

$$ \mathbf{a}_{i}^{g l o b}=\sum_{j} w_{i, j} \mathbf{a}_{j}^{l o c} $$

整个过程可以通过矩阵乘法有效地实现,因为所有锚点都执行相同的过程。锚的数量: $N_{anc}$, 局部特征向量的矩阵: $A^{loc} = [a^{loc}_0 ,…,a^{loc}_{N_{anc}-1}]^T$,方程(2)中定义的权值矩阵: $W = [w_{i,j}]_{N_{anc} \times N_{anc}}$,wi,j,因此,全局特征可以计算为

$$ \mathbf{A}^{\text {glob }}=\mathbf{W} \mathbf{A}^{l o c} $$

$\mathbf{A}^{\text {glob }}, \mathbf{A}^{l o c}$维度相同$\mathbf{A}^{\text {glob }} \in \R^{N_{anc}\times C_F \cdot H_F}$

Proposal prediction

每个锚的车道预测由三个主要部分组成:

  • $K+1$ 的概率(K lane types and one class for “background” or invalid proposal)
  • $N_{pts}$补偿(the horizontal distance between the prediction and the anchor’s line)
  • 预测的长$l$(the number of valid offsets); 起始索引$s$( The start-index (s) for the proposal is directly determined by the y-coordinate of the anchor’s origin); 终止索引$e = s + [l] - 1$

将局部和全局特征$a^{loc}_i, a^{glob}_i$结合,得到一个增广特征向量$a^{loc}_i \in \R^{2\cdot C_F \cdot H_F}$,反馈给两个平行的全连接层,一个是分类层($L_{cls}$),一个是分割层($L_{reg}$),$L_{cls}$预测 $p_i = {p_0,…,p_{K+1}}$;$L_{reg}$预测 $r_i = (l,{x_0,…,x_{N_{pts}-1}})$

Non-maximum Supression (NMS)

两个车道 $X_{a}={x_{i}^{a}}_{i=1}^{N_{p t s}}$ 和 $X_{b}={x_{i}^{b}}_{i=1}^{N_{p t s}}$ 之间的距离是基于它们的共同有效指数(或$y$坐标)计算的。设$s\prime = max(s_a, s_b)$和$e\prime = min(e_a, e_b)$为定义的范围。因此,车道距离度量被定义为

$$ D\left(X_{a}, X_{b}\right)=\left\{\begin{array}{ll} \frac{1}{e^{\prime}-s^{\prime}+1} \cdot \sum_{i=s^{\prime}}^{e^{\prime}}\left|x_{i}^{a}-x_{i}^{b}\right|, & e^{\prime} \geq s^{\prime} \\ +\infty, & \text { otherwise } \end{array}\right. $$
### Model training

https://gitee.com/xiaomoon/image/raw/master/Img/image-20210509173054232.png
. LaneATT qualitative results on TuSimple (top row), CULane (middle row), and LLAMAS (bottom row). Blue lines are ground-truth, while green and red lines are true-positives and falsepositives, respectively.

在训练过程中,使用式$D(X_{a}, X_{b})$中的距离度量来定义正锚和负锚。首先,测量每个锚(那些在NMS中没有过滤)和地面真相通道之间的距离。距离$D(X_{a}, X_{b})$低于阈值$\tau _p$的锚被认为是正的,而距离大于$\tau _n$的锚被认为是负的。在这些阈值之间有距离的锚点(及其相关建议)被忽略。剩余的$N_{p&n}$用于定义为的多任务损失

$$ \begin{aligned} \mathcal{L}\left(\left\{\mathbf{p}_{i}, \mathbf{r}_{i}\right\}_{i=0}^{N_{p \& n}-1}\right)=& \lambda \sum_{i} \mathcal{L}_{c l s}\left(\mathbf{p}_{i}, \mathbf{p}_{i}^{*}\right) +\sum_{i} \mathcal{L}_{r e g}\left(\mathbf{r}_{i}, \mathbf{r}_{i}^{*}\right) \end{aligned} $$

实验结果与分析

  • 数据集:TuSimple, CULane,LLAMAS

https://gitee.com/xiaomoon/image/raw/master/Img/image-20210509172348751.png
Overview of the datasets used in this work

  • 输入数据:$H_I \times W_I = 360 \times 640$

  • Epochs: CULane为15;TuSimple为100

  • Intel i9-9900KS ,an RTX 2080 Ti ;

  • $N_{pts} = 72, N_{anc}=1000, \tau _p = 20, \tau _n = 20, K = 1$

Results

  • TuSimple

https://gitee.com/xiaomoon/image/raw/master/Img/image-20210509173204379.png
Model latency vs. F1 of state-of-the-art methods on CULane and TuSimple

https://gitee.com/xiaomoon/image/raw/master/Img/image-20210509173255841.png
State-of-the-art results on TuSimple. For a fairer comparison, the FPS of the fastest method ([20]) was measured on the same machine and conditions as our method. Additionally, all metrics for this method were computed using the official source code, since only the accuracy was available in the paper. The best and second-best results across methods with source-code available are in bold and underlined, respectively

  • CULane

https://gitee.com/xiaomoon/image/raw/master/Img/image-20210509173417745.png
State-of-the-art results on CULane. Since the images in the “Cross” category have no lanes, the reported number is the amount of false-positives. For a fairer comparison, we measured the FPS of the fastest method ([20]) under the same machine and conditions as ours. The best and second-best results across methods with source-code available are in bold and underlined, respectively

  • LLAMAS

https://gitee.com/xiaomoon/image/raw/master/Img/image-20210509173529336.png
State-of-the-art results on LLAMAS

  • Efficiency trade-offs

https://gitee.com/xiaomoon/image/raw/master/Img/image-20210509173558198.png
Efficiency trade-offs on CULane using the ResNet-34 backbone. “TT” stands for training time in hours

  • Ablation study

https://gitee.com/xiaomoon/image/raw/master/Img/image-20210509173726868.png
Ablation study results on CULane