Commit
·
568c26d
1
Parent(s):
834765a
add ultralytics model card
Browse files
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.20
|
| 14 |
+
inference: false
|
| 15 |
+
|
| 16 |
+
datasets:
|
| 17 |
+
- keremberke/indoor-scene-classification
|
| 18 |
+
|
| 19 |
+
model-index:
|
| 20 |
+
- name: keremberke/yolov8s-scene-classification
|
| 21 |
+
results:
|
| 22 |
+
- task:
|
| 23 |
+
type: image-classification
|
| 24 |
+
|
| 25 |
+
dataset:
|
| 26 |
+
type: keremberke/indoor-scene-classification
|
| 27 |
+
name: indoor-scene-classification
|
| 28 |
+
split: validation
|
| 29 |
+
|
| 30 |
+
metrics:
|
| 31 |
+
- type: accuracy
|
| 32 |
+
value: 0.02375 # min: 0.0 - max: 1.0
|
| 33 |
+
name: top1 accuracy
|
| 34 |
+
- type: accuracy
|
| 35 |
+
value: 0.08986 # min: 0.0 - max: 1.0
|
| 36 |
+
name: top5 accuracy
|
| 37 |
+
---
|
| 38 |
+
|
| 39 |
+
<div align="center">
|
| 40 |
+
<img width="640" alt="keremberke/yolov8s-scene-classification" src="https://huggingface.co/keremberke/yolov8s-scene-classification/resolve/main/thumbnail.jpg">
|
| 41 |
+
</div>
|
| 42 |
+
|
| 43 |
+
### Supported Labels
|
| 44 |
+
|
| 45 |
+
```
|
| 46 |
+
['airport_inside', 'artstudio', 'auditorium', 'bakery', 'bookstore', 'bowling', 'buffet', 'casino', 'children_room', 'church_inside', 'classroom', 'cloister', 'closet', 'clothingstore', 'computerroom', 'concert_hall', 'corridor', 'deli', 'dentaloffice', 'dining_room', 'elevator', 'fastfood_restaurant', 'florist', 'gameroom', 'garage', 'greenhouse', 'grocerystore', 'gym', 'hairsalon', 'hospitalroom', 'inside_bus', 'inside_subway', 'jewelleryshop', 'kindergarden', 'kitchen', 'laboratorywet', 'laundromat', 'library', 'livingroom', 'lobby', 'locker_room', 'mall', 'meeting_room', 'movietheater', 'museum', 'nursery', 'office', 'operating_room', 'pantry', 'poolinside', 'prisoncell', 'restaurant', 'restaurant_kitchen', 'shoeshop', 'stairscase', 'studiomusic', 'subway', 'toystore', 'trainstation', 'tv_studio', 'videostore', 'waitingroom', 'warehouse', 'winecellar']
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
### How to use
|
| 50 |
+
|
| 51 |
+
- Install [ultralyticsplus](https://github.com/fcakyon/ultralyticsplus):
|
| 52 |
+
|
| 53 |
+
```bash
|
| 54 |
+
pip install ultralyticsplus==0.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/yolov8s-scene-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 |
+
|