Mamba or RWKV: Exploring High-Quality and High-Efficiency Segment Anything Model

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Yuan, Haobo, Li, Xiangtai, Qi, Lu, Zhang, Tao, Yang, Ming-Hsuan, Yan, Shuicheng, Loy, Chen Change
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909232587079680
author Yuan, Haobo
Li, Xiangtai
Qi, Lu
Zhang, Tao
Yang, Ming-Hsuan
Yan, Shuicheng
Loy, Chen Change
author_facet Yuan, Haobo
Li, Xiangtai
Qi, Lu
Zhang, Tao
Yang, Ming-Hsuan
Yan, Shuicheng
Loy, Chen Change
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2406_19369
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Mamba or RWKV: Exploring High-Quality and High-Efficiency Segment Anything Model
Yuan, Haobo
Li, Xiangtai
Qi, Lu
Zhang, Tao
Yang, Ming-Hsuan
Yan, Shuicheng
Loy, Chen Change
Computer Vision and Pattern Recognition
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.
title Mamba or RWKV: Exploring High-Quality and High-Efficiency Segment Anything Model
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2406.19369