This is a demo of https://github.com/facebookresearch/segment-anything from Meta.
segment_demo.mp4
pip install 'git+https://github.com/facebookresearch/segment-anything.git'
Other dependencies:
numpy
matplotlib
torch
torchvision
opencv-python
ghdtimer
Download the pretrained model from here and put it in the models
folder.
If you want to use bigger models, you can download them from here and rename the model_path
in segment_image.py
. Dont forget to set the model_type
too(vit_h, vit_b, ...).
python segment_image.py
Currently Tested with CPU only You might need to make minor changes to use Cuda.