LaneATT 论文学习笔记

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6

论文《Keep your Eyes on the Lane: Real-time Attention-guided Lane Detection》

地址https://arxiv.org/abs/2010.12035v2

代码https://github.com/lucastabelini/LaneATT

整体结构

在这里插入图片描述

车道线的表示方式

L a n e = { ( x i , y i ) } i = 0 N p t s − 1 ,      y i = i ⋅ H i m a g e N p t s − 1 Lane=\{(x_i,y_i)\}^{N_{pts}-1}_{i=0},\ \ \ \ y_i=i\cdot\frac{H_{image}}{N_{pts}-1} Lane={(xi,yi)}i=0Npts1,    yi=iNpts1Himage

s: 起始点 index

e: 终止点 index

anchor 的表示方式
  1. 位于图像边缘的初始点 O = ( x o r i g , y o r i g ) O=(x_{orig}, y_{orig}) O=(xorig,yorig)
  2. 角度 θ \theta θ
模型输出
  1. K + 1 K+1 K+1 个概率值对应 K 条车道线1 个 background
  2. ` N p t s N_{pts} Npts 个偏移量以衡量 prediction 与 anchor 之间的水平距离
  3. 长度 l l l具体指有效偏移量的个数

起始点 s 被定义为 y o r i g y_{orig} yorig;

终止点 e 被定义为 e = s + ⌊ l ⌋ − 1 e=s+\lfloor l\rfloor -1 e=s+l1;

损失函数

Focal Loss 与 Smooth L1 Loss

骨干网

一般的CNN都可以原文中又用了一个 1 × 1 1\times 1 1×1 的 Conv 对骨干网输出的特征通道 F b a c k ∈ R C F ′ × H F × W F \pmb{F}_{back}\in \mathbb{R}^{C'_F\times H_F\times W_F} FbackRCF×HF×WF进行了缩减 F ∈ R C F × H F × W F \pmb{F}\in \mathbb{R}^{C_F\times H_F\times W_F} FRCF×HF×WF

Anchor-based Feature Pooling

将图像上的 Anchor ( x o r i g , y o r i g , θ ) (x_{orig},y_{orig},\theta) (xorig,yorig,θ) 投影到特征得到 { ( x j , y j )   ∣   y j = 0 , 1 , 2 , . . . , H F − 1 } \{(x_j,y_j)\ |\ y_j=0,1,2,...,H_F-1\} {(xj,yj)  yj=0,1,2,...,HF1}

x j = ⌊ 1 tan ⁡ θ ( y j − y o r i g s t r i d e b a c k b o n e ) + x o r i g s t r i d e b a c k b o n e ⌋ y j = 0 ,    1 ,    2 ,    . . . ,    H F − 1 \begin{aligned} x_j&=\lfloor\frac{1}{\tan\theta}(y_j-\frac{y_{orig}}{stride_{backbone}})+\frac{x_{orig}}{stride_{backbone}}\rfloor\\ y_j&=0,\ \ 1,\ \ 2,\ \ ...,\ \ H_F-1 \end{aligned} xjyj=tanθ1(yjstridebackboneyorig)+stridebackbonexorig=0,  1,  2,  ...,  HF1

Attention 方案

利用局部 anchor 特征构建辅助 anchor 特征以集成全局信息。

w i , j = { softmax ( L a t t ( a i l o c a l ) ) j , if  j < i 0 , if  j = i softmax ( L a t t ( a i l o c a l ) ) j − 1 , if  j > i a i g l o b a l = Σ j w i , j a j l o c a l \begin{aligned} w_{i,j}&=\begin{cases} \text{softmax}(L_{att}(\pmb{a}^{local}_i))_j,&\text{if}\ j<i\\ 0,&\text{if}\ j=i\\ \text{softmax}(L_{att}(\pmb{a}^{local}_i))_{j-1},&\text{if}\ j>i\\ \end{cases}\\ \pmb{a}^{global}_{i}&=\Sigma_{j}w_{i,j}\pmb{a}^{local}_{j} \end{aligned} wi,jaiglobal= softmax(Latt(ailocal))j,0,softmax(Latt(ailocal))j1,if j<iif j=iif j>i=Σjwi,jajlocal

  • 符号的含义可见上图
  • 实际使用的是矩阵形式
阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6