Transformers have revolutionized computer vision and natural language processing, but their high computational complexity limits their application in high-resolution image processing and long-context analysis. This paper introduces Vision-RWKV (VRWKV), a model adapted from the RWKV model used in the NLP field with necessary modifications for vision tasks. Similar to the Vision Transformer (ViT), our model is designed to efficiently handle sparse inputs and demonstrate robust global processing capabilities, while also scaling up effectively, accommodating both large-scale parameters and extensive datasets. Its distinctive advantage lies in its reduced spatial aggregation complexity, which renders it exceptionally adept at processing high-resolution images seamlessly, eliminating the necessity for windowing operations. Our evaluations demonstrate that VRWKV surpasses ViT's performance in image classification and has significantly faster speeds and lower memory usage processing high-resolution inputs. In dense prediction tasks, it outperforms window-based models, maintaining comparable speeds. These results highlight VRWKV's potential as a more efficient alternative for visual perception tasks. Code is released at \url{https://github.com/OpenGVLab/Vision-RWKV}.
翻译:Transformer架构在计算机视觉与自然语言处理领域引发了革命性变革,但其高昂的计算复杂度限制了在高分辨率图像处理与长上下文分析中的应用。本文提出Vision-RWKV(VRWKV)模型,该模型源自自然语言处理领域的RWKV架构,并针对视觉任务进行了必要改进。与视觉Transformer(ViT)类似,本模型可高效处理稀疏输入并展现强大的全局处理能力,同时具备良好的可扩展性,能够适配大规模参数与海量数据集。其独特优势在于降低了空间聚合复杂度,从而能够无缝处理高分辨率图像,无需采用窗口化操作。评估结果表明,VRWKV在图像分类任务中超越ViT性能,处理高分辨率输入时显著提升速度并降低内存占用。在密集预测任务中,该模型优于基于窗口的架构且保持相近处理速度。这些成果凸显了VRWKV作为视觉感知任务更高效替代方案的潜力。相关代码已开源至\url{https://github.com/OpenGVLab/Vision-RWKV}。