smaciu commited on
Commit
3a1f81e
·
1 Parent(s): 0c42dfb

Push FastAI model using huggingface_hub.

Browse files
Files changed (3) hide show
  1. README.md +15 -49
  2. model.pkl +2 -2
  3. pyproject.toml +1 -1
README.md CHANGED
@@ -1,66 +1,32 @@
1
  ---
2
  tags:
3
  - fastai
4
- license: afl-3.0
5
- datasets:
6
- - smaciu/bee-wings-large
7
- - smaciu/bee-wings-small
8
- metrics:
9
- - accuracy
10
- library_name: fastai
11
- pipeline_tag: image-classification
12
  ---
13
 
14
- Model description in progress...
15
 
 
16
 
17
- ---
18
-
19
- ResNet-50 v1.5
20
-
21
- ResNet model pre-trained on ImageNet-1k at resolution 224x224. It was introduced in the paper [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) by He et al.
22
-
23
- Disclaimer: The team releasing ResNet did not write a model card for this model so this model card has been written by the Hugging Face team.
24
-
25
- ## Model description
26
-
27
- ResNet (Residual Network) is a convolutional neural network that democratized the concepts of residual learning and skip connections. This enables to train much deeper models.
28
-
29
- This is ResNet v1.5, which differs from the original model: in the bottleneck blocks which require downsampling, v1 has stride = 2 in the first 1x1 convolution, whereas v1.5 has stride = 2 in the 3x3 convolution. This difference makes ResNet50 v1.5 slightly more accurate (\~0.5% top1) than v1, but comes with a small performance drawback (~5% imgs/sec) according to [Nvidia](https://catalog.ngc.nvidia.com/orgs/nvidia/resources/resnet_50_v1_5_for_pytorch).
30
 
31
- ![model image](https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/resnet_architecture.png)
32
 
33
- ## Intended uses & limitations
34
-
35
- You can use the raw model for image classification. See the [model hub](https://huggingface.co/models?search=resnet) to look for
36
- fine-tuned versions on a task that interests you.
37
-
38
- ### How to use
39
-
40
- Here is how to use this model to classify an image of the COCO 2017 dataset into one of the 1,000 ImageNet classes:
41
 
42
- ```python
43
- from transformers import AutoImageProcessor, ResNetForImageClassification
44
- import torch
45
- from datasets import load_dataset
46
 
47
- dataset = load_dataset("huggingface/cats-image")
48
- image = dataset["test"]["image"][0]
49
 
50
- processor = AutoImageProcessor.from_pretrained("microsoft/resnet-50")
51
- model = ResNetForImageClassification.from_pretrained("microsoft/resnet-50")
52
-
53
- inputs = processor(image, return_tensors="pt")
54
 
55
- with torch.no_grad():
56
- logits = model(**inputs).logits
57
 
58
- # model predicts one of the 1000 ImageNet classes
59
- predicted_label = logits.argmax(-1).item()
60
- print(model.config.id2label[predicted_label])
61
- ```
62
 
63
- For more code examples, we refer to the [documentation](https://huggingface.co/docs/transformers/main/en/model_doc/resnet).
 
64
 
 
 
65
 
66
- ```
 
 
1
  ---
2
  tags:
3
  - fastai
 
 
 
 
 
 
 
 
4
  ---
5
 
6
+ # Amazing!
7
 
8
+ 🥳 Congratulations on hosting your fastai model on the Hugging Face Hub!
9
 
10
+ # Some next steps
11
+ 1. Fill out this model card with more information (see the template below and the [documentation here](https://huggingface.co/docs/hub/model-repos))!
 
 
 
 
 
 
 
 
 
 
 
12
 
13
+ 2. Create a demo in Gradio or Streamlit using 🤗 Spaces ([documentation here](https://huggingface.co/docs/hub/spaces)).
14
 
15
+ 3. Join the fastai community on the [Fastai Discord](https://discord.com/invite/YKrxeNn)!
 
 
 
 
 
 
 
16
 
17
+ Greetings fellow fastlearner 🤝! Don't forget to delete this content from your model card.
 
 
 
18
 
 
 
19
 
20
+ ---
 
 
 
21
 
 
 
22
 
23
+ # Model card
 
 
 
24
 
25
+ ## Model description
26
+ More information needed
27
 
28
+ ## Intended uses & limitations
29
+ More information needed
30
 
31
+ ## Training and evaluation data
32
+ More information needed
model.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3b0b49d47e913a7869ed25d351228888cd49a3285ea2235951c6da949f822fe0
3
- size 47289049
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c6c5e69b0d07b42ade288a3811a230f1c563e139aa7547f57d7241bed68a34b0
3
+ size 47334545
pyproject.toml CHANGED
@@ -1,3 +1,3 @@
1
  [build-system]
2
- requires = ["setuptools>=40.8.0", "wheel", "python=3.11.0", "fastai=2.7.12", "fastcore=1.5.29"]
3
  build-backend = "setuptools.build_meta:__legacy__"
 
1
  [build-system]
2
+ requires = ["setuptools>=40.8.0", "wheel", "python=3.10.9", "fastai=2.7.12", "fastcore=1.5.29"]
3
  build-backend = "setuptools.build_meta:__legacy__"