论文-《Bottom-Up and Top-Down Attention for Image Captioning and Visual Question Answering 》重点翻译+扩展
摘要Abstract Top-down:
Top-down visual attention mechanisms have been used extensively in image captioning and visual question answering (VQA) to enable deeper image understanding through fine-grained analysis and even multiple steps of reasoning.
从上到下的视觉注意力机制被广泛的应用于image captioning和VQA领域,以通过细粒度分析甚至多个推理步骤来加深对对象的理解。
Within our approach, the bottom-up mechanism (based on Faster R-CNN) proposes image regions, each with an associated feature vector, while the top-down mechanism determines feature weightings.
在我们的方法里,从底向上机制(基于Faster R-CNN)提出图像区域,每个区域又一个相关的特征向量,而从上到下机制确定特征权重。
注释:
Faster R-CNN(主要包括RPN + CNN + ROI或者RPN+CNN+Fast R-CNN),发展的过程大体可以概括为R-CNN——Fast R-CNN——Faster R-CNN——Mask R-CNN,都是将神经网络应用于目标检测的典型代表,首先是R-CNN将CNN应用于目标检测中取得了较大的成效,后面几个网络都是在前面的基础上进行了改进,在速度和准确率方面都有了很大的提升。
主要步骤:
1.对整张图片输进CNN,得到feature map
2.卷积特征输入到RPN,得到候选框的特征信息
3.对候选框中提取出的特征,使用分类器判别是否属于一个特定类
4.对于属于某一类别的候选框,用回归器进一步调整其位置
介绍Introduction Problems:
In this paper we adopt similar terminology and refer to attention mechanisms driven by non-visual or task-specific context as‘top-down’, and purely visual feed-forward attention mechanisms as‘bottom-up’.
在本文中,我们采用了类似的术语,将由非视觉或者特定任务环境驱动的注意力机制成为从上到下,纯粹的视觉前馈注意力机制成为自底向上。
We first present an image captioning model that takes multiple glimpses of salient image regions during caption generation. Empirically, we find that the inclusion of bottom-up attention has a significant positive benefit for image captioning.
我们首先提出了一个图像字幕模型,这个模型在字幕生成期间多次捕捉到显著区域的瞬时信息。通过实验,我们发现从低向上机制对图像字幕带来了显著的好处。
相关工作Related Work:
Typically, these models can be characterized as top-down approaches, with context provided by a representation of a partially-completed caption in the case of image captioning, or a representation of the question in the case of VQA .
通常,这些模型被称为从上到下方法,上下文由图像字幕领域部分完成的字幕或者VQA领域的问题表示。
Jin et al. use selective search to identify salient image regions, which are filtered with a classifier then resized and CNN-encoded as input to an image captioning model with attention.
Jin等人使用选择性搜索来识别显著的图像区域,这些区域通过过滤器来分类,然后调整大小并通过CNN编码作为输入,以引起图像字母的注意。
The Areas of Attention captioning model [30] uses either edge boxes [52] or spatial transformer networks [17] to generate image features, which are processed using an attention model based on three bilinear pairwise interactions [30]
注意力字幕模型的区域使用边缘盒或者空间转移网络生成图像特征,这些特征使用基于三种双线性两两交互的注意力特征进行处理。
Faster R-CNN detects objects in two stages. The first stage, described as a Region Proposal Network (RPN), predicts object proposals. In the second stage, region of interest (RoI) pooling is used to extract a small feature map (e.g. 14×14) for each box proposal.
Faster R-CNN检测对象分为两步,第一步描述为RPN,预测object proposals(提取框)。第二步,利用RoI对每个 box proposal.提取一个小的特征图像(例如14*14)。
注意:
RPN 网络的作用是输入一张图像,输出一批候选矩形区域(region proposal),同时输出的还有区域得分。简单来说,RPN就像是Fast R-CNN的注意力机制,它告诉Fast R-CNN应该往哪看,应该确定图像中哪些物体为目标物体。
In this work, we use Faster R-CNN in conjunction with the ResNet-101 [13] CNN.
在这项工作中,我们使用Faster R-CNN和ResNet-101。
注释:
残差网络是由来自Microsoft Research的4位学者提出的卷积神经网络,在2015年的ImageNet大规模视觉识别竞赛(ImageNet Large Scale Visual Recognition Challenge, ILSVRC)中获得了图像分类和物体识别的优胜。 残差网络的特点是容易优化,并且能够通过增加相当的深度来提高准确率。其内部的残差块使用了跳跃连接,缓解了在深度神经网络中增加深度带来的梯度消失问题。
To generate an output set of image features V for use in image captioning or VQA, we take the final output of the model and perform non-maximum suppression for each object class using an IoU threshold.
为了生成用于image captioning或者VQA图像特征的输出集V,我们获取模型最终输出并且对每个对象类使用IoU阈值执行非最大抑制。
注释:
1.非极大值抑制,简称为NMS算法,英文为Non-Maximum Suppression。其思想是搜素局部最大值,抑制极大值。
2.IoU,是产生的候选框(candidate bound)与原标记框(ground truth bound)的交叠率,即它们的交集与并集的比值,理想情况下是完全重叠,即比值为1,一般约定,在计算机检测任务中,如果IoU≥0.5,就说检测正确。当然0.5只是约定阈值,你可以将IoU的阈值定的更高。IoU越高,边界框越精模型确。
字幕模型Captioning Model:
Within the captioning model, we characterize the first LSTM layer as a top-down visual attention model, and the second LSTM layer as a language model, indicating each layer with superscripts in the equations that follow.
在字幕模型中,我们将第一个LSTM层描述为自顶向下的视觉注意力模型,第二个LSTM层作为一个语言模型,在下边的等式中将用上标表示每个层。
Note that the SCST approach uses ResNet- 101 encoding of full images, similar to our ResNet baseline.
注意SCST方法使用的ResNet-101编码的完整图像,类似于我们的ResNet baseline。
注意:
1.Baseline:表示基线,通俗的讲,一个算法被称为baseline,基本上表示比这个算法性能还差的基本上不能接受,表示还有巨大的改进空间和超越benchmark的潜力,所以baseline有一个自带的含义就是“性能起点”。在算法继续优化和调参数的过程中,你的目标是比这个性能更好,因此需要在这个base line的基础上往上跳。
Benchmark:表示里程碑,通俗的讲,一个算法之所以被称为benchmark,是因为它的性能已经被广泛研究,人们对它性能的表现形式、测量方法都非常熟悉,因此可以作为标准方法来衡量其他方法的好坏。
state-of-the-art(SOTA):表示最先进的,能够称为SOTA的算法表明其性能在当前属于最佳性能。
2.self-critical sequence training(SCST)使用强化学习来训练image captioning模型,它是一种REINFORCE算法,但它不使用baseline来正规化rewards以减小方差,而是使用新的test-time inference算法来正规化reward。