nielsr HF staff sapfear commited on
Commit
fe97dbe
1 Parent(s): 96540f7

Update README.md (#3)

Browse files

- Update README.md (a0380cd612dc9889c50ada5b319a85a3030a8556)
- changed MobileViTFeatureExtractor to MobileViTImageProcessor (68dac7933594e9db3b9d5624331625e9c1f70166)


Co-authored-by: Daniel Kuznetsov <sapfear@users.noreply.huggingface.co>

Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -30,15 +30,15 @@ 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 MobileViTv2FeatureExtractor, 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 = MobileViTv2FeatureExtractor.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")
44
 
 
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")
44