smaciu commited on
Commit
fd85c4d
·
1 Parent(s): c79bd4f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -5
README.md CHANGED
@@ -5,9 +5,9 @@ tags:
5
 
6
  # ResNet
7
 
8
- ResNet model trained on imagenet-1k. It was introduced in the paper [Deep Residual Learning for Image Recognition](https://arxiv.org/abs/1512.03385) and first released in [this repository](https://github.com/KaimingHe/deep-residual-networks).
 
9
 
10
- 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.
11
 
12
  ## Model description
13
 
@@ -23,19 +23,18 @@ fine-tuned versions on a task that interests you.
23
 
24
  ```python
25
 
26
- from huggingface_hub import from_pretrained_fastai
27
  from fastai.vision.all import *
 
28
  def label_func(f): return f.name[:2]
29
 
30
-
31
  learn = from_pretrained_fastai("smaciu/bee-wings-classifier")
32
 
33
-
34
  def predict_image(image_path):
35
  img = PILImage.create(image_path)
36
  bee,_,probs = learn.predict(img)
37
  return bee, max(probs)
38
 
 
39
  cat, prob = predict_image('path_to_image')
40
  print(f"Honey bee from: {cat}. {100*prob.item():.2f}%")
41
 
 
5
 
6
  # ResNet
7
 
8
+ Fastai ResNet18 model trained on Collection of wing images for conservation of honey bees (Apis mellifera) biodiversity in Europe https://zenodo.org/record/7244070
9
+
10
 
 
11
 
12
  ## Model description
13
 
 
23
 
24
  ```python
25
 
 
26
  from fastai.vision.all import *
27
+ from huggingface_hub import from_pretrained_fastai
28
  def label_func(f): return f.name[:2]
29
 
 
30
  learn = from_pretrained_fastai("smaciu/bee-wings-classifier")
31
 
 
32
  def predict_image(image_path):
33
  img = PILImage.create(image_path)
34
  bee,_,probs = learn.predict(img)
35
  return bee, max(probs)
36
 
37
+ # modify the 'path_to_image' with your own path
38
  cat, prob = predict_image('path_to_image')
39
  print(f"Honey bee from: {cat}. {100*prob.item():.2f}%")
40