No project description provided
Project description
ONNX-PREDICT-YOLOV8
This repository is a light weight library to ease the use of ONNX models exported by the Ultralytics YOLOv8 framework.
Example Usage
from onnxruntime import InferenceSession
from PIL import Image
from opyv8 import Predictor
model = Path("path/to/file.onnx")
# List of classes where the index match the class id in the ONNX network
classes = model.parent.joinpath("classes.names").read_text().split("\n")
session = InferenceSession(
model.as_posix(),
providers=[
"CUDAExecutionProvider",
"CPUExecutionProvider",
],
)
predictor = Predictor(session, classes)
img = Image.open("path/to/image.jpg")
print(predictor.predict(img))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file onnx-predict-yolov8-1.0.6.tar.gz.
File metadata
- Download URL: onnx-predict-yolov8-1.0.6.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.7.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04f06b5c191e18f3091e9f0251436eb97f8250c67ad88c76f9c838792c1acf27
|
|
| MD5 |
a9042c6baec26d34e0ccceca4c835c8d
|
|
| BLAKE2b-256 |
4ecc0c88095ab89d7e2cd8f490045ae4ba021dbe54869612dc550c6916a96a36
|
File details
Details for the file onnx_predict_yolov8-1.0.6-py3-none-any.whl.
File metadata
- Download URL: onnx_predict_yolov8-1.0.6-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.7.2 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0de24a7f84fdd4cef6a79549ad87ad001f9a69962dd8553e89b31e393cc9c91
|
|
| MD5 |
500ff88aecc7a0068e94e178780f46f8
|
|
| BLAKE2b-256 |
3a224698f38bac087ad68c0a6feed9460d868c6c9ecf663dce85c16456b08eee
|