Spaces:
Runtime error
Runtime error
JinHyeong99
commited on
Commit
·
ac40df1
1
Parent(s):
c5695f7
app.py
CHANGED
@@ -8,9 +8,11 @@ model = SegformerForSemanticSegmentation.from_pretrained("nvidia/segformer-b3-fi
|
|
8 |
# url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
9 |
# image = Image.open(requests.get(url, stream=True).raw)
|
10 |
|
11 |
-
|
12 |
-
|
|
|
|
|
13 |
|
14 |
-
inputs = feature_extractor(images=
|
15 |
outputs = model(**inputs)
|
16 |
logits = outputs.logits # shape (batch_size, num_labels, height/4, width/4)
|
|
|
8 |
# url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
9 |
# image = Image.open(requests.get(url, stream=True).raw)
|
10 |
|
11 |
+
image1, image2, image3 = 'image1', 'image2', 'image3'
|
12 |
+
image1 = Image.open(image1)
|
13 |
+
image2 = Image.open(image2)
|
14 |
+
image3 = Image.open(image3)
|
15 |
|
16 |
+
inputs = feature_extractor(images=[image1, image2, image3], return_tensors="pt")
|
17 |
outputs = model(**inputs)
|
18 |
logits = outputs.logits # shape (batch_size, num_labels, height/4, width/4)
|