Grounded SAM 2: Ground and Track Anything with Grounding DINO and SAM 2
Since we need the CUDA compilation environment to compile the Deformable Attention
operator used in Grounding DINO, we need to check whether the CUDA environment variables have been set correctly (which you can refer to Grounding DINO Installation for more details). You can set the environment variable manually as follows if you want to build a local GPU environment for Grounding DINO to run Grounded SAM 2:
export CUDA_HOME=/path/to/cuda-12.1/
Install segment-anything-2
:
pip install -e .
Install grounding dino
:
pip install --no-build-isolation -e grounding_dino