[论文阅读 2021 CVPR-oral 目标跟踪]Transformer Meets Tracker Exploiting Temporal Context for Robust Visual

简介

paper:Transformer Meets Tracker: Exploiting Temporal Context for Robust Visual Tracking

code:594422814/TransformerTrack

盼着盼着它来了!这篇论文将Transfomer引入了单目标跟踪任务中,且取得了很好的效果。这篇论文提供了一个基于Transfomer的中间模块,通过该中间模块可以显著提升提取的特征质量。

在这里插入图片描述

主要内容

在这里插入图片描述

不同于原始的Transfomrer,这篇论文将encoderdecoder两部分分开,其中encoder部分对backbone提取的Template Feature通过Attention进行特征加强。而Search Feature则经由decoder进行处理。

Transformer Encoder

输入到encoder的是一系列template feature,即 T = ( T 1 , ⋯   , T n ) ∈ R n × C × H × W T=\left(\mathbf{T}_{1}, \cdots, \mathbf{T}_{n}\right) \in \mathbb{R}^{n \times C \times H \times W} T=(T1,,Tn)Rn×C×H×W ,为了便于计算作者将 T T T转换为 T ′ ∈ R N T × C T^{'} \in \mathbb{R}^{N_{T} \times C} TRNT×C,其中 N T = n × H × W N_{T}=n \times H \times W NT=n×H×W

最终对于encoder部分可以表示为:

A T → T = Atten ⁡ ( φ ( T ′ ) , φ ( T ′ ) ) ∈ R N T × N T \mathbf{A}_{\mathrm{T} \rightarrow \mathrm{T}}=\operatorname{Atten}\left(\varphi\left(\mathbf{T}^{\prime}\right), \varphi\left(\mathbf{T}^{\prime}\right)\right) \in \mathbb{R}^{N_{T} \times N_{T}} ATT=Atten(φ(T),φ(T))RNT×NT

T ^ =  Ins.  Norm ⁡ ( A T → T T ′ + T ′ ) \hat{\mathbf{T}}=\text { Ins. } \operatorname{Norm}\left(\mathbf{A}_{\mathrm{T} \rightarrow \mathrm{T}} \mathbf{T}^{\prime}+\mathbf{T}^{\prime}\right) T^= Ins. Norm(ATTT+T)

where ϕ(·) is a 1 × 1 linear transformation that reduces the embedding
channel from C to C/4.

通过self-attention,最终可以得到很高质量的template features.

Thanks to the self-attention, multiple temporally diverse template features aggregate each other to generate high quality T ^ \hat{\mathbf{T}} T^

Transformer Decoder

首先同encoder一样,decoder的第一部分也是采用一个Self-Attention的结构且与encoder部分的Self-Attention共享权重,这么做的目的是保证将Template FeatureSearch Feature映射到同一特征空间中.

encoder中的处理一样,对于Search feature,即 S ∈ R C × H × W S \in \mathbb{R}^{C \times H \times W} SRC×H×W,同样reshape S ′ ∈   R N S × C \mathbf{S}^{\prime} \in\ \mathbb{R}^{N_S \times C} S RNS×C,则第一个Self-Attention部分可以表示为:

S ^ =  Ins.  Norm ⁡ ( A S → S S ′ + S ′ ) \hat{\mathbf{S}}=\text { Ins. } \operatorname{Norm}\left(\mathbf{A}_{\mathbf{S} \rightarrow \mathbf{S}} \mathbf{S}^{\prime}+\mathbf{S}^{\prime}\right) S^= Ins. Norm(ASSS+S)

where A S → S = Atten ⁡ ( φ ( S ′ ) , φ ( S ′ ) ) ∈ R N S × N S \mathbf{A}_{\mathbf{S} \rightarrow \mathbf{S}}=\operatorname{Atten}\left(\varphi\left(\mathbf{S}^{\prime}\right), \varphi\left(\mathbf{S}^{\prime}\right)\right) \in \mathbb{R}^{N_{S} \times N_{S}} ASS=Atten(φ(S),φ(S))RNS×NS is the self-attention matrix of the search feature.

之后论文将decoder划分为Feature TransformationMask Transformation.

Mask Transformation

对于Mask Transformation,按我的理解是学习上空间上的Attention.

其中Mask Transformation的对于输入Kencoder提取到的 T ^ \hat{\mathbf{T}} T^,而对于Q则为上一层输出的 S ^ \hat{\mathbf{S}} S^,输入V是一个Gaussian-shapedmask,即 M = Concat ⁡ ( m 1 , ⋯   , m n ) ∈ R n × H × W \mathbf{M}=\operatorname{Concat}\left(\mathbf{m}_{1}, \cdots, \mathbf{m}_{n}\right) \in \mathbb{R}^{n \times H \times W} M=Concat(m1,,mn)Rn×H×W( m m m通过Gaussian function得到,即 m ( y ) = exp ⁡ ( − ∥ y − c ∥ 2 2 σ 2 ) \mathbf{m}(y)=\exp \left(-\frac{\|y-c\|^{2}}{2 \sigma^{2}}\right) m(y)=exp(2σ2yc2)),同样对 M M M进行reshape后得到 M ′ ∈ R N T × 1 \mathbf{M}^{\prime} \in \mathbb{R}^{N_{T} \times 1} MRNT×1.

最终Mask Transformation可以表示为:

A T → S = Atten ⁡ ( ϕ ( S ^ ) , ϕ ( T ^ ) ) ∈ R N S × N T \mathbf{A}_{\mathrm{T} \rightarrow \mathrm{S}}=\operatorname{Atten}(\phi(\hat{\mathbf{S}}), \phi(\hat{\mathbf{T}})) \in \mathbb{R}^{N_{S} \times N_{T}} ATS=Atten(ϕ(S^),ϕ(T^))RNS×NT

S ^ mask  =  Ins.  Norm ⁡ ( A T → s M ′ ⊗ S ^ ) \hat{\mathbf{S}}_{\text {mask }}=\text { Ins. } \operatorname{Norm}\left(\mathbf{A}_{\mathrm{T} \rightarrow s} \mathbf{M}^{\prime} \otimes \hat{\mathbf{S}}\right) S^mask = Ins. Norm(ATsMS^)

where ⊗ \otimes is the broadcasting element-wise multiplication

Feature Transformation

对于Feature Transformation,按我的理解是通过Attention提升提取到的Search Feature.

Mask Transformation基本一样,不同的是输入的V是经过与 M M M经过element-wise multiplication T ^ \hat{\mathbf{T}} T^,即 T ^ ⊗ M ′ \hat{\mathbf{T}} \otimes \mathbf{M}^{\prime} T^M

所以Feature Transformation可以表示为:

S ^ f e a t =  Ins.  Norm ⁡ ( A T → S ( T ^ ⊗ M ′ ) + S ^ ) \hat{\mathbf{S}}_{\mathrm{feat}}=\text { Ins. } \operatorname{Norm}\left(\mathbf{A}_{\mathrm{T} \rightarrow \mathrm{S}}\left(\hat{\mathbf{T}} \otimes \mathbf{M}^{\prime}\right)+\hat{\mathbf{S}}\right) S^feat= Ins. Norm(ATS(T^M)+S^)

最终输出的Search Feature经由下式得到:

S ^ final  =  Ins. Norm  ( S ^ feat  + S ^ mask  ) \hat{\mathbf{S}}_{\text {final }}=\text { Ins. Norm }\left(\hat{\mathbf{S}}_{\text {feat }}+\hat{\mathbf{S}}_{\text {mask }}\right) S^final = Ins. Norm (S^feat +S^mask )

Tracking with Transformer-enhanced Features

在这里插入图片描述

这篇论文将上诉提到的Transfomer模块应用到了Siamese PipelineDCF pipeline两种跟踪器上,提出了TrSiamTrDimp.

实验结果

在这里插入图片描述

在这里插入图片描述

小结

这篇论文将Transfomer引入了目标跟踪中,并取得了非常好的结果,可能也因为此获得了2021CVPR-oral.

虽然说这篇论文中引入的Transfomer取得了很好的结果,但还有以下几点不足:

  1. 如论文Appending D中所说,这个模型仍然无法很好处理occlustionout-of-view.
  2. 如同其他使用Transfomer的模型一样,计算attention matrix需要消耗很大的计算内存,这也导致了这个模型在速度上有所下降.

总之,这篇论文还是很值得研究探讨的!

  • 9
    点赞
  • 34
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值