facebookresearch / segment-anything-2

The repository provides code for running inference with the Meta Segment Anything Model 2 (SAM 2), links for downloading the trained model checkpoints, and example notebooks that show how to use the model.
Apache License 2.0
10.73k stars 865 forks source link

Tutorial on how to correctly install Segment Anything Model 2 in Windows and how to fix issues with CUDA, compilers, etc. #80

Open AleksandarHaber opened 1 month ago

AleksandarHaber commented 1 month ago

This is post is not about a code issue, but instead, it gives a tutorial on how to solve code issues that people raised in this group:

Hello friends, colleagues, and other people interested in this amazing software. I spent a day yesterday trying to install Segment Anything Model 2 (SAM2) on my Windows computer with NVIDIA 3090 GPU. I was experiencing challenges and compiler errors. Some of these challenges are also raised in this group. Finally, I succeded, and I decided to create a video tutorial on how to install SAM2 in Python on a Windows machine. Also, I explain how to run a program that is based on the official tutorial file. I made a number of modifications to the official tutorial file, and now the program will load images, perform object detection, and save the masked images (with masked objects) in separate files. Then, I explain how to use ffmpeg to create a video out of saved files, such that you can nicely visualize the results. The video tutorial is given here:

https://www.youtube.com/watch?v=MIUxiLjoA1g

K56KShhu commented 1 month ago

Thanks for this—it's really helpful!

ghazra-clgx commented 1 month ago

Propagate in video is taking a lot of time to run for me for some reason.