flaviagiammarino
commited on
Commit
•
6a5851a
1
Parent(s):
5622644
Update README.md
Browse files
README.md
CHANGED
@@ -28,7 +28,7 @@ import requests
|
|
28 |
import numpy as np
|
29 |
import matplotlib.pyplot as plt
|
30 |
from PIL import Image
|
31 |
-
from transformers import SamModel, SamProcessor
|
32 |
import torch
|
33 |
|
34 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
@@ -36,7 +36,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
36 |
model = SamModel.from_pretrained("flaviagiammarino/medsam-vit-base").to(device)
|
37 |
processor = SamProcessor.from_pretrained("flaviagiammarino/medsam-vit-base")
|
38 |
|
39 |
-
img_url = "https://
|
40 |
raw_image = Image.open(requests.get(img_url, stream=True).raw).convert("RGB")
|
41 |
input_boxes = [95., 255., 190., 350.]
|
42 |
|
|
|
28 |
import numpy as np
|
29 |
import matplotlib.pyplot as plt
|
30 |
from PIL import Image
|
31 |
+
from transformers import SamModel, SamProcessor
|
32 |
import torch
|
33 |
|
34 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
|
36 |
model = SamModel.from_pretrained("flaviagiammarino/medsam-vit-base").to(device)
|
37 |
processor = SamProcessor.from_pretrained("flaviagiammarino/medsam-vit-base")
|
38 |
|
39 |
+
img_url = "https://huggingface.co/flaviagiammarino/medsam-vit-base/resolve/main/scripts/input.png"
|
40 |
raw_image = Image.open(requests.get(img_url, stream=True).raw).convert("RGB")
|
41 |
input_boxes = [95., 255., 190., 350.]
|
42 |
|