[CVPR‘22] DTLD: Towards Accurate Facial Landmark Detection via Cascaded Transformers

paper: https://openaccess.thecvf.com/content/CVPR2022/papers/Li_Towards_Accurate_Facial_Landmark_Detection_via_Cascaded_Transformers_CVPR_2022_paper.pdf

DTLD整体结构为:CNN + Transformer-decoder。主要改进是针对decoder,包含四个部分:

  • Query初始化方法,基于CNN的顶层特征接回归头,使用FC后的特征作为初始化;
  • 在Cross-attention前,增加self-attention;
  • 引入Deformable Attention,并将初始的reference point替换为CNN特征回归的粗结果;
  • 在decoder中,基于deformable attention机制,迭代更新feature map。

目录

摘要

方法

Backbone

Query Initialization

Decoder Module

Basic Decoder

Parallel Decoder

Training Target

实验

Comparison with the SOTA

Ablation Studies


摘要

cascaded transformers with deformable attention mechnism

novel decoder that refines image features and landmark positions simultaneously.

方法

DTLD主要包含三个部分:1)backbone:提取图片特征;2)query initialization module:用于decoder中Query的初始化;3)decoder module:预测关键点。

Backbone

  • ImageNet pre-trained ResNet-18;
  • 输出式Pyramid features,包含4层:F_1, F_2, F_3, F_4,分别对应降采样率4, 8, 16, 32;
  • 特征接1 x 1卷积,将他们映射到相同通道数;
  • 特征展平为一维,并拼接在一起,作为memory feature,维度为M ∈ M x C,M是展平特征的长度和。

Query Initialization

  • 通常设置是learnable query matrix Q,并且随机初始化;
  • 本文中query matrix设置为N x C,其中N是点位数量,C是特征维度。DTLD基于F_4特征,初始化query matrix:Q_0 = FC(F_4);
  • query features后接另一个FC层和Sigmoid函数,用于预测N个点位坐标:Y_0 = σ(FC(Q_0)),作为初始化点位坐标,后续会用作initial reference points(Deformable Attention中用于特征采样),维度为N x 2。

Decoder Module

  • 包含T个decoder layer,每个decoder layer的输入包含:query matrix Q, memory feature M和reference points R,输出是:相较于R的偏移量。
  • 本文设计了两种decoder:basic decoder和parallel decoder,两者的区别在于是否更新memory feature;

Basic Decoder

  • Self-attention layer:输入为Q^P, Q^P和Q,其中Q^P = Q + P,P是learnable position embedding。
  • Deformable Attention layer:输入为Self-Attention layer的输出Q^S和memory feature M。与通常的Cross-attention不同,本文使用deformable attention,也即不使用完整特征图作为输入,而是在特征图上采样:

  • 具体来说,x_ik是在memory feature M的p_ik位置上采样到的特征, 其中,采样点p_ik = r_i + δp_ik,r_i是reference point,是前decoder层计算的坐标,δp_ik = FC(q_i)是采样偏移量,q_i是query matrix。β_ik = σ(FC(q_i))
  • Offset Predictor:是3层MLP,输入为Deformable Attention layer的输出Q^D,输出为坐标偏移量Y^o,输出坐标为Y_t = σ(Y^o + R_t)。
  • 在每个decoder层中,Q = Q^D和Y会被更新。

Parallel Decoder

  • 相较于DETR和deformable DETR,DTLD去除了encoder。然后,实验表明encoder是有益处的,因此本文提出parallel decoder,使得memory feature也被同步更新。

  • 将level embedding和pixel position embedding,添加到memory feature M中:M^P = M + P';
  • 借助deformable attention,更新M^P;
  • 在Cross Attention中,会将M^P和Q^S concat在一起。

Training Target

  • L1损失,监督T个decoder层的输出

实验

Comparison with the SOTA

  

Ablation Studies

  • Q_0初始化和Self-Attn对结果影响很大

  • 超参对结果影响大

 

  •  decoder层数越多效果越好
  •  Cross-dataset Evaluation

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值