nielsr HF staff commited on
Commit
c30f696
1 Parent(s): 6010ab2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -31,11 +31,11 @@ You can use the raw model for semantic segmentation. See the [model hub](https:/
31
  Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:
32
 
33
  ```python
34
- from transformers import SegformerFeatureExtractor, SegformerForSemanticSegmentation
35
  from PIL import Image
36
  import requests
37
 
38
- feature_extractor = SegformerFeatureExtractor.from_pretrained("nvidia/segformer-b0-finetuned-ade-512-512")
39
  model = SegformerForSemanticSegmentation.from_pretrained("nvidia/segformer-b0-finetuned-ade-512-512")
40
 
41
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
 
31
  Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:
32
 
33
  ```python
34
+ from transformers import SegformerImageProcessor, SegformerForSemanticSegmentation
35
  from PIL import Image
36
  import requests
37
 
38
+ processor = SegformerImageProcessor.from_pretrained("nvidia/segformer-b0-finetuned-ade-512-512")
39
  model = SegformerForSemanticSegmentation.from_pretrained("nvidia/segformer-b0-finetuned-ade-512-512")
40
 
41
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"