paper:Learning Lightweight Lane Detection CNNs by Self Attention Distillation
Code:github
Abstract
Without learning from much richer context
, these models often fail in challenging scenarios
.
本文提出了一个新的知识蒸馏方法:Self Attention Distillation
,模型可以learn from itself
and gains substantial improvement without any additional supervision or labels.
SAD can be easily incorporated in any feedforward convolutional neural networks (CNN) and does not increase the inference time
.
The lightest model, ENet-SAD
, performs comparatively or even surpasses existing algorithms. Notably, ENet-SAD has 20 × fewer parameters and runs 10 × faster compared to the state-of-the-art SCNN
.
Self Attention Distillation
Attention maps derived from different layers would capture diverse and rich contextual information.
在训练一半的模型中加入SAD,the preceding block to mimic the attention maps of a deeper block.
加入SVD后,一方面浅层block的attention map被修正,提取到更丰富的上下文信息;另一方面浅层学习到更好的特征反作用于深层。
SAD is only used in the training phase and brings no computational cost during the deployment.
![](https://img-blog.csdnimg.cn/20190813150501734.png)
![](https://img-blog.csdnimg.cn/2019081315063965.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JhaWR1XzI3NjQzMjc1,size_16,color_FFFFFF,t_70)
网络总的损失函数:
![](https://img-blog.csdnimg.cn/20190813150807747.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2JhaWR1XzI3NjQzMjc1,size_16,color_FFFFFF,t_70)
L
e
x
i
s
t
L_{exist}
Lexist :the binary cross entropy loss.
s
~
\tilde{s}
s~ : the segmentation map produced by the network
b
~
\tilde{b}
b~ :the prediction of the existence of lanes.
Lane Prediction
p1支路预测车道线是否存在.
Lane Post-processing
类似SCNN
First, we use a 9 × 9 kernel to smooth the probability maps. Then,
for each lane whose existence probability is larger than 0.5, we search the corresponding probability map every 20 rows for the position with the highest probability value. Finally, we use cubic splines to connect these positions to get the final output. The process improves the final lane prediction results as it removes noises in the probability maps.
Result