Skip to content

installing on WSL2 #20

@21pl

Description

@21pl

so going through the multitude of issues on the GroundingDino repository I finally managed to hack this together....

WSL2 WIndows 10 Ubuntu 22.04.2 LTS. shell

conda create --name deva3 python=3.10.12
conda activate deva3
git clone https://github.com/hkchengrex/Grounded-Segment-Anything
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia
wget https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda_11.7.0_515.43.04_linux.run
sudo apt install gcc
sudo sh cuda_11.7.0_515.43.04_linux.run
cd Grounded-Segment-Anything/
export BUILD_WITH_CUDA=True
export AM_I_DOCKER=False
export CUDA_HOME=/usr/local/cuda-11.7
cd Grounded-Segment-Anything/
export PATH=/usr/local/cuda-11.7/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-11.7/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export PATH=$PATH:/usr/local/bin/aws
export PATH=$PATH:[MYHIP]/bin
sudo apt-get install g++
pip install -e GroundingDINO ( may have to --force-reinstall if it doesn't install first time without errors))
pip install -q -e segment_anything
git clone https://github.com/hkchengrex/Tracking-Anything-with-DEVA
cd Tracking-Anything-with-DEVA/
pip install -q -e .
bash scripts/download_models.sh

and finally the following works...

python demo/demo_with_text.py --chunk_size 4 --img_path ./example/vipseg/images/12_1mWNahzcsAc --amp --temporal_setting semionline --size 480 --output ./example/output --prompt person.hat.horse

unfortunately the gradio demo doesn't produce the final result but just hangs after all the processing is done. Still need to figure that one out but the commandline seems to work for both prompt and automatic.
Amazing work @hkchengrex as usual!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions