Unpaired I2I 之 QS-Attn
QS-Attn: Query-Selected Attention for Contrastive Learning in I2I Translation cvpr2022
Contribution
- 提出QS-Attn机制,通过选择相关、重要的anchor points作为query,从而构造更适合的用于对比学习的特征patch
- 发现采用熵测量、global attention 作为 cross domain value routing 效果最好
Method
Preliminaries on CUT
- 从真实图片中随机选取anchor
QS-Attn for Contrastive Learning
-
随机选择patch对,不能完全关注利用domain-specific的信息。QS-attn 希望通过选择合适的anchor q,在包含更多domain-specific的patch中计算对比损失
-
Global attention
- 为patch定义量化函数计算该潜在位置与其他位置的相关度
- global attetion matrix:
- 为了选择所有重要的查询,选择最小的 N 个作为 QS-Attn 矩阵
-
Local attention
- 使用全局attention会对query周围的细节内容进行平滑,引入Local attention可以测量query与其周围区域的特征相似性,捕获局部区域的空间交互
- constant window 大小(w,w) 步长 1
-
Cross domain value routing for contrastive learning
- One positive (N − 1) negative features are located in the real image x
- N anchors are from the fake image G(x)
Experiment
PLAN
- 选择anchor的过程可以尝试选择关键patch 如 双眼,嘴,鼻子
- 对应的patch对依然是相同位置的,能不能搞成不相同位置,比如源区域是q,目标是k