zuppif commited on
Commit
a34764d
1 Parent(s): b2aa1f7

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +64 -0
README.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - vision
5
+ - image-classification
6
+
7
+ datasets:
8
+ - imagenet-1k
9
+
10
+ widget:
11
+ - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/tiger.jpg
12
+ example_title: Tiger
13
+ - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/teapot.jpg
14
+ example_title: Teapot
15
+ - src: https://huggingface.co/datasets/mishig/sample_images/resolve/main/palace.jpg
16
+ example_title: Palace
17
+
18
+ ---
19
+
20
+ # RegNetModel
21
+
22
+ RegNetModel model trained on imagenet-1k. It was introduced in the paper [Vision Models Are More Robust And Fair When Pretrained On Uncurated Images Without Supervision](https://arxiv.org/abs/2202.08360) and first released in [this repository](https://github.com/facebookresearch/vissl/tree/main/projects/SEER).
23
+
24
+ Disclaimer: The team releasing RegNetModel did not write a model card for this model so this model card has been written by the Hugging Face team.
25
+
26
+ ## Model description
27
+
28
+ The authors trained [RegNets](https://huggingface.co/?models=regnet) models in a self-supervised fashion on bilion of random images from the internet. This model is later finetuned on ImageNet
29
+
30
+ ![model image](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/regnet_architecture.png)
31
+
32
+ ## Intended uses & limitations
33
+
34
+ You can use the raw model for image classification. See the [model hub](https://huggingface.co/models?search=regnet) to look for
35
+ fine-tuned versions on a task that interests you.
36
+
37
+ ### How to use
38
+
39
+ Here is how to use this model:
40
+
41
+ ```python
42
+ >>> from transformers import AutoFeatureExtractor, RegNetModel
43
+ >>> import torch
44
+ >>> from datasets import load_dataset
45
+
46
+ >>> dataset = load_dataset("huggingface/cats-image")
47
+ >>> image = dataset["test"]["image"][0]
48
+
49
+ >>> feature_extractor = AutoFeatureExtractor.from_pretrained("zuppif/regnet-y-040")
50
+ >>> model = RegNetModel.from_pretrained("zuppif/regnet-y-040")
51
+
52
+ >>> inputs = feature_extractor(image, return_tensors="pt")
53
+
54
+ >>> with torch.no_grad():
55
+ ... outputs = model(**inputs)
56
+
57
+ >>> last_hidden_states = outputs.last_hidden_state
58
+ >>> list(last_hidden_states.shape)
59
+ [1, 1088, 7, 7]
60
+ ```
61
+
62
+
63
+
64
+ For more code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/master/en/model_doc/regnet).