mistake feature_extractor should be processor (#9)
Browse files- mistake feature_extractor should be processor (796c37238c4559b5c6d5db81afae8c39a5335be5)
Co-authored-by: Paula Vondrlik <[email protected]>
README.md
CHANGED
@@ -41,7 +41,7 @@ model = SegformerForSemanticSegmentation.from_pretrained("nvidia/segformer-b0-fi
|
|
41 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
42 |
image = Image.open(requests.get(url, stream=True).raw)
|
43 |
|
44 |
-
inputs =
|
45 |
outputs = model(**inputs)
|
46 |
logits = outputs.logits # shape (batch_size, num_labels, height/4, width/4)
|
47 |
```
|
|
|
41 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
42 |
image = Image.open(requests.get(url, stream=True).raw)
|
43 |
|
44 |
+
inputs = processor(images=image, return_tensors="pt")
|
45 |
outputs = model(**inputs)
|
46 |
logits = outputs.logits # shape (batch_size, num_labels, height/4, width/4)
|
47 |
```
|