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

ZeroI2V: 预训练Transformer从图像到视频的零成本适配

ZeroI2V: Zero-Cost Adaptation of Pre-trained Transformers from Image to Video

Nanjing University(南京大学);Shanghai AI Laboratory(上海人工智能实验室)

Xinhao Li, Yuhan Zhu, Limin Wang

AI总结:

针对图像到视频适配存在额外计算成本的问题,提出ZeroI2V范式,通过时空双头注意力和可融合线性适配器实现推理零额外成本,性能匹配或超越SOTA且效率更优。

摘要:

将图像模型适配到视频域已成为解决视频识别任务的高效范式。由于图像模型参数量庞大且迁移能力强,执行全参数微调效率较低,甚至没有必要。因此,近期研究正将重点转向参数高效的图像到视频适配。然而,这些适配策略不可避免地会引入额外计算成本,以处理视频中的域差距和时序建模问题。本文提出一种新的适配范式ZeroI2V,将图像Transformer迁移到视频识别任务(即推理阶段对原始模型引入零额外成本)。为实现这一目标,我们提出两项核心设计。首先,为捕捉视频中的动态信息并降低图像到视频适配的难度,我们利用自注意力的灵活性,引入时空双头注意力(STDHA)。该方法在零额外参数和计算量的情况下,高效赋予图像Transformer时序建模能力。其次,为处理图像与视频之间的域差距,我们提出一种线性适配策略,利用轻量级的密集放置线性适配器,将冻结的图像模型完全迁移到视频识别任务。得益于定制化的线性设计,所有新增适配器在训练后可通过结构重参数化轻松与原始模块融合,实现推理阶段零额外成本。在代表性的全监督和少样本视频识别基准上的大量实验表明,ZeroI2V能够匹配甚至超越先前的最优方法,同时具备更优的参数效率和推理效率。

英文摘要:

Adapting image models to the video domain has emerged as an efficient paradigm for solving video recognition tasks. Due to the huge number of parameters and effective transferability of image models, performing full fine-tuning is less efficient and even unnecessary. Thus, recent research is shifting its focus toward parameter-efficient image-to-video adaptation. However, these adaptation strategies inevitably introduce extra computational costs to deal with the domain gap and temporal modeling in videos. In this paper, we present a new adaptation paradigm (ZeroI2V) to transfer the image transformers to video recognition tasks (i.e., introduce zero extra cost to the original models during inference). To achieve this goal, we present two core designs. First, to capture the dynamics in videos and reduce the difficulty of image-to-video adaptation, we exploit the flexibility of self-attention and introduce spatial-temporal dual-headed attention (STDHA). This approach efficiently endows the image transformers with temporal modeling capability at zero extra parameters and computation. Second, to handle the domain gap between images and videos, we propose a linear adaption strategy that utilizes lightweight densely placed linear adapters to fully transfer the frozen image models to video recognition. Thanks to the customized linear design, all newly added adapters could be easily merged with the original modules through structural reparameterization after training, enabling zero extra cost during inference. Extensive experiments on representative fully-supervised and few-shot video recognition benchmarks showcase that ZeroI2V can match or even outperform previous state-of-the-art methods while enjoying superior parameter and inference efficiency.

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

↑