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.5.tar.gz
(8.2 kB
view details)
Built Distribution
File details
Details for the file ultralyticsplus-0.0.5.tar.gz
.
File metadata
- Download URL: ultralyticsplus-0.0.5.tar.gz
- Upload date:
- Size: 8.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 | 7057f257ce2b2a6df756e12b28accfc44360fdf3fd4763cceaa34ac7c78526c9 |
|
MD5 | a932637d96e22b605d9dbe4b380371c2 |
|
BLAKE2b-256 | 1668bb98654b8bf6fe2eb4b34a7a2ac9ec1b547accae9c4ed884d22860686986 |
Provenance
File details
Details for the file ultralyticsplus-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: ultralyticsplus-0.0.5-py3-none-any.whl
- Upload date:
- Size: 9.5 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 | a7b7f36e21098c4d75abb7a17d4ac3869f6f9e5c1fbf858c2d26e018e805604e |
|
MD5 | 13b43ba2f9a007e50131513119538d4f |
|
BLAKE2b-256 | 14fc81e5873d9230b0db31b8a543c0b4a46935d8334e354da7f7ff5edc18e1f2 |