keremberke commited on
Commit
dc84d06
1 Parent(s): 6322e34

add ultralytics model card

Browse files
Files changed (1) hide show
  1. README.md +79 -0
README.md ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ tags:
4
+ - ultralyticsplus
5
+ - yolov8
6
+ - ultralytics
7
+ - yolo
8
+ - vision
9
+ - image-classification
10
+ - pytorch
11
+ - awesome-yolov8-models
12
+ library_name: ultralytics
13
+ library_version: 8.0.21
14
+ inference: false
15
+
16
+ datasets:
17
+ - keremberke/chest-xray-classification
18
+
19
+ model-index:
20
+ - name: keremberke/yolov8m-chest-xray-classification
21
+ results:
22
+ - task:
23
+ type: image-classification
24
+
25
+ dataset:
26
+ type: keremberke/chest-xray-classification
27
+ name: chest-xray-classification
28
+ split: validation
29
+
30
+ metrics:
31
+ - type: accuracy
32
+ value: 0.95533 # min: 0.0 - max: 1.0
33
+ name: top1 accuracy
34
+ - type: accuracy
35
+ value: 1 # min: 0.0 - max: 1.0
36
+ name: top5 accuracy
37
+ ---
38
+
39
+ <div align="center">
40
+ <img width="640" alt="keremberke/yolov8m-chest-xray-classification" src="https://huggingface.co/keremberke/yolov8m-chest-xray-classification/resolve/main/thumbnail.jpg">
41
+ </div>
42
+
43
+ ### Supported Labels
44
+
45
+ ```
46
+ ['NORMAL', 'PNEUMONIA']
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, postprocess_classify_output
61
+
62
+ # load model
63
+ model = YOLO('keremberke/yolov8m-chest-xray-classification')
64
+
65
+ # set model parameters
66
+ model.overrides['conf'] = 0.25 # model confidence threshold
67
+
68
+ # set image
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].probs) # [0.1, 0.2, 0.3, 0.4]
76
+ processed_result = postprocess_classify_output(model, result=results[0])
77
+ print(processed_result) # {"cat": 0.4, "dog": 0.6}
78
+ ```
79
+