视频变压器自然会产生比静态视觉变压器更重的计算负担,因为前者在二次复杂性$(t^2n^2)$的当前关注下,$ t $ t $倍的序列比后者长。现有作品将颞轴视为空间轴的简单扩展,重点是通过通用池或局部窗口缩短时空序列,而无需使用时间冗余。但是,视频自然包含相邻框架之间的冗余信息;因此,我们可能会以扩张的方式抑制视觉上相似帧的注意力。基于这一假设,我们提出了圈,长期`\ textbf {\ textit {leap coasitive}}''(la),短期`\ textbf {\ textbf {\ textit {preckentien shiftit {presentiic shift}}}'('( \ textit {p} -Shift)用于视频变压器的模块,带有$(2Tn^2)$复杂性。具体而言,``la''将长期帧分为对,然后通过注意来重构每个离散对。 ``\ textit {p} -shift''在时间邻居之间交换特征,以面对短期动力学的丧失。通过用圈替换香草2D的注意,我们可以将静态变压器调整为视频,其中零额外的参数和可忽视的计算开销($ \ sim $ 2.6 \%)。对标准动力学-400基准的实验表明,我们的圈量变压器可以在CNN和Transformer Sotas之间的准确性,FLOP和参数方面实现竞争性能。我们以\ sloppy \ href {https://github.com/videonetworks/laps-transformer} {\ textit {\ textit {\ color {agenta} {https://github.com/videonetworks/laps-transsfornss/laps-transformer} { }}。
translated by 谷歌翻译
基于变压器的方法最近在基于2D图像的视力任务上取得了巨大进步。但是,对于基于3D视频的任务,例如动作识别,直接将时空变压器应用于视频数据将带来沉重的计算和记忆负担,因为斑块的数量大大增加以及自我注意计算的二次复杂性。如何对视频数据的3D自我注意力进行有效地建模,这对于变压器来说是一个巨大的挑战。在本文中,我们提出了一种时间贴片移动(TPS)方法,用于在变压器中有效的3D自发明建模,以进行基于视频的动作识别。 TPS在时间尺寸中以特定的镶嵌图模式移动斑块的一部分,从而将香草的空间自我发项操作转换为时空的一部分,几乎没有额外的成本。结果,我们可以使用几乎相同的计算和记忆成本来计算3D自我注意力。 TPS是一个插件模块,可以插入现有的2D变压器模型中,以增强时空特征学习。提出的方法可以通过最先进的V1和V1,潜水-48和Kinetics400实现竞争性能,同时在计算和内存成本方面效率更高。 TPS的源代码可在https://github.com/martinxm/tps上找到。
translated by 谷歌翻译
自2020年推出以来,Vision Transformers(VIT)一直在稳步打破许多视觉任务的记录,通常被描述为``全部'''替换Convnet。而且对于嵌入式设备不友好。此外,最近的研究表明,标准的转话如果经过重新设计和培训,可以在准确性和可伸缩性方面与VIT竞争。在本文中,我们采用Convnet的现代化结构来设计一种新的骨干,以采取行动,以采取行动特别是我们的主要目标是为工业产品部署服务,例如仅支持标准操作的FPGA董事会。因此,我们的网络仅由2D卷积组成,而无需使用任何3D卷积,远程注意插件或变压器块。在接受较少的时期(5x-10x)训练时,我们的骨干线超过了(2+1)D和3D卷积的方法,并获得可比的结果s在两个基准数据集上具有vit。
translated by 谷歌翻译
We present Multiscale Vision Transformers (MViT) for video and image recognition, by connecting the seminal idea of multiscale feature hierarchies with transformer models. Multiscale Transformers have several channel-resolution scale stages. Starting from the input resolution and a small channel dimension, the stages hierarchically expand the channel capacity while reducing the spatial resolution. This creates a multiscale pyramid of features with early layers operating at high spatial resolution to model simple low-level visual information, and deeper layers at spatially coarse, but complex, high-dimensional features. We evaluate this fundamental architectural prior for modeling the dense nature of visual signals for a variety of video recognition tasks where it outperforms concurrent vision transformers that rely on large scale external pre-training and are 5-10× more costly in computation and parameters. We further remove the temporal dimension and apply our model for image classification where it outperforms prior work on vision transformers. Code is available at: https: //github.com/facebookresearch/SlowFast.
translated by 谷歌翻译
动作检测的任务旨在在每个动作实例中同时推论动作类别和终点的本地化。尽管Vision Transformers推动了视频理解的最新进展,但由于在长时间的视频剪辑中,设计有效的架构以进行动作检测是不平凡的。为此,我们提出了一个有效的层次时空时空金字塔变压器(STPT)进行动作检测,这是基于以下事实:变压器中早期的自我注意力层仍然集中在局部模式上。具体而言,我们建议在早期阶段使用本地窗口注意来编码丰富的局部时空时空表示,同时应用全局注意模块以捕获后期的长期时空依赖性。通过这种方式,我们的STPT可以用冗余的大大减少来编码区域和依赖性,从而在准确性和效率之间进行有希望的权衡。例如,仅使用RGB输入,提议的STPT在Thumos14上获得了53.6%的地图,超过10%的I3D+AFSD RGB模型超过10%,并且对使用其他流量的额外流动功能的表现较少,该流量具有31%的GFLOPS ,它是一个有效,有效的端到端变压器框架,用于操作检测。
translated by 谷歌翻译
由于视频帧之间的庞大本地冗余和复杂的全局依赖性,这是一种具有挑战性的任务。该研究的最近进步主要由3D卷积神经网络和视觉变压器推动。虽然3D卷积可以有效地聚合本地上下文来抑制来自小3D邻域的本地冗余,但由于接收领域有限,它缺乏捕获全局依赖性的能力。或者,视觉变压器可以通过自我关注机制有效地捕获远程依赖性,同时具有在每层中所有令牌之间的盲目相似性比较来降低本地冗余的限制。基于这些观察,我们提出了一种新颖的统一变压器(统一机),其以简洁的变压器格式无缝地整合3D卷积和时空自我关注的优点,并在计算和准确性之间实现了优选的平衡。与传统的变形金刚不同,我们的关系聚合器可以通过在浅层和深层中学习本地和全球令牌亲和力来解决时空冗余和依赖性。我们对流行的视频基准进行了广泛的实验,例如动力学-400,动力学-600,以及某种东西 - 某种东西 - 某种东西 - 某种东西 - 某种东西。只有ImageNet-1K预磨料,我们的统一器在动力学-400 /动力学-600上实现了82.9%/ 84.8%的前1个精度,同时需要比其他最先进的方法更少的gflops。对于某些东西而言,我们的制服分别实现了新的最先进的表演,分别实现了60.9%和71.2%的前1个精度。代码可在https://github.com/sense-x/uniformer获得。
translated by 谷歌翻译
卷积神经网络(CNN)被认为是视觉识别的首选模型。最近,基于多头自我注意力(MSA)或多层感知器(MLP)的无卷积网络变得越来越流行。然而,由于视频数据的差异和复杂性,利用这些新染色的网络进行视频识别并不是微不足道的。在本文中,我们提出了MLP-3D Networks,这是一种新颖的MLP型3D体系结构,用于视频识别。具体而言,该体系结构由MLP-3D块组成,其中每个块包含一个跨令牌施加的一个MLP(即令牌混合MLP),一个MLP独立地应用于每个令牌(即通道MLP)。通过得出新型的分组时间混合(GTM)操作,我们将基本令牌混合MLP配备了时间建模的能力。 GTM将输入令牌分为几个时间组,并用共享投影矩阵线性地映射每个组中的令牌。此外,我们通过不同的分组策略设计了几种GTM的变体,并通过贪婪的体系结构搜索在MLP-3D网络的不同块中组成每个变体。在不依赖卷积或注意机制的情况下,我们的MLP-3D网络分别获得68.5 \%/81.4 \%\%TOP-1的准确性,分别在某些V2和Kinetics-400数据集上。尽管计算较少,但结果与最新通用的3D CNN和视频变压器相当。源代码可从https://github.com/zhaofanqiu/mlp-3d获得。
translated by 谷歌翻译
在本文中,我们介绍了一种新颖的视觉表示学习,它依赖于少数自适应地学习令牌,并且适用于图像和视频理解任务。而不是依靠手工设计的分割策略来获得视觉令牌并处理大量密集采样的补丁进行关注,我们的方法学会在视觉数据中挖掘重要令牌。这导致有效且有效地找到一些重要的视觉令牌,并且可以在这些令牌之间进行成像注意,在更长的视频的时间范围内,或图像中的空间内容。我们的实验表现出对图像和视频识别任务的几个具有挑战性的基准的强烈性能。重要的是,由于我们的令牌适应性,我们在显着减少的计算金额下实现竞争结果。在计算上更有效的同时,我们获得了对想象成的最先进结果的可比结果。我们在多个视频数据集中建立新的最先进的,包括动力学-400,动力学-600,Charades和Avid。代码可在:https://github.com/google-research/scenic/tree/main/scenic/projects/token_learner
translated by 谷歌翻译
虽然变形金机对视频识别任务的巨大潜力具有较强的捕获远程依赖性的强大能力,但它们经常遭受通过对视频中大量3D令牌的自我关注操作引起的高计算成本。在本文中,我们提出了一种新的变压器架构,称为双重格式,可以有效且有效地对视频识别进行时空关注。具体而言,我们的Dualformer将完全时空注意力分层到双级级联级别,即首先在附近的3D令牌之间学习细粒度的本地时空交互,然后捕获查询令牌之间的粗粒度全局依赖关系。粗粒度全球金字塔背景。不同于在本地窗口内应用时空分解或限制关注计算以提高效率的现有方法,我们本地 - 全球分层策略可以很好地捕获短期和远程时空依赖项,同时大大减少了钥匙和值的数量在注意计算提高效率。实验结果表明,对抗现有方法的五个视频基准的经济优势。特别是,Dualformer在动态-400/600上设置了新的最先进的82.9%/ 85.2%,大约1000g推理拖鞋,比具有相似性能的现有方法至少3.2倍。
translated by 谷歌翻译
我们呈现了基于纯变压器的视频分类模型,在图像分类中最近的近期成功进行了借鉴。我们的模型从输入视频中提取了时空令牌,然后由一系列变压器层编码。为了处理视频中遇到的令牌的长序列,我们提出了我们模型的几种有效的变体,它们将输入的空间和时间维构建。虽然已知基于变换器的模型只有在可用的大型训练数据集时才有效,但我们展示了我们如何在训练期间有效地规范模型,并利用预先训练的图像模型能够在相对小的数据集上训练。我们进行彻底的消融研究,并在包括动力学400和600,史诗厨房,东西的多个视频分类基准上实现最先进的结果,其中 - 基于深度3D卷积网络的现有方法表现出优先的方法。为了促进进一步的研究,我们在https://github.com/google-research/scenic/tree/main/scenic/projects/vivit发布代码
translated by 谷歌翻译
自我关注已成为最近网络架构的一个组成部分,例如,统治主要图像和视频基准的变压器。这是因为自我关注可以灵活地模拟远程信息。出于同样的原因,研究人员最近使尝试恢复多层Perceptron(MLP)并提出一些类似MLP的架构,显示出极大的潜力。然而,当前的MLP样架构不擅长捕获本地细节并缺乏对图像和/或视频中的核心细节的逐步了解。为了克服这个问题,我们提出了一种新颖的Morphmlp架构,该架构专注于在低级层处捕获本地细节,同时逐渐改变,以专注于高级层的长期建模。具体地,我们设计一个完全连接的层,称为Morphfc,两个可变过滤器,其沿着高度和宽度尺寸逐渐地发展其接收领域。更有趣的是,我们建议灵活地调整视频域中的Morphfc层。为了我们最好的知识,我们是第一个创建类似MLP骨干的用于学习视频表示的骨干。最后,我们对图像分类,语义分割和视频分类进行了广泛的实验。我们的Morphmlp,如此自我关注的自由骨干,可以与基于自我关注的型号一样强大。
translated by 谷歌翻译
视觉变压器正在成为解决计算机视觉问题的强大工具。最近的技术还证明了超出图像域之外的变压器来解决许多与视频相关的任务的功效。其中,由于其广泛的应用,人类的行动识别是从研究界受到特别关注。本文提供了对动作识别的视觉变压器技术的首次全面调查。我们朝着这个方向分析并总结了现有文献和新兴文献,同时突出了适应变形金刚以进行动作识别的流行趋势。由于其专业应用,我们将这些方法统称为``动作变压器''。我们的文献综述根据其架构,方式和预期目标为动作变压器提供了适当的分类法。在动作变压器的背景下,我们探讨了编码时空数据,降低维度降低,框架贴片和时空立方体构造以及各种表示方法的技术。我们还研究了变压器层中时空注意的优化,以处理更长的序列,通常通过减少单个注意操作中的令牌数量。此外,我们还研究了不同的网络学习策略,例如自我监督和零局学习,以及它们对基于变压器的行动识别的相关损失。这项调查还总结了在具有动作变压器重要基准的评估度量评分方面取得的进步。最后,它提供了有关该研究方向的挑战,前景和未来途径的讨论。
translated by 谷歌翻译
Temporal modeling is key for action recognition in videos. It normally considers both short-range motions and long-range aggregations. In this paper, we propose a Temporal Excitation and Aggregation (TEA) block, including a motion excitation (ME) module and a multiple temporal aggregation (MTA) module, specifically designed to capture both short-and long-range temporal evolution. In particular, for short-range motion modeling, the ME module calculates the feature-level temporal differences from spatiotemporal features. It then utilizes the differences to excite the motion-sensitive channels of the features. The long-range temporal aggregations in previous works are typically achieved by stacking a large number of local temporal convolutions. Each convolution processes a local temporal window at a time. In contrast, the MTA module proposes to deform the local convolution to a group of subconvolutions, forming a hierarchical residual architecture. Without introducing additional parameters, the features will be processed with a series of sub-convolutions, and each frame could complete multiple temporal aggregations with neighborhoods. The final equivalent receptive field of temporal dimension is accordingly enlarged, which is capable of modeling the long-range temporal relationship over distant frames. The two components of the TEA block are complementary in temporal modeling. Finally, our approach achieves impressive results at low FLOPs on several action recognition benchmarks, such as Kinetics, Something-Something, HMDB51, and UCF101, which confirms its effectiveness and efficiency.
translated by 谷歌翻译
We present a simple approach which can turn a ViT encoder into an efficient video model, which can seamlessly work with both image and video inputs. By sparsely sampling the inputs, the model is able to do training and inference from both inputs. The model is easily scalable and can be adapted to large-scale pre-trained ViTs without requiring full finetuning. The model achieves SOTA results and the code will be open-sourced.
translated by 谷歌翻译
视频变压器在主要视频识别基准上取得了令人印象深刻的结果,但它们遭受了高计算成本。在本文中,我们呈现Stts,一个令牌选择框架,动态地在输入视频样本上调节的时间和空间尺寸的几个信息令牌。具体而言,我们将令牌选择作为一个排名问题,估计每个令牌通过轻量级选择网络的重要性,并且只有顶级分数的人将用于下游评估。在时间维度中,我们将最相关的帧保持对识别作用类别的帧,而在空间维度中,我们确定特征映射中最辨别的区域,而不会影响大多数视频变换器中以分层方式使用的空间上下文。由于令牌选择的决定是不可差异的,因此我们采用了一个扰动最大的可分辨率Top-K运算符,用于最终培训。我们对动力学-400进行广泛的实验,最近推出的视频变压器骨架MVIT。我们的框架实现了类似的结果,同时需要计算20%。我们还表明我们的方法与其他变压器架构兼容。
translated by 谷歌翻译
在本文中,我们将多尺度视觉变压器(MVIT)作为图像和视频分类的统一架构,以及对象检测。我们提出了一种改进的MVIT版本,它包含分解的相对位置嵌入和残余汇集连接。我们以五种尺寸实例化此架构,并评估Imagenet分类,COCO检测和动力学视频识别,在此优先效果。我们进一步比较了MVITS的汇集注意力来窗口注意力机制,其中它在准确性/计算中优于后者。如果没有钟声,MVIT在3个域中具有最先进的性能:ImageNet分类的准确性为88.8%,Coco对象检测的56.1盒AP和动力学-400视频分类的86.1%。代码和模型将公开可用。
translated by 谷歌翻译
Transformer models have shown great success handling long-range interactions, making them a promising tool for modeling video. However they lack inductive biases and scale quadratically with input length. These limitations are further exacerbated when dealing with the high dimensionality introduced with the temporal dimension. While there are surveys analyzing the advances of Transformers for vision, none focus on an in-depth analysis of video-specific designs. In this survey we analyze main contributions and trends of works leveraging Transformers to model video. Specifically, we delve into how videos are handled as input-level first. Then, we study the architectural changes made to deal with video more efficiently, reduce redundancy, re-introduce useful inductive biases, and capture long-term temporal dynamics. In addition we provide an overview of different training regimes and explore effective self-supervised learning strategies for video. Finally, we conduct a performance comparison on the most common benchmark for Video Transformers (i.e., action classification), finding them to outperform 3D ConvNets even with less computational complexity.
translated by 谷歌翻译
We present a convolution-free approach to video classification built exclusively on self-attention over space and time. Our method, named "TimeSformer," adapts the standard Transformer architecture to video by enabling spatiotemporal feature learning directly from a sequence of framelevel patches. Our experimental study compares different self-attention schemes and suggests that "divided attention," where temporal attention and spatial attention are separately applied within each block, leads to the best video classification accuracy among the design choices considered. Despite the radically new design, TimeSformer achieves state-of-the-art results on several action recognition benchmarks, including the best reported accuracy on Kinetics-400 and Kinetics-600. Finally, compared to 3D convolutional networks, our model is faster to train, it can achieve dramatically higher test efficiency (at a small drop in accuracy), and it can also be applied to much longer video clips (over one minute long). Code and models are available at: https://github.com/ facebookresearch/TimeSformer.
translated by 谷歌翻译
视频理解需要在多种时空分辨率下推理 - 从短的细粒度动作到更长的持续时间。虽然变压器架构最近提出了最先进的,但它们没有明确建模不同的时空分辨率。为此,我们为视频识别(MTV)提供了多视图变压器。我们的模型由单独的编码器组成,表示输入视频的不同视图,以横向连接,以跨视图熔断信息。我们对我们的模型提供了彻底的消融研究,并表明MTV在一系列模型尺寸范围内的准确性和计算成本方面始终如一地表现优于单视对应力。此外,我们在五个标准数据集上实现最先进的结果,并通过大规模预制来进一步提高。我们将释放代码和备用检查点。
translated by 谷歌翻译
While today's video recognition systems parse snapshots or short clips accurately, they cannot connect the dots and reason across a longer range of time yet. Most existing video architectures can only process <5 seconds of a video without hitting the computation or memory bottlenecks. In this paper, we propose a new strategy to overcome this challenge. Instead of trying to process more frames at once like most existing methods, we propose to process videos in an online fashion and cache "memory" at each iteration. Through the memory, the model can reference prior context for long-term modeling, with only a marginal cost. Based on this idea, we build MeMViT, a Memory-augmented Multiscale Vision Transformer, that has a temporal support 30x longer than existing models with only 4.5% more compute; traditional methods need >3,000% more compute to do the same. On a wide range of settings, the increased temporal support enabled by MeMViT brings large gains in recognition accuracy consistently. MeMViT obtains state-of-the-art results on the AVA, EPIC-Kitchens-100 action classification, and action anticipation datasets. Code and models are available at https://github.com/facebookresearch/memvit.
translated by 谷歌翻译