This guide covers the installation of optional external segmentation models for SPROUT.
SPROUT supports integration with Segment Anything Model for enhanced segmentation capabilities.
If you want to use prompts generated from SPROUT in SAM, you can install SAM models like SAM and SAM2. Currently only supports SAM1 and SAM2-based models
pip install torch torchvision torchaudio
pip install opencv-python-headless
https://pytorch.org/get-started/locally/
You also need to install the SAM and/or SAM2 libraries:
-
git clone https://github.com/facebookresearch/segment-anything.git cd segment-anything pip install -e .
-
git clone https://github.com/facebookresearch/sam2.git cd sam2 pip install -e .
See Official repo for detail information
You need a Linux or Windows computer with a Nvidia GPU. 10GB of VRAM is recommended. Small objects should work with <6GB.
Go to the PyTorch homepage and pick the right configuration. Note that since recently PyTorch needs to be installed via pip. This is fine to do within your conda environment.
For Ubuntu with a Nvidia GPU, pick 'stable', 'Linux', 'Pip', 'Python', 'CUDA12.6' (if all drivers are up to date, otherwise use and older version):
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu126
Either install via pip:
pip install nninteractive
Or clone and install this repository:
git clone https://github.com/MIC-DKFZ/nnInteractive
cd nnInteractive
pip install -e .