VisionMamba
Implementation of Vision Mamba from the paper: "Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Model" It's 2.8x faster th
What is VisionMamba?
Implementation of Vision Mamba from the paper: "Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Model" It's 2.8x faster than DeiT and saves 86.8% GPU memory when performing batch inference to extract features on high-res images
Overview of VisionMamba
What it is
VisionMamba is an implementation of the Vision Mamba model described in the paper: 'Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Model'. According to the paper, it is 2.8x faster than DeiT and saves 86.8% GPU memory when performing batch inference to extract features on high-resolution images. The repository provides a PyTorch implementation of the Vim model.
Key features
- Implements the Vision Mamba (Vim) architecture with bidirectional state space model.
- Claims 2.8x speed improvement over DeiT and 86.8% GPU memory savings for batch inference on high-res images.
- Provides a configurable Vim class with parameters such as dimension, heads, dt_rank, dim_inner, d_state, num_classes, image_size, patch_size, channels, dropout, and depth.
- Includes a forward pass example using random input tensors.
- Licensed under MIT.
Use cases
- Efficient visual representation learning for image classification tasks.
- Batch feature extraction on high-resolution images where GPU memory is a constraint.
- Research and experimentation with state space models in computer vision.
Getting started
Install via pip: bash pip install vision-mamba Then use in Python: python import torch from vision_mamba import Vim x = torch.randn(1, 3, 224, 224) model = Vim(dim=256, heads=8, dt_rank=32, dim_inner=256, d_state=256, num_classes=1000, image_size=224, patch_size=16, channels=3, dropout=0.1, depth=12) out = model(x) print(out.shape) print(out)
License and pricing
The license is MIT. The project is open source with no stated pricing.
Based on the project's public README and repository metadata.