Update README.md
Browse files
README.md
CHANGED
@@ -1,87 +1,21 @@
|
|
1 |
---
|
2 |
-
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
tags:
|
6 |
-
-
|
7 |
-
-
|
8 |
-
-
|
9 |
-
- object-detection
|
10 |
-
- pytorch
|
11 |
-
library_name: yolov5
|
12 |
-
library_version: 7.0.6
|
13 |
-
inference: false
|
14 |
-
|
15 |
datasets:
|
16 |
-
-
|
17 |
-
|
18 |
-
model-index:
|
19 |
-
- name: keremberke/yolov5m-license-plate
|
20 |
-
results:
|
21 |
-
- task:
|
22 |
-
type: object-detection
|
23 |
-
|
24 |
-
dataset:
|
25 |
-
type: keremberke/license-plate-object-detection
|
26 |
-
name: keremberke/license-plate-object-detection
|
27 |
-
split: validation
|
28 |
-
|
29 |
-
metrics:
|
30 |
-
- type: precision # since [email protected] is not available on hf.co/metrics
|
31 |
-
value: 0.9882982754936463 # min: 0.0 - max: 1.0
|
32 |
-
name: [email protected]
|
33 |
---
|
34 |
-
|
35 |
-
<div align="center">
|
36 |
-
<img width="640" alt="keremberke/yolov5m-license-plate" src="https://huggingface.co/keremberke/yolov5m-license-plate/resolve/main/sample_visuals.jpg">
|
37 |
-
</div>
|
38 |
-
|
39 |
-
|
40 |
-
```bash
|
41 |
-
pip install -U yolov5
|
42 |
-
```
|
43 |
-
|
44 |
-
- Load model and perform prediction:
|
45 |
-
|
46 |
-
```python
|
47 |
-
import yolov5
|
48 |
-
|
49 |
-
# load model
|
50 |
-
model = yolov5.load('keremberke/yolov5m-license-plate')
|
51 |
-
|
52 |
-
# set model parameters
|
53 |
-
model.conf = 0.25 # NMS confidence threshold
|
54 |
-
model.iou = 0.45 # NMS IoU threshold
|
55 |
-
model.agnostic = False # NMS class-agnostic
|
56 |
-
model.multi_label = False # NMS multiple labels per box
|
57 |
-
model.max_det = 1000 # maximum number of detections per image
|
58 |
-
|
59 |
-
# set image
|
60 |
-
img = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
|
61 |
-
|
62 |
-
# perform inference
|
63 |
-
results = model(img, size=640)
|
64 |
-
|
65 |
-
# inference with test time augmentation
|
66 |
-
results = model(img, augment=True)
|
67 |
-
|
68 |
-
# parse results
|
69 |
-
predictions = results.pred[0]
|
70 |
-
boxes = predictions[:, :4] # x1, y1, x2, y2
|
71 |
-
scores = predictions[:, 4]
|
72 |
-
categories = predictions[:, 5]
|
73 |
-
|
74 |
-
# show detection bounding boxes on image
|
75 |
-
results.show()
|
76 |
-
|
77 |
-
# save results into "results/" folder
|
78 |
-
results.save(save_dir='results/')
|
79 |
-
```
|
80 |
-
|
81 |
-
- Finetune the model on your custom dataset:
|
82 |
-
|
83 |
-
```bash
|
84 |
-
yolov5 train --data data.yaml --img 640 --batch 16 --weights keremberke/yolov5m-license-plate --epochs 10
|
85 |
-
```
|
86 |
-
|
87 |
-
**More models available at: [awesome-yolov5-models](https://github.com/keremberke/awesome-yolov5-models)*
|
|
|
1 |
---
|
2 |
+
description: Ultralytics best model trained on dataset.yaml
|
3 |
+
author: Ultralytics
|
4 |
+
version: 8.0.116
|
5 |
+
stride: 32
|
6 |
+
task: detect
|
7 |
+
batch: 1
|
8 |
+
imgsz:
|
9 |
+
- 640
|
10 |
+
- 640
|
11 |
+
names:
|
12 |
+
0: player
|
13 |
+
1: football
|
14 |
+
license: gpl-3.0
|
15 |
tags:
|
16 |
+
- object-detection
|
17 |
+
- computer-vision
|
18 |
+
- yolov8
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
datasets:
|
20 |
+
- detection-datasets/coco
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|