Mamba还是RWKV:探索高质量且高效率的Segment Anything模型
Mamba or RWKV: Exploring High-Quality and High-Efficiency Segment Anything Model
AI总结:
本文提出RWKV-SAM,通过设计结合卷积与RWKV的混合主干及多尺度token解码器,构建高效分割基准,在保证高质量分割的同时实现超2倍加速,优于Transformer和Mamba模型。
摘要:
基于Transformer的分割方法在处理高分辨率图像时面临高效推理的挑战。近期,Mamba和RWKV等几种线性注意力架构因能高效处理长序列而备受关注。本工作致力于通过探索这些不同架构来设计高效的segment-anything模型。具体而言,我们设计了一个包含卷积和RWKV操作的混合主干网络,在准确性和效率上均达到最优。此外,我们设计了一个高效解码器,利用多尺度token来获取高质量掩码。我们将该方法称为RWKV-SAM,它是类似SAM模型的一个简单、有效且快速的基线。此外,我们构建了一个包含各种高质量分割数据集的基准,并使用该基准联合训练了一个高效且高质量的分割模型。基于基准测试结果,与transformers和其他线性注意力模型相比,我们的RWKV-SAM在效率和分割质量上取得了出色的表现。例如,与同等规模的transformer模型相比,RWKV-SAM实现了超过2倍的加速,并在各种数据集上能取得更好的分割性能。此外,RWKV-SAM优于近期的视觉Mamba模型,具有更好的分类和语义分割结果。代码和模型将公开提供。
英文摘要:
Transformer-based segmentation methods face the challenge of efficient inference when dealing with high-resolution images. Recently, several linear attention architectures, such as Mamba and RWKV, have attracted much attention as they can process long sequences efficiently. In this work, we focus on designing an efficient segment-anything model by exploring these different architectures. Specifically, we design a mixed backbone that contains convolution and RWKV operation, which achieves the best for both accuracy and efficiency. In addition, we design an efficient decoder to utilize the multiscale tokens to obtain high-quality masks. We denote our method as RWKV-SAM, a simple, effective, fast baseline for SAM-like models. Moreover, we build a benchmark containing various high-quality segmentation datasets and jointly train one efficient yet high-quality segmentation model using this benchmark. Based on the benchmark results, our RWKV-SAM achieves outstanding performance in efficiency and segmentation quality compared to transformers and other linear attention models. For example, compared with the same-scale transformer model, RWKV-SAM achieves more than 2x speedup and can achieve better segmentation performance on various datasets. In addition, RWKV-SAM outperforms recent vision Mamba models with better classification and semantic segmentation results. Code and models will be publicly available.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。