We are trying to use Segment Anything Model in a Jupyter notebook in this plataform.
With previous testing on local jupyter notebook and Google Colab online that worked but here in PA don't work anyboth codes.
pip install git+https://github.com/facebookresearch/segment-anything.git
------------------------------
import torch
from segment_anything import sam_model_registry, SamPredictor, SamAutomaticMaskGenerator
-----------------------------
DEVICE = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
MODEL_TYPE = "vit_h"
----- previously we just install the github and import the neccesary for the project. ----
sam = sam_model_registry[MODEL_TYPE](checkpoint="sam_vit_h_4b8939.pth").to(device=DEVICE)
And in this line causes the problem and the Kernel Died. We just trying alot of variations in the code for this error, but we can't reach a correct answer or if we are missing something. Help us please.