论文阅读:Visual Relationship Detection with Language Priors

时间:2024-04-14 12:56:03

Visual Relationship Detection with Language Priors(ECCV2016)

文章
  尽管大多数的relationship并不常见,但是它们的object和predicate却更频繁地独立出现。paper用这个insight分别独立训练训练object和predicate的模型,然后再进行组合来预测relationship。Visual relationship detection的一个基础挑战在于要从很少的样本进行学习。
  paper的另一个发现是,relationship之间有semantic的关联。比如person riding a horse和person riding an elephant在语义上式相似的,因为horse和elephant都是animal,即使模型没有见过很多person riding an elephant,也可以从person riding a horse进行推断。
  一方面,本文的方法会学习object和predicate的外观模型;另一方面,会使用从language学习到的relationship embedding space。
  visual relation detection中的long-tail现象,只有很少一部分relationship是频繁出现的,许多不常出现的relationship构成了long tail。
  学习visual phrase模型对于object个体的检测是有帮助的,比如检测a person riding a horse有助于提高person和horse的检测和定位。
  整体的框架如下:

论文阅读:Visual Relationship Detection with Language Priors

视觉外观模型:
训练一个卷积网络用以物体分类,另一个卷积网络接收union box为输入进行predicate分类。模型的公式如下:

论文阅读:Visual Relationship Detection with Language Priors

其中i,j代表物体类别,k代表predicate类别。

语言模型: insight是relationship之间是有语义联系的。语言模型将relationship都映射到了一个embedding space,在其中相似的relationship会很近。具体的细节如下:

l 映射函数projection function:
使用预先训练的词向量word vectors,将参与relationship的两个object转换到embedding space,然后将两个vector进行concat在用一个映射函数W转换到relationship vector space

论文阅读:Visual Relationship Detection with Language Priors

其中w_k为600维,t为300维,每个k得到一个score。

l 训练映射函数:
我们希望映射函数f能将相似的relationship映射得更近,比如希望 (man-riding-horse) 离(man-riding-cow)近,但离(car-has-wheel)远。我们用一个启发式的方法来对这个问题进行建模,希望两个relationship之间的距离和它们的对应objects以及predicate之间的word2vec距离成正比。

论文阅读:Visual Relationship Detection with Language Priors

d是两个relationship的object和predicate在word2vec space的cosine距离之和。为了得到上式的结果,也就是我们希望W能使所有的R参与上面的计算得到的constant是很接近的,因此想办法优化方差var,采样数目设为500K,最小化方差

论文阅读:Visual Relationship Detection with Language Priors

l 关系的似然likelihood of a relationship:
映射函数的结果应该能够理想地反映一个visual relationship的似然。比如模型不应该给(dog-drive-car)一个高的似然,因为这几乎不可能发生。基本想法是希望训练集中出现频率越高的relationship的似然也应该更大,paper用一个rank loss来建模

论文阅读:Visual Relationship Detection with Language Priors

注意其中R比R’出现的更频繁,所以希望

论文阅读:Visual Relationship Detection with Language Priors

l 目标函数objective function:

论文阅读:Visual Relationship Detection with Language Priors

这个优化函数能使ground truth relationship的rank大。最终的objective function为:

论文阅读:Visual Relationship Detection with Language Priors

K是关于W的双二次方程,有二次闭式解,在C和L上使用随机梯度下降法,大约迭代20-25次收敛。双二次方程指的是只含偶次项的多项式。

  测试方式:先用RCNN生成candidate object proposals,RCNN是会判断object类别的,然后对每对object pair都用appearance model和language model预测relationship。

论文阅读:Visual Relationship Detection with Language Priors
论文阅读:Visual Relationship Detection with Language Priors

  因为每张image平均有70个predicates和18个objects,数据集的object总类别数为100,predicate总类别数为70,因此总共可能的relationship数目为100x70x100,于是如果随机猜测的话,[email protected]为0.00014(咋算出来的啊?反正就是很低吧)。为什么不用mAP呢,因为数据集没有包含所有可能的关系,假如检测出一个正确的关系(person - taller than - person),但是由于数据集中未标注该关系,因此mAP此时会受到惩罚。
  此外,为了验证组件的性能,paper做了一系列的对比实验,但是由于是2016的会议论文了,效果肯定不如现在的,但能一定程度反应它本身方法的合理性。

论文阅读:Visual Relationship Detection with Language Priors

  scene graph(relation detection)还有一个很重要的作用是图像检索(image retrieval),用对图像的高层次的理解来检索图像。这也是最开始Justin Jonhson在论文“IRetrieval using Scene Graphs”提出scene graph的原因。比如下面就是检索效果

论文阅读:Visual Relationship Detection with Language Priors

  最后值得一提的是,paper还组织人做了和算法测试相同的实验,随机选择了1000个object pair让被测试者判断属于70中predicate中的哪一种,人类能达到98.1%的[email protected]和96.4%的mAP。