Ruiqi Shen1 · Chang Liu2✉️ · Henghui Ding1✉️
1Fudan University 2Shanghai University of Finance and Economics
demo.mp4
# create new conda environment
conda create -n sam3_decoupled python=3.12
conda deactivate
conda activate sam3_decoupled
# for pytorch/cuda dependencies
pip install torch==2.7.0 torchvision --index-url https://download.pytorch.org/whl/cu126
# clone the repo & install packages
git clone https://github.com/FudanCVL/SAM3_decoupled.git
cd SAM3_decoupled
pip install -e .hf auth login after generating an access token.)
Please organize the downloaded checkpoint as follows:
├── sam3_ckpt/
│ ├── sam3.pt
│ └── ...
We follow the same training and inference pipeline as SAM3. For detailed instructions, please see Evaluation, and Training.
We provide additional streamlined script for interactive PCS. You can simply specify a video input (mp4 or jpg folder) and enter text prompts via the command line to generate results.
python interactive_demo.py
Enter video path: # input the video (either mp4 or jpg folder)
Enter text prompt: # input the promptIf you find our work useful in your research, please consider citing:
@article{shen2024sam3dms,
title={SAM3-DMS: Decoupled Memory Selection for Multi-target Video Segmentation of SAM3},
author={Ruiqi Shen and Chang Liu and Henghui Ding},
year={2026},
journal={arXiv preprint arXiv:2601.09699},
}