mistake feature_extractor should be processor

#9
by hugpowr - opened
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
  ```