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