keremberke commited on
Commit
2879e0d
1 Parent(s): efa6da3

add ultralytics model card

Browse files
Files changed (1) hide show
  1. README.md +83 -0
README.md ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ tags:
4
+ - ultralyticsplus
5
+ - yolov8
6
+ - ultralytics
7
+ - yolo
8
+ - vision
9
+ - image-segmentation
10
+ - pytorch
11
+ - awesome-yolov8-models
12
+ library_name: ultralytics
13
+ library_version: 8.0.21
14
+ inference: false
15
+
16
+ datasets:
17
+ - keremberke/pcb-defect-segmentation
18
+
19
+ model-index:
20
+ - name: keremberke/yolov8n-pcb-defect-segmentation
21
+ results:
22
+ - task:
23
+ type: image-segmentation
24
+
25
+ dataset:
26
+ type: keremberke/pcb-defect-segmentation
27
+ name: pcb-defect-segmentation
28
+ split: validation
29
+
30
+ metrics:
31
+ - type: precision # since mAP@0.5 is not available on hf.co/metrics
32
+ value: 0.51186 # min: 0.0 - max: 1.0
33
+ name: mAP@0.5(box)
34
+ - type: precision # since mAP@0.5 is not available on hf.co/metrics
35
+ value: 0.51667 # min: 0.0 - max: 1.0
36
+ name: mAP@0.5(mask)
37
+ ---
38
+
39
+ <div align="center">
40
+ <img width="640" alt="keremberke/yolov8n-pcb-defect-segmentation" src="https://huggingface.co/keremberke/yolov8n-pcb-defect-segmentation/resolve/main/thumbnail.jpg">
41
+ </div>
42
+
43
+ ### Supported Labels
44
+
45
+ ```
46
+ ['Dry_joint', 'Incorrect_installation', 'PCB_damage', 'Short_circuit']
47
+ ```
48
+
49
+ ### How to use
50
+
51
+ - Install [ultralyticsplus](https://github.com/fcakyon/ultralyticsplus):
52
+
53
+ ```bash
54
+ pip install ultralyticsplus==0.0.23 ultralytics==8.0.21
55
+ ```
56
+
57
+ - Load model and perform prediction:
58
+
59
+ ```python
60
+ from ultralyticsplus import YOLO, render_result
61
+
62
+ # load model
63
+ model = YOLO('keremberke/yolov8n-pcb-defect-segmentation')
64
+
65
+ # set model parameters
66
+ model.overrides['conf'] = 0.25 # NMS confidence threshold
67
+ model.overrides['iou'] = 0.45 # NMS IoU threshold
68
+ model.overrides['agnostic_nms'] = False # NMS class-agnostic
69
+ model.overrides['max_det'] = 1000 # maximum number of detections per image
70
+
71
+ # set image
72
+ image = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
73
+
74
+ # perform inference
75
+ results = model.predict(image)
76
+
77
+ # observe results
78
+ print(results[0].boxes)
79
+ print(results[0].masks)
80
+ render = render_result(model=model, image=image, result=results[0])
81
+ render.show()
82
+ ```
83
+