Gated Siamese Convolutional Neural Network Architecture for Human Re-Identification 泛读记录

概述

目前ReID主流方法是孪生卷积神经网络,网络将每个ID(身份)映射至嵌入空间中,使得相同身份图片距离更近,不同身份图片距离更远。但这些方法只在最后一层特征中比较两个图片的相似性,这样可能忽略掉了对区分目标重要的中间层信息。因此本文作者提出基于门限函数(gating function)的S-CNN。
使用门限函数来比较图像对的中间层特征并方大局部相似性,将更相关的特征传播至高层。这样使得网络判别能力更强。虽然图像对视角不同,并且图片拍摄位置也不同,但作者认为,图片都转化为同一假设,假设水平方向行对应,即提取的特征的同一行描述相同的特征(下图每个水平条纹对应图片对中的相同特征)。整个过程大致是,用gating function 总结水平方向的局部特征,计算欧氏距离后使用高斯**函数输出相似性值,再加上原特征增强局部特征。gating function 可微,适用于端训练。主要贡献:
1.性能不错的baslin S-CNN
2.主干网络最后四层增加gating function,利用中间层,增强判别能力
3.实验
个人理解:为特征中间层设计的一个“插件”,在水平方向比较局部特征,将更重要的特征传至下一层。

Gated Siamese Convolutional Neural Network Architecture for Human Re-Identification 泛读记录

Baseline Siamese CNN

Gated Siamese Convolutional Neural Network Architecture for Human Re-Identification 泛读记录
图片调整至128$\times$64分辨率,所有图片减去均值图片,池化层只有3层,减少信息丢失。在4-6层使用了非对称卷积核,保持第三层输出的行数,且使列数逐步变成1。使用小卷积核使网络更深,BN,Parametric rectified linear unit帮助训练。

Matching Gate

三个部分组成:
Gated Siamese Convolutional Neural Network Architecture for Human Re-Identification 泛读记录

Feature summarization

确定水平方向上各特征的重要性。
Gated Siamese Convolutional Neural Network Architecture for Human Re-Identification 泛读记录
Gated Siamese Convolutional Neural Network Architecture for Human Re-Identification 泛读记录第一个分支网络的特征输出的第r行,c为特征图宽(列数),h为通道数。Gated Siamese Convolutional Neural Network Architecture for Human Re-Identification 泛读记录对其卷积(没有padding),再经过**函数f。

Feature Similarity computation

计算Feature summarization部分输出的欧氏距离,说明了每个特征维度的距离。
Gated Siamese Convolutional Neural Network Architecture for Human Re-Identification 泛读记录
Gated Siamese Convolutional Neural Network Architecture for Human Re-Identification 泛读记录是Feature summarization输出的一维列向量的第r行。P可以在训练中学习到。

Filtering and Boosting the features

增强局部特征,
Gated Siamese Convolutional Neural Network Architecture for Human Re-Identification 泛读记录
X为Match Gating 的输入,grig_r^i为Feature Similarity computation输出,GriG_r^igrig_r^i列方向重复C次,计算得到新特征ar1,ar2a_{r1},a_{r2},将该特征输入到下一层中进行特征提取。当P值较大时候,允许最大的信息流过,当p值较小时,只有两个局部特征较为接近时候,g才接近1,即仅仅允许非常相似的区域通过。

Contrastive Loss 对比损失

L=12Nn=1Nyd2+(1y)max(margind,0)2L = \frac{1}{2N}\sum_{n=1}^{N}yd^2 + (1-y)max(margin-d,0)^2
d为欧氏距离 ,正样本对y=1,反之为0。margin 训练时设为1。