nielsr HF staff hugpowr commited on
Commit
cc2189c
1 Parent(s): c30f696

mistake feature_extractor should be processor (#9)

Browse files

- mistake feature_extractor should be processor (796c37238c4559b5c6d5db81afae8c39a5335be5)


Co-authored-by: Paula Vondrlik <[email protected]>

Files changed (1) hide show
  1. README.md +1 -1
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 = feature_extractor(images=image, return_tensors="pt")
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
  ```