arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2111.09833cs.CV
收藏

TransMix:参加视觉Transformer的混音

TransMix: Attend to Mix for Vision Transformers

Johns Hopkins University(约翰斯·霍普金斯大学);University of Oxford(牛津大学);ByteDance Inc.(字节跳动有限公司)

Jie-Neng Chen, Shuyang Sun, Ju He, Philip Torr, Alan Yuille, Song Bai

摘要:

已经发现基于混合的增强对于在训练期间泛化模型是有效的,特别是对于视觉Transformer(ViT),因为它们很容易过拟合。然而,以前的基于混合的方法具有潜在的先验知识,即目标的线性内插比率应保持与输入内插中提出的比率相同。这可能会导致一个奇怪的现象,有时没有有效的对象在混合图像由于随机过程中增强,但仍然有响应的标签空间。为了弥合输入空间和标签空间之间的差距,我们提出了TransMix,它基于视觉Transformer的注意力地图混合标签。如果相应的输入图像被注意力图加权得更高,则标签的置信度将更大。TransMix非常简单,只需几行代码就可以实现,而无需向基于ViT的模型引入任何额外的参数和FLOP。实验结果表明,我们的方法可以在ImageNet分类的尺度上持续改进各种基于ViT的模型。在ImageNet上使用TransMix进行预训练后,基于ViT的模型也表现出更好的语义分割,目标检测和实例分割的可移植性。在4个不同的基准测试中,TransMix也表现出更强大的性能。代码将在https://github.com/Beckschen/TransMix上公开。

英文摘要:

Mixup-based augmentation has been found to be effective for generalizing models during training, especially for Vision Transformers (ViTs) since they can easily overfit. However, previous mixup-based methods have an underlying prior knowledge that the linearly interpolated ratio of targets should be kept the same as the ratio proposed in input interpolation. This may lead to a strange phenomenon that sometimes there is no valid object in the mixed image due to the random process in augmentation but there is still response in the label space. To bridge such gap between the input and label spaces, we propose TransMix, which mixes labels based on the attention maps of Vision Transformers. The confidence of the label will be larger if the corresponding input image is weighted higher by the attention map. TransMix is embarrassingly simple and can be implemented in just a few lines of code without introducing any extra parameters and FLOPs to ViT-based models. Experimental results show that our method can consistently improve various ViT-based models at scales on ImageNet classification. After pre-trained with TransMix on ImageNet, the ViT-based models also demonstrate better transferability to semantic segmentation, object detection and instance segmentation. TransMix also exhibits to be more robust when evaluating on 4 different benchmarks. Code will be made publicly available at https://github.com/Beckschen/TransMix.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑