keremberke commited on
Commit
137b7b8
1 Parent(s): 0842328

add ultralytics model card

Browse files
Files changed (1) hide show
  1. README.md +12 -9
README.md CHANGED
@@ -8,8 +8,9 @@ tags:
8
  - vision
9
  - object-detection
10
  - pytorch
 
11
  library_name: ultralytics
12
- library_version: 8.0.6
13
  inference: false
14
 
15
  datasets:
@@ -28,7 +29,7 @@ model-index:
28
 
29
  metrics:
30
  - type: precision # since mAP@0.5 is not available on hf.co/metrics
31
- value: 0.57081 # min: 0.0 - max: 1.0
32
  name: mAP@0.5(box)
33
  ---
34
 
@@ -44,16 +45,16 @@ model-index:
44
 
45
  ### How to use
46
 
47
- - Install [ultralytics](https://github.com/ultralytics/ultralytics) and [ultralyticsplus](https://github.com/fcakyon/ultralyticsplus):
48
 
49
  ```bash
50
- pip install -U ultralytics ultralyticsplus
51
  ```
52
 
53
  - Load model and perform prediction:
54
 
55
  ```python
56
- from ultralyticsplus import YOLO, render_model_output
57
 
58
  # load model
59
  model = YOLO('keremberke/yolov8n-forklift-detection')
@@ -68,9 +69,11 @@ model.overrides['max_det'] = 1000 # maximum number of detections per image
68
  image = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
69
 
70
  # perform inference
71
- for result in model.predict(image, return_outputs=True):
72
- print(result["det"]) # [[x1, y1, x2, y2, conf, class]]
73
- render = render_model_output(model=model, image=image, model_output=result)
74
- render.show()
 
 
75
  ```
76
 
 
8
  - vision
9
  - object-detection
10
  - pytorch
11
+
12
  library_name: ultralytics
13
+ library_version: 8.0.8
14
  inference: false
15
 
16
  datasets:
 
29
 
30
  metrics:
31
  - type: precision # since mAP@0.5 is not available on hf.co/metrics
32
+ value: 0.41547 # min: 0.0 - max: 1.0
33
  name: mAP@0.5(box)
34
  ---
35
 
 
45
 
46
  ### How to use
47
 
48
+ - Install [ultralyticsplus](https://github.com/fcakyon/ultralyticsplus):
49
 
50
  ```bash
51
+ pip install -U ultralyticsplus
52
  ```
53
 
54
  - Load model and perform prediction:
55
 
56
  ```python
57
+ from ultralyticsplus import YOLO, render_result
58
 
59
  # load model
60
  model = YOLO('keremberke/yolov8n-forklift-detection')
 
69
  image = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
70
 
71
  # perform inference
72
+ results = model.predict(image)
73
+
74
+ # observe results
75
+ print(results[0].boxes)
76
+ render = render_result(model=model, image=image, result=results[0])
77
+ render.show()
78
  ```
79