现有方法

1.构建数据集时近似均匀地采样,保证每种类别分布较为均匀

  • 这种方法在image-level上还比较方便操作,在semantic segmentation上难以保证

2.对minority classes进行上采样或者对majority classes进行下采样缺点:

  • 会改变数据潜在分布
  • 对数据不是最优利用(suboptimal exploitation),比如可能会丢掉一些majority classes的数据
  • 增加计算成本和过拟合的风险,比如某些minority classes数据会被重复利用很多次

3.cost-sensitive learning

  • 现在semantic segmentation datasets增加了更多的minority classes,这使得权重的划分更复杂

所以这篇文章提出了一种新的解决方法:Loss Max-Pooling


主要思想

1.通过pixel weighting functions自适应地对每个像素的contribution(实际展现的loss)进行re-weighting

  • 引起更高loss的像素的权重更大,这直接对潜在的类内和类间不平衡进行了补偿
  • Focus on a family of weighting functions with bounded p-norm and 【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation-norm

2.通过普通的max-pooling在pixel-loss level上对pixel weighting function取最大

3.而这个最大值是传统loss(即每个像素损失的权重是相等的)的上界


数学分析

Standard setting

语义分割任务中损失公式定义如下:

【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation

【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation是损失函数,【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation是正则项

在普通semantic segmentation中,损失又可继续写成:

【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation

其中:

  • 【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation是每个像素的损失,【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation是定义的求和符号
  • 可见每个像素损失的权重是均匀的,这将使学习器偏向于图像中的主要部分



Loss Max-Pooling

文章设计了一个weighting function的convex, compact的空间,【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation,其中包括了均匀加权的情况,即【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation

得到的损失函数如下:

【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation

之后,文章定义了一个新的损失,即对不同weighting functions下的损失取最大:

【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation

而这是文章中定义的所有损失函数的上界,包括传统的均匀加权的损失。文章提到这里的取最大值其实就是,max-pooling在pixel-loss level上的应用,所以这种方法才叫做 Loss Max-pooling。

Loss Max-Pooling的特性取决于空间【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation的形状。所以,文章中对空间【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation进行了一些限定。


The space 【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation of weighting functions

文章中关注的是由【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation范数和【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation范数限定的weighting functions,这里对【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation范数和【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation范数也进行了限定。【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation

其中,【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation的取值范围是【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation

【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation

Left:二维情况下【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation的图形,其中【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation

Right:当【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation时的【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation


通过改变【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation可以控制pixel selectivity degree of the pooling operation

一方面:

  • As 【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation , the optimal weights will be in general concentrated around a single pixel
  • As 【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation , the optimal weights will be uniformly spread across pixels

另一方面:

  • 【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation可以通过关系,【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation 控制被optimal weighting function support的最小像素数(我的理解是,其实就是保证至少多少像素被赋予权重)
可以由下面两幅图来理解:

【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation

图中选取了100个像素,同时为了可视化对像素进行了排序。

由左图可以看到,当【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation接近【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation的时候,权重变成了均匀加权(蓝色虚线);当【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation接近1时,权重变得很陡峭,但是【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation的限制保证了至少需要support的像素数。

由右图可以看出,当【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation时权重又变为了均匀加权(红色虚线),而每个值都对应了一段平均加权,也就说明【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation代表了像素共享权重的程度。


之后文章主要介绍了对【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation的计算,计算时采用了对偶的方式来求解,最后转化为对【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation的计算,具体详细证明可以请看论文。最后算法流程如下:

【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation

文中还提到了一个辅助的取样策略,综合考虑了均匀采样和模型性能。因为文中并未细说,同时也不是本文重点,所以在此不赘述了。


实验结果

【简评】[CVPR2017]Loss Max-Pooling for Semantic Image Segmentation

LMP是Loss Max-pooling+辅助取样策略的结果;Proposed loss only是不加辅助取样策略的结果;所有结果没有使用multi-scale input和CRF做进一步优化。


原文发布时间为: 2017-06-15

本文作者:ycszen

本文来自云栖社区合作伙伴极市网,了解相关信息可以关注极市网。

相关文章:

  • 2021-09-18
  • 2021-08-06
  • 2021-04-09
  • 2021-04-25
  • 2021-05-29
  • 2021-12-23
  • 2021-12-18
  • 2022-01-08
猜你喜欢
  • 2021-10-03
  • 2021-10-20
  • 2021-10-18
  • 2022-01-04
  • 2021-07-13
  • 2021-09-16
  • 2022-12-23
相关资源
相似解决方案