mike-silva-fairportrobotics commited on
Commit
a6244b8
·
verified ·
1 Parent(s): af19b08

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +43 -0
README.md CHANGED
@@ -1,5 +1,11 @@
1
  ---
2
  license: gpl
 
 
 
 
 
 
3
  ---
4
  # Rock Paper Scissors Object Detection Model
5
 
@@ -21,3 +27,40 @@ The model trained on 100 images found online. No augmentation of the images wer
21
  | rock | 69 | 84 | 0.875 | 0.835 | 0.924 | 0.728 |
22
  | paper | 56 | 65 | 0.899 | 0.815 | 0.909 | 0.721 |
23
  | scissors | 88 | 111 | 0.976 | 0.736 | 0.943 | 0.755 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: gpl
3
+ pipeline_tag: object-detection
4
+ tags:
5
+ - ultralytics
6
+ - yolo
7
+ - yolov10
8
+ - object-detection
9
  ---
10
  # Rock Paper Scissors Object Detection Model
11
 
 
27
  | rock | 69 | 84 | 0.875 | 0.835 | 0.924 | 0.728 |
28
  | paper | 56 | 65 | 0.899 | 0.815 | 0.909 | 0.721 |
29
  | scissors | 88 | 111 | 0.976 | 0.736 | 0.943 | 0.755 |
30
+
31
+ ## How to Use
32
+
33
+ ```
34
+ pip install ultralytics
35
+ pip install huggingface_hub
36
+ ```
37
+
38
+ ```
39
+ from ultralytics import YOLO
40
+ from huggingface_hub import hf_hub_download
41
+ from matplotlib import pyplot as plt
42
+
43
+ # Load the weights from our repository
44
+ model_path = hf_hub_download(
45
+ local_dir=".",
46
+ repo_id="fairportrobotics/rock-paper-scissors",
47
+ filename="model.pt"
48
+ )
49
+ model = YOLO(model_path)
50
+
51
+ # Load a test image
52
+ sample_path = hf_hub_download(
53
+ local_dir=".",
54
+ repo_id="fairportrobotics/rock-paper-scissors",
55
+ filename="sample.jpg"
56
+ )
57
+
58
+ # Do the predictions
59
+ res = model.predict(source=sample_path, project='.',name='detected', exist_ok=True, save=True, show=False, show_labels=True, show_conf=True, conf=0.5, )
60
+
61
+ plt.figure(figsize=(15,10))
62
+ plt.imshow(plt.imread('detected/sample.jpg'))
63
+ plt.show()
64
+ ```
65
+
66
+ As you can see the model isn't perfect ;)