feliperafael
commited on
Commit
•
d15b2dd
1
Parent(s):
44ed144
add ultralytics model card
Browse files
README.md
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
tags:
|
4 |
+
- ultralyticsplus
|
5 |
+
- yolov8
|
6 |
+
- ultralytics
|
7 |
+
- yolo
|
8 |
+
- vision
|
9 |
+
- image-classification
|
10 |
+
- pytorch
|
11 |
+
|
12 |
+
library_name: ultralytics
|
13 |
+
library_version: 8.0.239
|
14 |
+
inference: false
|
15 |
+
|
16 |
+
model-index:
|
17 |
+
- name: feliperafael/amy_yolo_model_pantene
|
18 |
+
results:
|
19 |
+
- task:
|
20 |
+
type: image-classification
|
21 |
+
|
22 |
+
metrics:
|
23 |
+
- type: accuracy
|
24 |
+
value: 1 # min: 0.0 - max: 1.0
|
25 |
+
name: top1 accuracy
|
26 |
+
- type: accuracy
|
27 |
+
value: 1 # min: 0.0 - max: 1.0
|
28 |
+
name: top5 accuracy
|
29 |
+
---
|
30 |
+
|
31 |
+
<div align="center">
|
32 |
+
<img width="640" alt="feliperafael/amy_yolo_model_pantene" src="https://huggingface.co/feliperafael/amy_yolo_model_pantene/resolve/main/thumbnail.jpg">
|
33 |
+
</div>
|
34 |
+
|
35 |
+
### Supported Labels
|
36 |
+
|
37 |
+
```
|
38 |
+
['pantene']
|
39 |
+
```
|
40 |
+
|
41 |
+
### How to use
|
42 |
+
|
43 |
+
- Install [ultralyticsplus](https://github.com/fcakyon/ultralyticsplus):
|
44 |
+
|
45 |
+
```bash
|
46 |
+
pip install ultralyticsplus==0.0.29 ultralytics==8.0.239
|
47 |
+
```
|
48 |
+
|
49 |
+
- Load model and perform prediction:
|
50 |
+
|
51 |
+
```python
|
52 |
+
from ultralyticsplus import YOLO, postprocess_classify_output
|
53 |
+
|
54 |
+
# load model
|
55 |
+
model = YOLO('feliperafael/amy_yolo_model_pantene')
|
56 |
+
|
57 |
+
# set model parameters
|
58 |
+
model.overrides['conf'] = 0.25 # model confidence threshold
|
59 |
+
|
60 |
+
# set image
|
61 |
+
image = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
|
62 |
+
|
63 |
+
# perform inference
|
64 |
+
results = model.predict(image)
|
65 |
+
|
66 |
+
# observe results
|
67 |
+
print(results[0].probs) # [0.1, 0.2, 0.3, 0.4]
|
68 |
+
processed_result = postprocess_classify_output(model, result=results[0])
|
69 |
+
print(processed_result) # {"cat": 0.4, "dog": 0.6}
|
70 |
+
```
|
71 |
+
|