lucasaltmann commited on
Commit
398d305
·
verified ·
1 Parent(s): b1bcef8

add ultralytics model card

Browse files
Files changed (1) hide show
  1. README.md +60 -0
README.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ inference: false
4
+
5
+ model-index:
6
+ - name: lucasaltmann/products14
7
+ results:
8
+ - task:
9
+ type: object-detection
10
+
11
+ metrics:
12
+ - type: precision # since [email protected] is not available on hf.co/metrics
13
+ value: 0.9751 # min: 0.0 - max: 1.0
14
+ name: [email protected](box)
15
+ ---
16
+
17
+ <div align="center">
18
+ <img width="640" alt="lucasaltmann/products14" src="https://huggingface.co/lucasaltmann/products14/resolve/main/thumbnail.jpg">
19
+ </div>
20
+
21
+ ### Supported Labels
22
+
23
+ ```
24
+ ['Product']
25
+ ```
26
+
27
+ ### How to use
28
+
29
+ - Install [ultralyticsplus](https://github.com/fcakyon/ultralyticsplus):
30
+
31
+ ```bash
32
+ pip install ultralyticsplus==0.0.29 ultralytics==8.0.239
33
+ ```
34
+
35
+ - Load model and perform prediction:
36
+
37
+ ```python
38
+ from ultralyticsplus import YOLO, render_result
39
+
40
+ # load model
41
+ model = YOLO('lucasaltmann/products14')
42
+
43
+ # set model parameters
44
+ model.overrides['conf'] = 0.25 # NMS confidence threshold
45
+ model.overrides['iou'] = 0.45 # NMS IoU threshold
46
+ model.overrides['agnostic_nms'] = False # NMS class-agnostic
47
+ model.overrides['max_det'] = 1000 # maximum number of detections per image
48
+
49
+ # set image
50
+ image = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
51
+
52
+ # perform inference
53
+ results = model.predict(image)
54
+
55
+ # observe results
56
+ print(results[0].boxes)
57
+ render = render_result(model=model, image=image, result=results[0])
58
+ render.show()
59
+ ```
60
+