Learning to Adapt Structured Output Space for Semantic Segmentation
1.论文基本情况
来源:CVPR 2018
作者:Yi-Hsuan Tsai,Wei-Chih Hung, Samuel Schulter, Kihyuk Sohn, Ming-Hsuan Yang, Manmohan Chandraker
机构:美国NEC实验室,加州大学默塞德分校,加州大学圣地亚哥分校
数据集:
GTA5, SYNTHIA,二者都是生成的数据集,并且已经标记好了标签。They are large-scale synthetic datasets with
annotations。如何把用这些数据集训练出的分割网络,应用到对真实数据集比如Cityscapes进行标
记,这就是领域自适应要做的事情。
Cross-City dataset [3], where annotations are provided in one city (source), while testing the model on
another unseen city (target).。
代码:
实验用到的框架:We implement our network using the PyTorch toolbox on a single Titan X GPU with 12 GB memory.
2.论文主体
尽管图片的外观不同,但是语义分割的输出都是结构化的,二者有很多相似性,比如空间布局和局部上下文。
疑问:什么是空间分布和局部上下文?
本文提出一个多层次的对抗网络,来在不同的特征层次上进行输出空间上的域对齐。疑问:多层次体现在哪儿?
网络由两部分组成,一个是分割网络,另一个是判别器网络。我们的目标是让分割网络对于原域图片的预测和对于目标域图片的预测尽可能的接近。
博客https://blog.csdn.net/m0_37738689/article/details/84067823关于损失函数以及如何进行训练的过程说得很详细。
For the discriminator, we use an architecture similar to [30](A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016) but utilize all fully-convolutional layers to retain the spatial information.
3.损失函数
3.1单层的对抗学习
表示交叉熵损失,用于训练分割网络,该损失把原域图像分割的结果和ground truth做交叉熵损失。
表示对抗损失,用于训练分割网络,使得目标域的分割输出
和原域的分割输出
尽可能地接近。
=G(
)是原域图片输入分割网络后,分割网络的输出。
3.2多层的对抗学习
与单层的相比,损失函数如下:
i 表示用于预测分割输出的那一层。
疑问:
1.都用了哪些层来预测分割输出?用什么标准来选这些层?
2.从这些层出来的分割输出是W*H*C吗?如果不是,代码中如何把它变成?
文中用了从分割网络的第四个卷积层提取出的特征图,加上ASPP模块作为分类器,另外也加上一个新的判别器用于对抗学习。
换句话说,文中提到的多层适配,其实只是比单层适配多了一层而已,并且,由于多了这一层适配,就需要给模型增加额外的模块来实现多层适配。
4.训练过程
概念介绍:
1.语义分割:Semantic segmentation aims to assign each pixel a semantic label, e.g., person, car, road or tree, in an image.
2.使用对抗训练的图片分类任务与使用对抗训练的语义分割任务的区别:
For image classification,one effective approach is to align features across two domains [8, 25] such that the adapted features can generalize to both domains. Similar efforts have been made for semantic segmentation via adversarial learning in the feature pace [3, 13]. However, different from the image classification task, feature adaptation for semantic segmentation may suffer from the complexity of high-dimensional features that needs to encode diverse visual cues, including appearance, shape and context.
主要区别就是语义分割提取出的特征是高维的,并且很复杂。基于此,本文不去用特征来适配(即在特征空间进行适配),而是在像素级别来进行适配。语义分割的输出是在低维空间上的,但是包含了丰富的信息,比如布局和上下文,故本文采用在语义分割的输出上进行适配。
3.语义分割和分类任务的区别:
分类把一张图片分为某一类,语义分割把一张图片中的每个像素分成某一类。比如手写数字分类,给定一张图片,把它分成0到9这10类中的某一类。语义分割,给一张只有行人,道路,车辆,房屋,天空的图片。语义分割把该张图片中的每一个像素分成行人,道路,车辆,房屋,天空中的某一类。
4.语义分割网络模型:
As proposed by Long et al. [24],one can transform a classification CNN (e.g., AlexNet [19], VGG [33], or ResNet [11]) to a fully-convolutional network (FCN) for semantic segmentation.
用FCN来做语义分割。这个网络的介绍见博客https://blog.csdn.net/qq_36269513/article/details/80420363
词句摘抄:
Labeling process is tedious and labor intensive。(这两个表语用的不错)
In such cases, relying only on the supervised model that requires re-annotatingper-pixel ground truths in different scenarios would entailprohibitively high labor cost.(entail用的不错)