当前位置: 代码迷 >> 综合 >> 论文A Strong Baseline for Vehicle Re-Identification速读
  详细解决方案

论文A Strong Baseline for Vehicle Re-Identification速读

热度:68   发布时间:2023-11-21 09:09:28.0

写在前面:之前就说过会对重识别这部分着重理解一下,周六偷得浮生半日闲,读一下这篇论文。

一、摘要部分解析

Vehicle Re-Identification (Re-ID) aims to identify the same vehicle across different cameras, hence plays an important role in modern traffic management systems. The technical challenges require the algorithms must be robust in different views, resolution, occlusion and illumination conditions.

交代Re-ID任务的难点:需要在多视角、多分辨率、存在遮挡和不同的光照条件下保持鲁棒性。

In this paper, we first analyze the main factors hindering the Vehicle Re-ID performance. We then present our solutions, specifically targeting the dataset Track 2 of the 5th AI City Challenge.

交代了文章使用的数据集,可见目前车辆Re-ID任务还没有一个大型公开数据集可供使用。

including (1) reducing the domain gap between real and synthetic data, (2) network modification by stacking multi heads with attention mechanism, (3) adaptive loss weight adjustment.

给出创新点:(1)缩小真实数据和合成数据之间的“域差异”。(2)通过使用带有注意力的多头(multi head)结构修改网络架构。(3)自适应的损失权重调整。

Our method achieves 61.34% mAP on the private CityFlow testset without using external dataset or pseudo labeling, and outperforms all previous works at 87.1% mAP on the Veri benchmark.

有两点:(1)首先建立了一个私有数据集CityFlow来评价方法。(2)还有一个在Veri benchmark上的评价结果。

The code is available athttps://github.com/cybercore-co-ltd/track2_aicity_2021.

祝给代码的大佬们身体健康、事业顺利:)

二、文章贡献解析

(1) We adopt MixStyle Transfer as a regularization method to reduce the gap between the real and synthetic data.
(2) Multi-head with attention mechanism are attached to the backbone to help the model learn more detailed features. The features are then automatically grouped into subfeatures, each help narrows down the search space of the target identity.
(3) We replace the commonly used Triplet Loss with the Supervised Contrastive Loss which help the network learning more effectively. Additionally, a novel adaptive loss weight between the Supervised Contrastive Loss and the Cross Entropy Loss is provided to improve the performance dramatically.

总结为三点:MixStyle模块的加入、带有注意力机制的多头结构的加入、损失函数的改进。下面分别了解下。

MixStyle模块的构建

摘要部分中就提到,本文工作是针对一场比赛(targeting the dataset Track 2 of the 5th AI City Challenge)设计的,这场比赛给了两套数据集,包括一个真实数据集和一个合成数据集,那么首先任务即是如何突破两个数据的域差异。

给出的解决思路很简单:通过混合来自不同领域的两个样本的统计特征来模拟新的风格。

给定一个 batch的以及一个shuffle之后的,计算混合数据的统计特征:,其中是beta分布。

则可将MixStyle规定为,很显然是有可学习参数的。事实上之后的网络分析部分我们就可以看到MixStyle是作为一个model层出现的。起到对两个领域图像的正则化(normalized)作用。

“通过利用feature级别的统计信息,MixStyle隐式地规范了网络。这使得模型对领域差异更加鲁棒,并强制网络学习对象的语义特征。”

网络结构构建

包含两部分:Backbone和Multi-head with Attention Mechanism

Backbone不必多说,采用的是Instance Batch Normalization (IBN) network family。值得注意的是在Backbone中加入了上面提到的MixStyle,而且给出了网络插入位置的考虑,即“早阶段卷积层对样式信息进行编码,而后期则倾向于捕获语义内容”,因此将MixStyle加入到了Block1与Block2之间(即早期阶段,以学习到更多的特征)。

Multi-head with Attention Mechanism其实是我认为这篇文章的主要工作,这不难理解,解决Re-ID问题的方法目前就那么几种,其中注意力机制是最为有效的方式之一。重点是怎么把注意力机制这个故事讲得生动。

突出Multi-head使用的必要性,哎~ 说得过去,很棒。

“通过使用multi-head,鼓励Re-ID模型从不同的车辆特征中学习更多不同的特征”,“注意机制决定了哪些head’s features对最终编码特征更重要”。

损失函数的改进

统一描述:一般地,训练一个Re-ID模型,常用的方法是结合ID loss和Metric loss。而交叉熵(CE)一般被作为ID loss,用于对不同类别的样本进行分类,而Metric loss通常是对比损失,例如Triplet loss或Circle loss,以优化每个类别之间的特征距离。

本文的ID loss仍使用的是CE,而Metric loss部分使用了Triplet loss的扩展版Supervised Contrastive Loss (SupCon)。

有趣的是,本章指出,之所以之前的Re-ID模型表现不佳,是因为对这两种loss的调和不够好,也就是手动设置权重不科学,于是提出了一种自动调整权重的方法MALW。

 

三、再来看一下整体结构

本章首先介绍了任务的意义以及完成任务会遇到的难点,然后解析了文章为解决这个问题而提出的三部分创新点,从中我们可以学习到如何减小真实数据和模拟数据之间的差异、一种解决Re-ID问题的网络设计以及如何通过优化损失函数来更好地训练网络。下一章将重点分析一下试验结果。