You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to run the following example code in Google Colab, but I keep dealing with dependency issues or failures to install detectron2. Any suggestions or advice?
import sys
sys.path.append('/content/Semantic-SAM')
from semantic_sam import prepare_image, plot_results, build_semantic_sam, SemanticSamAutomaticMaskGenerator
original_image, input_image = prepare_image(image_pth='examples/dog.jpg') # change the image path to your image
mask_generator = SemanticSamAutomaticMaskGenerator(build_semantic_sam(model_type='T', ckpt='swint_only_sam_many2many.pth')) # model_type: 'L' / 'T', depends on your checkpint
masks = mask_generator.generate(input_image)
plot_results(masks, original_image, save_path='../vis/') # results and original images will be saved at save_path
The text was updated successfully, but these errors were encountered:
I've been trying to run the following example code in Google Colab, but I keep dealing with dependency issues or failures to install detectron2. Any suggestions or advice?
The text was updated successfully, but these errors were encountered: