zuppif commited on
Commit
2e0d7c2
1 Parent(s): f256c51

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +65 -0
README.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ # RegNet
21
+
22
+ RegNet model trained on imagenet-1k. It was introduced in the paper [Designing Network Design Spaces](https://arxiv.org/abs/2003.13678) and first released in [this repository](https://github.com/facebookresearch/pycls).
23
+
24
+ Disclaimer: The team releasing RegNet 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 design search spaces to perform Neural Architecture Search (NAS). They first start from a high dimensional search space and iteratively reduce the search space by empirically applying constraints based on the best-performing models sampled by the current search space.
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, RegNetForImageClassification
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 = RegNetForImageClassification.from_pretrained("zuppif/regnet-y-040")
51
+
52
+ >>> inputs = feature_extractor(image, return_tensors="pt")
53
+
54
+ >>> with torch.no_grad():
55
+ ... logits = model(**inputs).logits
56
+
57
+ >>> # model predicts one of the 1000 ImageNet classes
58
+ >>> predicted_label = logits.argmax(-1).item()
59
+ >>> print(model.config.id2label[predicted_label])
60
+ 'tabby, tabby cat'
61
+ ```
62
+
63
+
64
+
65
+ For more code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/master/en/model_doc/regnet).