Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

segment-anything-2

Run Segment Anything Model 2 on a static image, video and live video stream

Demo

For static image

For video

For real-time video stream

Getting Started

Installation

pipenv install
pipenv shell

Download Checkpoint

Then, we need to download a model checkpoint.

# excute on git bash
cd checkpoints
./download_ckpts.sh

Run Demo

For static image

cd demo
python demo.py --input image --prompt p     # click point
python demo.py --input image --prompt b     # bounding box

For video

python demo.py --input video --prompt p     # click point
python demo.py --input video --prompt b     # bounding box

For real-time video stream

python demo.py --input real-time

Inference on your own data

For static image

cd script
python inference_image.py --prompt p    # click point
python inference_image.py --prompt b    # bounding box

For video

cd script
python inference_video.py --prompt p    # click point
python inference_video.py --prompt b    # bounding box

For real-time video stream

cd script
python inference_real_time.py

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages