keremberke
commited on
Commit
•
e4154e1
1
Parent(s):
d2bb12a
add ultralytics model card
Browse files
README.md
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
tags:
|
4 |
+
- ultralyticsplus
|
5 |
+
- yolov8
|
6 |
+
- ultralytics
|
7 |
+
- yolo
|
8 |
+
- vision
|
9 |
+
- object-detection
|
10 |
+
- pytorch
|
11 |
+
library_name: ultralytics
|
12 |
+
library_version: 8.0.6
|
13 |
+
inference: false
|
14 |
+
|
15 |
+
datasets:
|
16 |
+
- keremberke/forklift-object-detection
|
17 |
+
|
18 |
+
model-index:
|
19 |
+
- name: keremberke/yolov8n-forklift-detection
|
20 |
+
results:
|
21 |
+
- task:
|
22 |
+
type: object-detection
|
23 |
+
|
24 |
+
dataset:
|
25 |
+
type: keremberke/forklift-object-detection
|
26 |
+
name: forklift-object-detection
|
27 |
+
split: validation
|
28 |
+
|
29 |
+
metrics:
|
30 |
+
- type: precision # since mAP@0.5 is not available on hf.co/metrics
|
31 |
+
value: 0.57081 # min: 0.0 - max: 1.0
|
32 |
+
name: mAP@0.5(box)
|
33 |
+
---
|
34 |
+
|
35 |
+
<div align="center">
|
36 |
+
<img width="640" alt="keremberke/yolov8n-forklift-detection" src="https://huggingface.co/keremberke/yolov8n-forklift-detection/resolve/main/thumbnail.jpg">
|
37 |
+
</div>
|
38 |
+
|
39 |
+
### Supported Labels
|
40 |
+
|
41 |
+
```
|
42 |
+
['forklift', 'person']
|
43 |
+
```
|
44 |
+
|
45 |
+
### How to use
|
46 |
+
|
47 |
+
- Install [ultralytics](https://github.com/ultralytics/ultralytics) and [ultralyticsplus](https://github.com/fcakyon/ultralyticsplus):
|
48 |
+
|
49 |
+
```bash
|
50 |
+
pip install -U ultralytics ultralyticsplus
|
51 |
+
```
|
52 |
+
|
53 |
+
- Load model and perform prediction:
|
54 |
+
|
55 |
+
```python
|
56 |
+
from ultralyticsplus import YOLO, render_model_output
|
57 |
+
|
58 |
+
# load model
|
59 |
+
model = YOLO('keremberke/yolov8n-forklift-detection')
|
60 |
+
|
61 |
+
# set model parameters
|
62 |
+
model.overrides['conf'] = 0.25 # NMS confidence threshold
|
63 |
+
model.overrides['iou'] = 0.45 # NMS IoU threshold
|
64 |
+
model.overrides['agnostic_nms'] = False # NMS class-agnostic
|
65 |
+
model.overrides['max_det'] = 1000 # maximum number of detections per image
|
66 |
+
|
67 |
+
# set image
|
68 |
+
image = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
|
69 |
+
|
70 |
+
# perform inference
|
71 |
+
for result in model.predict(image, return_outputs=True):
|
72 |
+
print(result["det"]) # [[x1, y1, x2, y2, conf, class]]
|
73 |
+
render = render_model_output(model=model, image=image, model_output=result)
|
74 |
+
render.show()
|
75 |
+
```
|
76 |
+
|