Motivation
-
現有的Re-ID工作都面臨以下的問題:
- loss function的選擇
- 不對準問題
- 尋找高判別力的局部特徵
- 對於rank loss優化中的採樣問題
-
目前的大多數工作都是針對上述問題中的一兩個來進行解決,能不能用一個統一的框架來解決上述問題呢?
Contribution
- 提出了Mancs框架來統一解決上述問題
- 提出了fully attentional block with deep supervision與curriculum sampling來提高模型提取特徵的能力與訓練的效果(這兩個可以借鑑到其他工作上)
- 本文提出的方法在三個公開數據集上達到了SOTA效果
1 Introduction
-
Re-ID定義、意義以及難點
-
研究方向:
- 行人特徵表示
- 距離度量:存在正負樣本不平衡問題,通常對採樣方法要求較高
-
動機與貢獻
2 Related Work
-
Attention Network
- MSCAN
- HA-CNN
- CAN
-
Metric Learning
- triplet loss ==> online hard examples mining(OHEM)
- contrastive loss
-
Multi-task learning
- triplet loss + softmax
- 本文:triplet loss + focal loss
3 Method
3.1 Training Architecture
- 如下圖,本文的網絡結構主要由三部分構成:
- backbone network (ResNet50) ==> a multi-scale feature extractor
- attention module ==> attention mask
- loss function:attention loss + triplet loss + focal loss
3.2 Fully Attentional Block
-
借鑑了SE Block,對其結構進行了改進:
- SE Block的問題:使用GAP導致空間結構信息的丟失 ==> 本文去掉池化層,用1x1的卷積層來代替全連接層來保留空間信息
-
attention map計算公式:
-
由attention map得到輸出feature map
3.3 ReID Task #1: Triplet loss with curriculum sampling
-
ranking loss相比classification loss在數據量不大的時候有更強的泛化性能
-
rank branch:共享backbone + a pooling layer + FC layer
-
採樣方法:OHEM每個選擇最困難的樣本進行參數更新容易導致訓練過程中模型坍塌 ==> curriculum sampling(from easy triplets to hard triplets)
- 對於一個anchor ,首先隨機選擇一個positive
- 根據負樣本到anchor的距離從小到大(hard --> easy)進行排序
- 根據概率分佈(Gaussian distribution)來對負樣本進行選擇
- 的選擇概率, 隨着增大,選擇困難樣本的概率增大,如下圖
- final loss for ranking branch
3.4 ReID Task #2: Person classification with focal loss
-
考慮到classification + ranking效果更好,添加了classification branch,同時考慮到困難樣本應該比簡單樣本更受重視,選擇了focal loss(softmax loss的一種改進版本),給困難樣本更多的權重
-
focal loss for classification branch
3.5 ReID Task #3: Deep supervision for better attention
-
將不同尺度得到的attention map(與attention mask相乘過的特徵圖)進行平均池化與concatated得到attention feature vector進行來身份分類 ==> accurate attention maps
-
loss function for attention branch
3.6 Multi-task learning
- three tasks(rank + cls + att)共享backbone,最終的loss function:
3.7 Inference
- rank branch的特徵具有更強的泛化性能,在測試階段用來代表行人圖片,如下圖所示
4 Experiments
4.1 Datasets
- Market1501、CUHK03、DukeMTMC-reID
4.2 Evaluation Protocol
-
mAP、CMC
-
Market1501:both single query and multi-query;CUHK03與DukeMTMC-reID:single query
-
CUHK03 split:1367/100 and 767/700
4.3 Implementation Details
-
Pytorch
-
Pretrained ResNet-50 + 分類層前的2048FC
Data Augmengtation
- resize images to 256 x 128 ==> randomly crop with scale in [0.64, 1.0] and aspect ratio in [2, 3] ==> resize back to 256 x 128 ==> randomly horizontally flip with probility 0.5 ==> random erasing ==> subtracted the mean value and divided by the standard deviation
Training Configurations
-
PK Sampling strategy:Market1501 and DukeMTMC-ReID:P、K = 16 CUHK03:P=32,K=8 DukeMTMC-ReID
-
160 epochs、
-
-
-
Adam optimizer, lr=3x10e-4
-
gradient clipping to prevent model collision
-
最後卷積層的ReLU換成了PReLU ==> 增強最後的特徵的表達能力
4.4 Comparisons with the state-of-art methods
Evaluation On Market-1501
Evaluation On CUHK03
Evaluation On DukeMTMC-reID
4.5 Ablation Study
- 對本文提出的Curriculum Sampling(CS)、Full Attentional Block、Focal Loss、Random Erasing有效性進行了驗證,如下表
-
cls + rank的baseline已經很高了,本文提出的方法每個提升相對比較小
-
下圖舉的例子不是很懂,文中該圖說明random erasing與cls有很大的提升
5 Conclusions
- 本文提出的Mancs能夠學習穩定的特徵在三個常用的公開數據集上取得了SOTA的性能
- 本文提出的fully attentional block with deep supervision與curriculum sampling的有效性(可以在其他相關任務借鑑)
- 未來工作:結合數據採樣與增強進一步提供reID特徵的泛化能力