Initial commit for yolov10s
Browse files- README.md +78 -0
- yolov10s.pt +3 -0
README.md
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
license: agpl-3.0
|
4 |
+
tags:
|
5 |
+
- object-detection
|
6 |
+
- computer-vision
|
7 |
+
- yolov10
|
8 |
+
- pypi
|
9 |
+
datasets:
|
10 |
+
- detection-datasets/coco
|
11 |
+
---
|
12 |
+
|
13 |
+
### Model Description
|
14 |
+
[YOLOv10: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors](https://arxiv.org/abs/2405.14458v1)
|
15 |
+
|
16 |
+
[Paper Repo: Implementation of paper - YOLOv10](https://github.com/THU-MIG/yolov10)
|
17 |
+
|
18 |
+
### Installation
|
19 |
+
```
|
20 |
+
pip install supervision git+https://github.com/THU-MIG/yolov10.git
|
21 |
+
```
|
22 |
+
|
23 |
+
### Yolov10 Inference
|
24 |
+
```python
|
25 |
+
from ultralytics import YOLOv10
|
26 |
+
import supervision as sv
|
27 |
+
import cv2
|
28 |
+
|
29 |
+
MODEL_PATH = 'yolov10n.pt'
|
30 |
+
IMAGE_PATH = 'dog.jpeg'
|
31 |
+
|
32 |
+
model = YOLOv10(MODEL_PATH)
|
33 |
+
image = cv2.imread(IMAGE_PATH)
|
34 |
+
results = model(source=image, conf=0.25, verbose=False)[0]
|
35 |
+
detections = sv.Detections.from_ultralytics(results)
|
36 |
+
box_annotator = sv.BoxAnnotator()
|
37 |
+
|
38 |
+
category_dict = {
|
39 |
+
0: 'person', 1: 'bicycle', 2: 'car', 3: 'motorcycle', 4: 'airplane', 5: 'bus',
|
40 |
+
6: 'train', 7: 'truck', 8: 'boat', 9: 'traffic light', 10: 'fire hydrant',
|
41 |
+
11: 'stop sign', 12: 'parking meter', 13: 'bench', 14: 'bird', 15: 'cat',
|
42 |
+
16: 'dog', 17: 'horse', 18: 'sheep', 19: 'cow', 20: 'elephant', 21: 'bear',
|
43 |
+
22: 'zebra', 23: 'giraffe', 24: 'backpack', 25: 'umbrella', 26: 'handbag',
|
44 |
+
27: 'tie', 28: 'suitcase', 29: 'frisbee', 30: 'skis', 31: 'snowboard',
|
45 |
+
32: 'sports ball', 33: 'kite', 34: 'baseball bat', 35: 'baseball glove',
|
46 |
+
36: 'skateboard', 37: 'surfboard', 38: 'tennis racket', 39: 'bottle',
|
47 |
+
40: 'wine glass', 41: 'cup', 42: 'fork', 43: 'knife', 44: 'spoon', 45: 'bowl',
|
48 |
+
46: 'banana', 47: 'apple', 48: 'sandwich', 49: 'orange', 50: 'broccoli',
|
49 |
+
51: 'carrot', 52: 'hot dog', 53: 'pizza', 54: 'donut', 55: 'cake',
|
50 |
+
56: 'chair', 57: 'couch', 58: 'potted plant', 59: 'bed', 60: 'dining table',
|
51 |
+
61: 'toilet', 62: 'tv', 63: 'laptop', 64: 'mouse', 65: 'remote', 66: 'keyboard',
|
52 |
+
67: 'cell phone', 68: 'microwave', 69: 'oven', 70: 'toaster', 71: 'sink',
|
53 |
+
72: 'refrigerator', 73: 'book', 74: 'clock', 75: 'vase', 76: 'scissors',
|
54 |
+
77: 'teddy bear', 78: 'hair drier', 79: 'toothbrush'
|
55 |
+
}
|
56 |
+
|
57 |
+
labels = [
|
58 |
+
f"{category_dict[class_id]} {confidence:.2f}"
|
59 |
+
for class_id, confidence in zip(detections.class_id, detections.confidence)
|
60 |
+
]
|
61 |
+
annotated_image = box_annotator.annotate(
|
62 |
+
image.copy(), detections=detections, labels=labels
|
63 |
+
)
|
64 |
+
|
65 |
+
cv2.imwrite('annotated_dog.jpeg', annotated_image)
|
66 |
+
```
|
67 |
+
|
68 |
+
### BibTeX Entry and Citation Info
|
69 |
+
```
|
70 |
+
@misc{wang2024yolov10,
|
71 |
+
title={YOLOv10: Real-Time End-to-End Object Detection},
|
72 |
+
author={Ao Wang and Hui Chen and Lihao Liu and Kai Chen and Zijia Lin and Jungong Han and Guiguang Ding},
|
73 |
+
year={2024},
|
74 |
+
eprint={2405.14458},
|
75 |
+
archivePrefix={arXiv},
|
76 |
+
primaryClass={cs.CV}
|
77 |
+
}
|
78 |
+
```
|
yolov10s.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:96af3fc7c7169abcc4867f3e3088b761bb33cf801283c2ec05f9703d63a0ba77
|
3 |
+
size 32956759
|