sapfear commited on
Commit
68dac79
·
1 Parent(s): a0380cd

changed MobileViTFeatureExtractor to MobileViTImageProcessor

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -30,14 +30,14 @@ You can use the raw model for image classification. See the [model hub](https://
30
  Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:
31
 
32
  ```python
33
- from transformers import MobileViTFeatureExtractor, MobileViTV2ForImageClassification
34
  from PIL import Image
35
  import requests
36
 
37
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
38
  image = Image.open(requests.get(url, stream=True).raw)
39
 
40
- feature_extractor = MobileViTFeatureExtractor.from_pretrained("shehan97/mobilevitv2-1.0-imagenet1k-256")
41
  model = MobileViTV2ForImageClassification.from_pretrained("shehan97/mobilevitv2-1.0-imagenet1k-256")
42
 
43
  inputs = feature_extractor(images=image, return_tensors="pt")
 
30
  Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:
31
 
32
  ```python
33
+ from transformers import MobileViTImageProcessor, MobileViTV2ForImageClassification
34
  from PIL import Image
35
  import requests
36
 
37
  url = "http://images.cocodataset.org/val2017/000000039769.jpg"
38
  image = Image.open(requests.get(url, stream=True).raw)
39
 
40
+ feature_extractor = MobileViTImageProcessor.from_pretrained("shehan97/mobilevitv2-1.0-imagenet1k-256")
41
  model = MobileViTV2ForImageClassification.from_pretrained("shehan97/mobilevitv2-1.0-imagenet1k-256")
42
 
43
  inputs = feature_extractor(images=image, return_tensors="pt")