nielsr HF staff commited on
Commit
92fbfe3
1 Parent(s): ad9ce86

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +25 -3
README.md CHANGED
@@ -1,4 +1,26 @@
1
- ### How to use
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:
4
 
@@ -10,8 +32,8 @@ import requests
10
  url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
11
  image = Image.open(requests.get(url, stream=True).raw)
12
 
13
- feature_extractor = AutoFeatureExtractor.from_pretrained('anugunj/cvt-13-384-22k')
14
- model = CvtForImageClassification.from_pretrained('anugunj/cvt-13-384-22k')
15
 
16
  inputs = feature_extractor(images=image, return_tensors="pt")
17
  outputs = model(**inputs)
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - vision
5
+ - image-classification
6
+ datasets:
7
+ - imagenet-1k
8
+ widget:
9
+ - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg
10
+ example_title: Tiger
11
+ - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg
12
+ example_title: Teapot
13
+ - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg
14
+ example_title: Palace
15
+ ---
16
+
17
+ # Convolutional Vision Transformer (CvT)
18
+
19
+ CvT-13 model pre-trained on ImageNet-22k and fine-tuned on ImageNet-1k at resolution 384x384. It was introduced in the paper [CvT: Introducing Convolutions to Vision Transformers](https://arxiv.org/abs/2103.15808) by Wu et al. and first released in [this repository](https://github.com/microsoft/CvT).
20
+
21
+ Disclaimer: The team releasing CvT did not write a model card for this model so this model card has been written by the Hugging Face team.
22
+
23
+ ## Usage
24
 
25
  Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:
26
 
32
  url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
33
  image = Image.open(requests.get(url, stream=True).raw)
34
 
35
+ feature_extractor = AutoFeatureExtractor.from_pretrained('microsoft/cvt-13-384-22k')
36
+ model = CvtForImageClassification.from_pretrained('microsoft/cvt-13-384-22k')
37
 
38
  inputs = feature_extractor(images=image, return_tensors="pt")
39
  outputs = model(**inputs)