Temporal Segment Networks 核心

Temporal Segment Networks 核心

标签(空格分隔): 论文笔记


Temporal Segment Networks 这篇是ECCV2016年一篇关于视频分类的论文。借鉴的是TwoStream网络的方法,但是,在这基础上有所改进。

这里大体介绍一下TwoStream网络的方法。在视频分类任务中,比较好的网络,既能够抓住视频的形状特征(apperance feature),又能够抓住视频的动态特征(temproal feature),显然TwoStream网络就是来处理这样的问题,TwoStream网络由两部分组成:(1)空间网络,Spatial Network;(2)时间网络,temproal Network;两个网络结构是一样的,不一样的是输入不同,空间网络是用来表达空间特征(apperance feature),因此输入为RGB图像;而时间网络是用来挖掘视频序列中动态特征的,因此,输入为光流图像。

原始数据集中,是以短视频的形式展现的,但是,输入网络中,实际是以图像的形式的。这样就有说头了,视频到图像必须采样,怎么采样呢?在TwoStream中,是连续采样!而这篇论文怎么采样呢?

在文中,作者描述了当前(2015年左右)深度学习应用于视频分类存在的两大问题。文中是这么说的:

  1. First, long-range temporal structure plays an important role in understanding the dynamics in action videos.However, mainstream ConvNet frameworks usually focus on appearances and short term motions, thus lacking the capacity to incorporate long-range temporal structure. Recently there are a few attempts to deal with this problem. These methods mostly rely on dense temporal sampling with a pre-defined sampling interval. This approach would incur excessive computational cost when applied to long video sequences, which limits its application in real-world practice and poses a risk of missing important information for videos longer than the maximal sequence length.
  2. Second, in practice, training deep ConvNets requires a large volume of training samples to achieve optimal performance. However, due to the difficulty in data collection and annotation, publicly available action recognition datasets (e.g. UCF101, HMDB51) remain limited, in both size and diversity. Consequently, very deep ConvNets, which have attained remarkable success in image classification, are confronted with high risk of over-fitting.

简单的说,就是这样两个问题:

(1)在很多短视频中,特别是运动视频,它的动作都是经历了比较长的时间,而如果是连续采样的话,就不能够学习到非常具有判别性的特征(discriminated feature)!此外,连续采样还会造成两大问题(1)连续帧的信息有很多是重复的;(2)连续帧导致计算量增大(直击TwoStream的短板);
(2)训练过拟合,在2015年左右,较为成熟的视频分类数据集,应该只有UCF101和HMDB51,因此,作者当时提出了一些训练技巧,来避免这样的问题存在。

针对当时存在的两个问题作者紧接着提出了,解决方案:

  1. This framework extracts short snippets over a long video sequence with a sparse sampling scheme, where the samples distribute uniformly along the temporal dimension. Moreover, this sparse sampling strategy preserves relevant information with dramatically lower cost, thus enabling end-to-end learning over long video sequences under a reasonable budget in both time and computing resources.
  2. 1) cross-modality pre-training; 2) regularization; 3) enhanced data augmentation. Meanwhile, to fully utilize visual content from videos, we empirically study four types of input modalities to two-stream ConvNets, namely a single RGB image, stacked RGB diffierence, stacked optical flow field, and stacked warped optical flow field.

(1)连续采样不行的话,那就均匀稀疏采样,这样一是能够减小计算量;二是能 抓住视频中的Long-range的信息;
(2)提高准确率的一些技巧!包括:A.不同模态预训练;B.正则化;C.数据增强。最重要的是:在文中,作者采用了最多四种模态的信息包括:帧差图像、光流、warp光流、RGB

Temporal Segment Networks网络结构以及网络输入

Specifically, our proposed temporal segment network framework, aiming to utilize the visual information of entire videos to perform video-level prediction, is also composed of spatial stream ConvNets and temporal stream ConvNets. Instead of working on single frames or frame stacks, temporal segment networks operate on a sequence of short snippets sparsely sampled from the entire video. Each snippet in this sequence will produce its own preliminary prediction of the action classes. Then a consensus among the snippets will be derived as the video-level prediction.

上面这段话,基本上概括了,网络输入以及怎样预测的。
Temporal Segment Networks 核心_第1张图片

为了能够使网络使用整段视频的信息,来对视频分类(将整段视频喂入网络,显然是不现实的)。作者就采用稀疏采样的方法,从整段视频中采样某些帧组成一节帧序列(a sequence of short snippets)。显然,可以采样得到很多帧序列,这些帧序列 分别输入网络,每一个帧序列可以得到一个该视频分类分数,可以将这些帧序列所得分数进行结合(结合方法:平均、加权平均、取最大值)得到最终的类别分数。以上是预测(测试)方法。

在训练时,将视频平均分成K段,从每一段随机选出一帧输入网络,进行训练。

网络的基本结构是BN_Inception以及输入是开头说的四种模态,具体细节看论文和对应的代码!

TSN的训练策略

深度学习最重要的一方面是网络结构的设计;另一方面,训练策略能够直接提高网络的性能。特别地,当训练数据集比较小的时候,网络特别容易过拟合。在TSN中,训练RGB模态对应的网络时,可以采用在ImageNet预训练的模型,进行初始化网络,然后进行fine-tuning。但是对于光流、帧差、warp光流这些模态怎么处理呢?

作者提出了Cross Modality Pre-training的方式,即设法用RGB模态的网络权值来初始化其他模态网络的权值!当然不能直接拷贝过去,因为数据分布就不一样!怎么呢办呢?将其他模态的数据线性扩展到0~255(RGB的数据分布)。

输入数据分布的改变直接影响到网络的第一个卷积层,因此,作者修改人为的修改了第一层卷积层的权值,按照输入维度进行平均后,复制到其他输入通道。

除此之外,作者还提出了partial BN,具体就是,我们冻结住除第一层之外的Batch Normalization

这两点训练测量是作者通过实验提出来的,其他比如DropOut数据增强的方法就比较常见了!具体细节就看论文了!

你可能感兴趣的:(深度学习与计算机视觉,论文笔记)