Adapted by
Theo SAMINADIN
Cheng-Yen Yang, Hsiang-Wei Huang, Wenhao Chai, Zhongyu Jiang, Jenq-Neng Hwang
Information Processing Lab, University of Washington
NukeSamuraiDemo.mp4
Samurai for Nuke allows you to generate masks from an image sequence, based on SAMURAI adaptation of SAM2 Model for Zero-Shot Visual Tracking with Motion-Aware Memory.
💡 Additional features:
- Mask export
- EXR input/output
- Frame range
- Bounding Box Interface
- Ubuntu>=20.04
- Nuke>=15 (not tested on previous versions)
- python>=3.10
- torch>=2.3.1
- torchvision>=0.18.1
NS_InstallationGuide.mp4
git clone https://github.com/Theo-SAMINADIN-td/NukeSamurai.git
Or Download this repo as ZIP file and extract it in your Nuke/plugins folder (Rename the folder correctly: NukeSamurai)
Your files should be structured like this:
Nuke
├── plugins/
│ ├── NukeSamurai/
│ │ ├── sam2_repo/
│ │ ├── scripts/
│ │ │ ├── demo.py
│ │ │ ├── nuke_samurai.py
│ │ ├── icons/
│ │ ├── init.py
│ │ ├── menu.py
│ ├── ...
│ ├── init.py
│ ├── menu.py
├── ...
In Nuke/plugins/init.py (not NukeSamurai/init.py) add:
nuke.pluginAddPath("NukeSamurai")
In NukeSamurai/init.py (not Nuke/plugins/init.py) remove the "#" and add your environment path:
nuke.pluginAddPath("path/to/Python310/Lib/site-packages", addToSysPath=True)
If torch>=2.3.1
and torchvision>=0.18.1
are not already installed:
pip install torch==2.3.1+cu118 torchvision==0.18.1 --extra-index-url https://download.pytorch.org/whl/cu118
cd NukeSamurai/sam2_repo
pip install -e .
pip install -e ".[notebooks]"
For potential installation issues, check SAMURAI Issues and Solutions and SAM2 INSTALL.md
Install other requirements:
pip install matplotlib==3.7 tikzplotlib jpeg4py opencv-python lmdb pandas scipy loguru ninja
cd checkpoints && \
./download_ckpts.sh && \
cd ..