Playground Web UI using segment-anything-2 models from the Meta.
APACHE-2.0 License
Gradio based playground web UI using facebook/segment-anything-2 models.
See PROMPT_GUIDE.md to see how to prompt the segmentation parts of the image.
To run this Web UI, you need these prerequisites. If you don't have them, please install them in the following links :
git
: https://git-scm.com/downloads
python=>3.10
: https://www.python.org/downloads/
FFmpeg
: https://ffmpeg.org/download.html
After installing FFmpeg, make sure to add the FFmpeg/bin
folder to your system PATH!
And for CUDA, if you're not using an Nvidia GPU and CUDA 12.4, edit the requirements.txt to match your environment.
There's a set of shell / batch scripts for installation and running.
sam2-playground-portable.zip
with the file corresponding to your OS and extract its contents.install.bat
or install.sh
to install dependencies. (It will create a venv
directory and install dependencies there.)start-webui.bat
or start-webui.sh
(It will run python app.py
after activating the venv
)update.bat
or update.sh
(It will run git pull origin master
)git clone https://github.com/jhj0517/sam2-playground.git
docker compose build
docker compose up
localhost:7860
with your browser.If needed, update docker-compose.yaml
to match your environments.
change()
API for gradio_image_prompter
and automatically generate preview for video predictor