FastMIM:加速视觉的掩码图像建模预训练
FastMIM: Expediting Masked Image Modeling Pre-training for Vision
摘要:
Transformers和掩码图像建模(MIM)预训练框架的组合在各种视觉任务中显示出巨大的潜力。然而,预训练的计算预算太重,阻碍了MIM成为一个实际的训练范例。本文提出了FastMIM,一个简单而通用的框架,用于加速掩码图像建模,包括以下两个步骤:(i)用低分辨率输入图像预训练视觉骨干;(ii)重建方向分量直方图(HOG)特征,而不是输入图像的原始RGB值。此外,我们提出了FastMIM-P,在预训练阶段逐步扩大输入分辨率,以进一步增强高容量模型的传输结果。我们指出:(i)在预训练阶段中宽范围的输入分辨率可以导致在微调阶段和下游任务(诸如检测和分割)中的类似性能;(ii)编码器的浅层在预训练期间更重要,并且丢弃最后几层可以加速训练阶段而不损害微调性能;(iii)解码器应该匹配所选网络的大小;及(iv)当分辨率转移时,HOG比RGB值更稳定;配备FastMIM,各种视觉骨干都可以高效地进行预训练。例如,我们可以在ImageNet-1 K上实现83.8%/84.1%的top-1准确率,其中ViT-B/Swin-B作为主干。与以前的相关方法相比,我们可以实现相当或更好的前1名的准确性,同时加快训练过程的$\sim$ 5 $\times$。代码可以在https://github.com/ggjy/FastMIM.pytorch中找到。
英文摘要:
The combination of transformers and masked image modeling (MIM) pre-training framework has shown great potential in various vision tasks. However, the pre-training computational budget is too heavy and withholds the MIM from becoming a practical training paradigm. This paper presents FastMIM, a simple and generic framework for expediting masked image modeling with the following two steps: (i) pre-training vision backbones with low-resolution input images; and (ii) reconstructing Histograms of Oriented Gradients (HOG) feature instead of original RGB values of the input images. In addition, we propose FastMIM-P to progressively enlarge the input resolution during pre-training stage to further enhance the transfer results of models with high capacity. We point out that: (i) a wide range of input resolutions in pre-training phase can lead to similar performances in fine-tuning phase and downstream tasks such as detection and segmentation; (ii) the shallow layers of encoder are more important during pre-training and discarding last several layers can speed up the training stage with no harm to fine-tuning performance; (iii) the decoder should match the size of selected network; and (iv) HOG is more stable than RGB values when resolution transfers;. Equipped with FastMIM, all kinds of vision backbones can be pre-trained in an efficient way. For example, we can achieve 83.8%/84.1% top-1 accuracy on ImageNet-1K with ViT-B/Swin-B as backbones. Compared to previous relevant approaches, we can achieve comparable or better top-1 accuracy while accelerate the training procedure by $\sim$5$\times$. Code can be found in https://github.com/ggjy/FastMIM.pytorch.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。