mrhacker7599
commited on
Commit
•
95b52d1
1
Parent(s):
767f98e
Upload 5 files
Browse files- README.md +88 -3
- best.pt +3 -0
- config.json +1 -0
- events.out.tfevents.1672540597.ovyeman.11600.0 +3 -0
- sample_visuals.jpg +0 -0
README.md
CHANGED
@@ -1,3 +1,88 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
tags:
|
4 |
+
- yolov5
|
5 |
+
- yolo
|
6 |
+
- vision
|
7 |
+
- object-detection
|
8 |
+
- pytorch
|
9 |
+
library_name: yolov5
|
10 |
+
library_version: 7.0.6
|
11 |
+
inference: false
|
12 |
+
|
13 |
+
datasets:
|
14 |
+
- keremberke/license-plate-object-detection
|
15 |
+
|
16 |
+
model-index:
|
17 |
+
- name: keremberke/yolov5n-license-plate
|
18 |
+
results:
|
19 |
+
- task:
|
20 |
+
type: object-detection
|
21 |
+
|
22 |
+
dataset:
|
23 |
+
type: keremberke/license-plate-object-detection
|
24 |
+
name: keremberke/license-plate-object-detection
|
25 |
+
split: validation
|
26 |
+
|
27 |
+
metrics:
|
28 |
+
- type: precision # since mAP@0.5 is not available on hf.co/metrics
|
29 |
+
value: 0.9783431294995892 # min: 0.0 - max: 1.0
|
30 |
+
name: mAP@0.5
|
31 |
+
---
|
32 |
+
|
33 |
+
<div align="center">
|
34 |
+
<img width="640" alt="keremberke/yolov5n-license-plate" src="https://huggingface.co/keremberke/yolov5n-license-plate/resolve/main/sample_visuals.jpg">
|
35 |
+
</div>
|
36 |
+
|
37 |
+
### How to use
|
38 |
+
|
39 |
+
- Install [yolov5](https://github.com/fcakyon/yolov5-pip):
|
40 |
+
|
41 |
+
```bash
|
42 |
+
pip install -U yolov5
|
43 |
+
```
|
44 |
+
|
45 |
+
- Load model and perform prediction:
|
46 |
+
|
47 |
+
```python
|
48 |
+
import yolov5
|
49 |
+
|
50 |
+
# load model
|
51 |
+
model = yolov5.load('keremberke/yolov5n-license-plate')
|
52 |
+
|
53 |
+
# set model parameters
|
54 |
+
model.conf = 0.25 # NMS confidence threshold
|
55 |
+
model.iou = 0.45 # NMS IoU threshold
|
56 |
+
model.agnostic = False # NMS class-agnostic
|
57 |
+
model.multi_label = False # NMS multiple labels per box
|
58 |
+
model.max_det = 1000 # maximum number of detections per image
|
59 |
+
|
60 |
+
# set image
|
61 |
+
img = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
|
62 |
+
|
63 |
+
# perform inference
|
64 |
+
results = model(img, size=640)
|
65 |
+
|
66 |
+
# inference with test time augmentation
|
67 |
+
results = model(img, augment=True)
|
68 |
+
|
69 |
+
# parse results
|
70 |
+
predictions = results.pred[0]
|
71 |
+
boxes = predictions[:, :4] # x1, y1, x2, y2
|
72 |
+
scores = predictions[:, 4]
|
73 |
+
categories = predictions[:, 5]
|
74 |
+
|
75 |
+
# show detection bounding boxes on image
|
76 |
+
results.show()
|
77 |
+
|
78 |
+
# save results into "results/" folder
|
79 |
+
results.save(save_dir='results/')
|
80 |
+
```
|
81 |
+
|
82 |
+
- Finetune the model on your custom dataset:
|
83 |
+
|
84 |
+
```bash
|
85 |
+
yolov5 train --data data.yaml --img 640 --batch 16 --weights keremberke/yolov5n-license-plate --epochs 10
|
86 |
+
```
|
87 |
+
|
88 |
+
**More models available at: [awesome-yolov5-models](https://github.com/keremberke/awesome-yolov5-models)**
|
best.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d0e43f44b7354b2bc7de11ee8a3719fbb2de5bacd987f46e44a95380d6284240
|
3 |
+
size 132
|
config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"input_size": 640, "task": "object-detection", "best_ap50": 0.9783431294995892}
|
events.out.tfevents.1672540597.ovyeman.11600.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:15af1e3c6663816b62cfbbe598b6eae84d31ff10b0c5a83971db9f460ff14cfb
|
3 |
+
size 131
|
sample_visuals.jpg
ADDED