HuggingFace utilities for Ultralytics/YOLOv8.
Project description
ultralytics+
Extra features for ultralytics/ultralytics.
installation
pip install ultralyticsplus
push to 🤗 hub
ultralyticsplus --exp_dir runs/detect/train --hf_model_id HF_USERNAME/MODELNAME
load from 🤗 hub
from ultralyticsplus import YOLO, render_predictions
# 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
img = 'https://github.com/ultralytics/yolov5/raw/master/data/images/zidane.jpg'
# perform inference
for result in model.predict(img, imgsz=640, return_outputs=True):
print(result["det"]) # [[x1, y1, x2, y2, conf, class]]
render = render_predictions(model, img=img, det=result["det"])
render.show()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ultralyticsplus-0.0.4.tar.gz
(7.2 kB
view details)
Built Distribution
File details
Details for the file ultralyticsplus-0.0.4.tar.gz
.
File metadata
- Download URL: ultralyticsplus-0.0.4.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac3ffedb278b6b5be121fbf9b6a439dd6d0904437768113cbcdd3639fd678bda |
|
MD5 | 65f218661e507fc5b3b3cfe688208e78 |
|
BLAKE2b-256 | 53df3328bf8e2f491a816fe20356836f27c70b13764fed0de477adce7ce8ea62 |
Provenance
File details
Details for the file ultralyticsplus-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: ultralyticsplus-0.0.4-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63295fbe9f4004de9930280c6570e1e3b4cff99d08aa214c768f886026a4d66d |
|
MD5 | 23aba31543d0f36078e40b4ae19ced12 |
|
BLAKE2b-256 | 65c621b230f3f49bc21755daf0263244860533560e9153ef8a71458f23ec0be5 |