We have developed the first hybrid model for computer vision which leverages the strengths of Mamba and Transformers. Specifically, our core contribution includes redesigning the Mamba formulation to enhance its capability for efficient modeling of visual features. In addition, we conducted a comprehensive ablation study on the feasibility of integrating Vision Transformers (ViT) with Mamba. Our results demonstrate that equipping the Mamba architecture with several self-attention blocks at the final layers greatly improves the modeling capacity to capture long-range spatial dependencies. Based on our findings, we introduce a family of MambaVision models with a hierarchical architecture to meet various design criteria.
Model Performance
MambaVision-L3-512-21K is pretrained on ImageNet-21K dataset and finetuned on ImageNet-1K at 512 x 512 resolution.
Name
Acc@1(%)
Acc@5(%)
#Params(M)
FLOPs(G)
Resolution
MambaVision-L3-512-21K
88.1
98.6
739.6
489.1
512x512
In addition, the MambaVision models demonstrate a strong performance by achieving a new SOTA Pareto-front in
terms of Top-1 accuracy and throughput.
Model Usage
It is highly recommended to install the requirements for MambaVision by running the following:
pip install mambavision
For each model, we offer two variants for image classification and feature extraction that can be imported with 1 line of code.
Image Classification
In the following example, we demonstrate how MambaVision can be used for image classification.
Given the following image from COCO dataset val set as an input:
The following snippet can be used for image classification: