Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fcakyon/ultralyticsplus
Huggingface utilities for Ultralytics/YOLOv8
https://github.com/fcakyon/ultralyticsplus
huggingface object-detection ultralytics yolov8
Last synced: 7 days ago
JSON representation
Huggingface utilities for Ultralytics/YOLOv8
- Host: GitHub
- URL: https://github.com/fcakyon/ultralyticsplus
- Owner: fcakyon
- License: gpl-3.0
- Created: 2023-01-09T23:18:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-07T21:13:40.000Z (9 months ago)
- Last Synced: 2024-10-29T14:20:11.260Z (10 days ago)
- Topics: huggingface, object-detection, ultralytics, yolov8
- Language: Python
- Homepage: https://yolov8.xyz
- Size: 88.9 KB
- Stars: 79
- Watchers: 2
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-yolov8-models - package readme
README
# ultralytics+
Extra features for [ultralytics/ultralytics](https://github.com/ultralytics/ultralytics).
## installation
```bash
pip install ultralyticsplus
```## push to 🤗 hub
```bash
ultralyticsplus --exp_dir runs/detect/train --hf_model_id HF_USERNAME/MODELNAME
```## load from 🤗 hub
```python
from ultralyticsplus import YOLO, render_result# load model
model = YOLO('HF_USERNAME/MODELNAME')# set model parameters
model.overrides['conf'] = 0.25 # NMS confidence threshold
model.overrides['iou'] = 0.45 # NMS IoU threshold
model.overrides['agnostic_nms'] = False # NMS class-agnostic
model.overrides['max_det'] = 1000 # maximum number of detections per image# set image
image = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'# perform inference
results = model.predict(image, imgsz=640)# parse results
result = results[0]
boxes = result.boxes.xyxy # x1, y1, x2, y2
scores = result.boxes.conf
categories = result.boxes.cls
scores = result.probs # for classification models
masks = result.masks # for segmentation models# show results on image
render = render_result(model=model, image=image, result=result)
render.show()
```