【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》

【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》_第1张图片

CVPR-2019


文章目录

  • 1 Background and Motivation
  • 2 Advantages / Contributions
  • 3 Standard Baseline
  • 4 Method
    • 4.1 Warmup Learning Rate
    • 4.2 Random Erasing Augmentation
    • 4.3 Label Smoothing
    • 4.4 Last Stride
    • 4.5 BNNeck
    • 4.6 Center Loss
  • 5 Experiments
    • 4.1 Datasets
    • 4.2 Influences of Each Trick (Same domain)
    • 4.3 Influences of Each Trick (Cross domain)
    • 4.4 Comparison of State-of-the-Arts
    • 4.5 Analysis of BNNeck
    • 4.6 Influences of the Number of Batch Size
    • 4.7 Influences of Image Size
  • 5 Conclusion(own)


1 Background and Motivation

ReID 任务很多相关工作都是在一个相对较低的 baseline 上开展的,且许多 improvements were mainly from training tricks rather than methods themselves

本文作者 collect and evaluate 一些 effective training tricks in person ReID 任务,提出一个 SOTA 的较为规范的 baseline

2 Advantages / Contributions

仅用 global feature(而不是 concatenate multi-branch features)

实现 94.5% rank-1 and 85.9% mAP on Market1501

3 Standard Baseline

【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》_第2张图片

一个 batch 又 P 个 人,每个人 K 张图片,经过 backbone 提取出 ReID features(比如 1024 维),然后接个 FC 计算出 ID prediction logits 来判断图片中的人是谁

Triplet loss 让同一个人的特征靠近,不同人的特征拉远

ID loss 让网络学会预测图片中的人是谁

4 Method

在 standard baseline 基础上,加入了 6 个 tricks

【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》_第3张图片

4.1 Warmup Learning Rate

【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》_第4张图片
【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》_第5张图片

花 10 个 epoch 慢热,然后慢慢减小学习率

4.2 Random Erasing Augmentation

【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》_第6张图片

0.3

0.02<面积占比<0.4

4.3 Label Smoothing

在这里插入图片描述
ε \varepsilon ε 为 0.1

具体理论参考 【Inception-v3】《Rethinking the Inception Architecture for Computer Vision》

4.4 Last Stride

backbone 的最后一个 stage 的 stride 变为 1,这样保证了特征图的分辨率

4.5 BNNeck

【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》_第7张图片

ID loss 优化的是 cosine distance(找超平面,图 6(a)中的黄色虚线)

triplet loss 优化的是 euclidean distance(图 6 (b),类内紧凑,类间距离拉大)

如果联合二者一起优化,a possible phenomenon is that one loss is reduced,while the other loss is oscillating or even increased

作者的解决方法是通过改变下 ID loss 中 logits 的分布!达到利于优化的目的

【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》_第8张图片

BNNeck 结构中 FC 层去掉了 bias,这样能保证 ID loss 的 hyper-planes 经过 coordinate axis

道理同 y = kx 能过原点, y = kx+b (b≠0) 不过原点

4.6 Center Loss

在这里插入图片描述
triplet loss 中 d p d_p dp and d n d_n dn are feature distances of positive pair and negative pair. α \alpha α is the margin of triplet loss, [ x ] + [x]_+ [x]+ 等价于 m a x ( 0 , x ) max(0,x) max(0,x),更多细节可以参考 Triplet-Loss原理及其实现、应用

上面 loss 的形式有个缺点, d p d_p dp d n d_n dn 为 0.3 与 0.1 时和为 1.3 与 1.1 时 loss 是一样的

Triplet loss is determined by two person IDs sampled randomly. It is difficult to ensure that d p d_p dp < d n d_n dn in the whole training dataset.

作者引入了 center loss 来 make up triplet loss 的缺点,形式如下

【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》_第9张图片
其中 c y j c_{y_j} cyj denotes the y i y_i yi th class center of deep features,B 是 batch-size,让同一个人的尽量聚在一起

改进后的整体 loss 如下

在这里插入图片描述
L I D L_{ID} LID 为交叉熵 loss

5 Experiments

4.1 Datasets

Market1501 和 DukeMTMC

4.2 Influences of Each Trick (Same domain)

【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》_第10张图片
6 个都有涨点

4.3 Influences of Each Trick (Cross domain)

【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》_第11张图片

REA 不行哈,作者的解释为

We infer that REA masking the regions of training images lets the model learn more knowledge in the training domain.

4.4 Comparison of State-of-the-Arts

【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》_第12张图片

挺猛的

4.5 Analysis of BNNeck

【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》_第13张图片
ID loss 用 cosine distance 优化比较好

4.6 Influences of the Number of Batch Size

【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》_第14张图片
影响不大

We infer that large K helps to mine hard positive pairs while large P helps to mining hard negative pairs.

4.7 Influences of Image Size

【SB-ReID】《Bag of Tricks and A Strong Baseline for Deep Person Re-identification》_第15张图片
结论是影响不大

5 Conclusion(own)

  • BNNeck 的把特征映射更标准化,这样划分超平面时更容易(ID loss 和 triplet loss)
  • Random Erasing Augmentation 还蛮过瘾的
  • triplet loss 只追求绝对差值而忽略了原始积累,提出 center + triplet loss 来进一步使得同一类特征聚集得更紧密

你可能感兴趣的:(CNN,ReID)