SAM 3.1 Release (#503)
Summary: SAM 3.1 multiplex video tracking for the OSS sam3 repository. Features: - Multiplex architecture: batch N objects into fixed-capacity buckets for efficient multi-object tracking (16 objects per bucket) - Unified API: build_sam3_predictor(version="sam3.1") with auto-download from HuggingFace (facebook/sam3.1) - Flash Attention 3, torch.compile support (~31 FPS compiled on H100) - Text prompts, point prompts, box prompts, object removal, refinement - Clean inheritance: Sam3MultiplexBase extends Sam3VideoBase - Shared base predictor (Sam3BasePredictor) for both SAM3 and SAM3.1 Performance (H100, 5 objects, compiled): - SAM 3.1: ~31 FPS - Memory: ~17.7 GB Usage: from sam3 import build_sam3_predictor predictor = build_sam3_predictor() # auto-downloads SAM 3.1 from HF Pull Request resolved: https://github.com/facebookresearch/sam3/pull/503 Reviewed By: josephgreer Differential Revision: D98500763 Pulled By: arpitkalla fbshipit-source-id: e2b74568f24bb4ecfb3144a4e8ec559aae6db5e8
This commit is contained in:
committed by
meta-codesync[bot]
parent
86ed770940
commit
9f22cb976f
@@ -55,6 +55,13 @@ This breakthrough is driven by an innovative data engine that has automatically
|
||||
<img src="assets/player.gif" width=380 />
|
||||
</p>
|
||||
|
||||
## Latest updates
|
||||
|
||||
**03/27/2026 -- SAM 3.1 Object Multiplex is released. It introduces a shared-memory approach for joint multi-object tracking that is significantly faster without sacrificing accuracy.**
|
||||
|
||||
- A new suite of improved model checkpoints (denoted as **SAM 3.1**) are released on [Hugging Face](https://huggingface.co/facebook/sam3.1). See [`RELEASE_SAM3p1.md`](RELEASE_SAM3p1.md) for full details.
|
||||
* To use the new SAM 3.1 checkpoints, you need the latest model code from this repo. If you have installed an earlier version of this repo, pull the latest code from this repo (with `git pull`), and then reinstall the repo following [Installation](#installation) below.
|
||||
|
||||
## Installation
|
||||
|
||||
### Prerequisites
|
||||
@@ -74,7 +81,7 @@ conda activate sam3
|
||||
2. **Install PyTorch with CUDA support:**
|
||||
|
||||
```bash
|
||||
pip install torch==2.7.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
|
||||
pip install torch==2.10.0 torchvision --index-url https://download.pytorch.org/whl/cu128
|
||||
```
|
||||
|
||||
3. **Clone the repository and install the package:**
|
||||
@@ -95,6 +102,12 @@ pip install -e ".[notebooks]"
|
||||
pip install -e ".[train,dev]"
|
||||
```
|
||||
|
||||
5. **Optional dependencies for faster inference**
|
||||
```bash
|
||||
pip install einops ninja && pip install flash-attn-3 --no-deps --index-url https://download.pytorch.org/whl/cu128
|
||||
pip install git+https://github.com/ronghanghu/cc_torch.git
|
||||
```
|
||||
|
||||
## Getting Started
|
||||
|
||||
⚠️ Before using SAM 3, please request access to the checkpoints on the SAM 3
|
||||
|
||||
Reference in New Issue
Block a user