- Clone repo and initialize submodules
git clone --recurse-submodules https://github.com/ecker-lab/SAM2-Animal-Tracking - Setup Environment (e.g. using conda, python>=3.10)
conda create --name sam2animal python=3.12
conda activate sam2animal - Install Pytorch (torch>=2.5.1, torchvision>=0.20.1)
pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu126 - Install the repo
pip install -e . - Download SAM 2 checkpoints (instructions taken from sam2 repo)
./download_ckpts.sh && \
cd ../..
- (Optional) Setup separate MMDetection environment
This is only recommended if there is a specific reason to use a MMDetection detector.
conda create --name mm_detect python=3.12
conda activate mm_detect
Then follow the MMDetection installation instruction.