论文笔记:Decoders Matter for Semantic Segmentation: Data-Dependent Decoding Enables Flexible Feature ...

Decoders Matter for Semantic Segmentation: Data-Dependent Decoding Enables Flexible Feature Aggregation git

2019-04-24 16:53:25

github

Paperhttps://arxiv.org/pdf/1903.02120.pdf 网络

Code(unofficial PyTorch Implementation)https://github.com/LinZhuoChen/DUpsampling app

 

1. Background and Motivation: 框架

常规的 encoder-decoder 模型中,decoder 部分采用的是双线性插值的方法,进行分辨率的提高。可是,这种粗暴的方式,对分割问题适应吗?做者提出一种新颖的模型来替换掉双线性插值的方式,即依赖于数据的上采样模型(data-dependent upsampling (DUpsampling) to replace bilinear)。这么作的好处是:充分利用了语义分割问题 label space 的冗余性,而且能够恢复出 pixel-wise prediction。那么,具体该怎么作呢?在 DeepLabv3+ 中,decoder 的定义以下图所示:函数

 

这种框架带来了以下的问题:学习

1). encode 的整体步长必须用多个空洞卷积来下降。这种操做须要不少的计算代价。优化

2). decoder 一般须要在底层融合特征。由于 bilinear 的问题,致使最终融合的拟合程度是由融合的底层特征分辨率决定的。这就致使,为了获得高分辨率的预测结果,decoder 就必须融合底层高分辨率的特征。这种约束,限制了 feature aggregation 的设计空间,从而获得的是 suboptimcal 的特征组合。在本文的实验中,做者发现:若是能够进行不受到分辨率约束的特征聚合,那么就能够设计更好的特征聚合的方法。 ui

 

 

2. Our Approachthis

2.1 Beyond Bilinear: Data-dependent Upsampling

咱们用 F 表示用 encoder 对输入图像进行卷积以后的输出特征,Y 表示其真值。常规的分割任务中,用到的损失函数以下所示:

此处,损失函数一般是 cross-entropy loss,而 bilinear 用于上采样 F 获得与 Y 相同分辨率的图像。做者认为此处用双线性插值的方式进行上采样,并不是是最好的选择。因此,做者在这里不去计算 bilinear(F) 和 Y 之间的偏差,而是去计算将 Y 下降分辨率后的图像和 F 之间的偏差。注意到,这里 F 和下降分辨率后的 Y,是具备相同分辨率的。为了将 Y 进行压缩,做者用一种在一些度量方式下的转换,来最小化 Y 和 低分辨率 Y 之间的重构偏差。具体来讲,做者首先将 Y 进行划分,对于每个 sub-window S,将其 reshape 成一个 {0, 1} 向量 v。最终,咱们压缩 v 为低维度的向量 x,而后水平和竖直的进行堆叠 x,构成最终 。 

 

因此,这里的转换能够用矩阵 P 和 W 来表示,即:

咱们能够在训练集上经过最小化重构偏差,来学习获得 P 和 W:

 

做者用 PCA 的方法能够获得该函数的闭合解。从而,能够获得关于真值 Y 的压缩版本真值。有了这个做为学习的目标,咱们能够 pre-train 一个网络模型,经过计算其回归损失函数,以下所示:

 

因此,任何的回归损失,l2 能够用于上述公式 4。可是,做者认为更直观的一种方式是计算在 Y 空间内的损失。因此,做者用学习到的重构矩阵 W 来上采样 F,而后计算反压缩的 F 和 Y 之间的偏差,而不是对 Y 进行压缩处理:

 

这里的 DUpsample(F)的过程,以下图所示:

 

有了这个线性转换的过程,DUpsample (F) 采用线性上采样的方式对每个 feature f 进行处理 Wf。与公式 1 相比,咱们已经用一种 data-dependent upsampling 的方式,替换掉了 the bilinear upsampling 的方法,而这种转换矩阵,是从真值 labels 上进行学习。这种上采样的过程,与 1*1 卷积的相同,也是沿着 spatial dimension,卷积核是存在 W 中。这个 decompression 的过程,如上图 3 所示。

 

 

2.2 Incorporatinig DUpsampling with Adaptive-temperature Softmax 

截止目前为止,咱们已经介绍了如何将这种 DUpsampling 结合到 decoder 中,接下来将会介绍如何将其结合到 encoder-decoder framework 中。因为 DUpsampling 能够用 1*1 的卷积操做来实现,将其直接结合到该框架中,会遇到优化的问题,即:收敛很是慢。为了解决这个问题,咱们采用 softmax function with temperature, 即在原始的 softmax 函数中,添加一个 temperature T,以 soften/sharpen the activation of softmax:  

 

咱们发现,T 能够自动的用反向传播进行学习,而不须要微调。

 

2.3 Flexible Aggregation of Covolutional Features 

 

固然原始 feature aggregation 的方法是存在以下问题的:

 

 

 

主要问题是:

 

1). is applied after upsampling. Since is a CNN, whose amount of computation depends on the spatial size of inputs, this arrangement would render the decoder inefficient computationally.  Moreover, the computational overhead prevents the decoder from exploiting features at a very low level.

 

2). The resolution of fused low-level features Fis equivalent to that of F, which is typically around 1/4 resolution of the final prediction due to the incapable bilinear used to produce the final pixel-wise prediction. In order to obtain high-resolution prediction, the decoder can only choose the feature aggregation with high-resolution low-level features.  

 

 

 

此外,本文的另一个亮点在于:本文的多层特征的融合,不在局限于底层特征。做者将原始的 feature map,都进行降采样成统一的维度,而后沿着 channel 的方向,进行拼合。

 

做者发现,仅当使用了做者提出的 DUpsampling layer 的时候,这种下采样拼合的方式,才能够提高最终分割的精度。

 

 

3. Experiment: 

 

 

 

==

相关文章
相关标签/搜索