Owesh12 commited on
Commit
8c686da
1 Parent(s): dcffff3

Upload 5 files

Browse files
README.md ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/yolov5m-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.9882982754936463 # min: 0.0 - max: 1.0
30
+ name: mAP@0.5
31
+ ---
32
+
33
+ <div align="center">
34
+ <img width="640" alt="keremberke/yolov5m-license-plate" src="https://huggingface.co/keremberke/yolov5m-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/yolov5m-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/yolov5m-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:85ad3c9fd28b57a24b0cb85b9017e8c6d2b523c09790ce5ac6f0afcad0471863
3
+ size 42146601
config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"input_size": 640, "task": "object-detection", "best_ap50": 0.9882982754936463}
events.out.tfevents.1672545467.ovyeman.14000.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50c2e3c3c792af3de1ec5f908c1edd5b16ab934a0084d283d2e2f4b7e829f2a1
3
+ size 415629
sample_visuals.jpg ADDED