Skip to main content

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

onnx-predict-yolov8-1.0.6.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

onnx_predict_yolov8-1.0.6-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

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

Hashes for onnx-predict-yolov8-1.0.6.tar.gz
Algorithm Hash digest
SHA256 04f06b5c191e18f3091e9f0251436eb97f8250c67ad88c76f9c838792c1acf27
MD5 a9042c6baec26d34e0ccceca4c835c8d
BLAKE2b-256 4ecc0c88095ab89d7e2cd8f490045ae4ba021dbe54869612dc550c6916a96a36

See more details on using hashes here.

File details

Details for the file onnx_predict_yolov8-1.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for onnx_predict_yolov8-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a0de24a7f84fdd4cef6a79549ad87ad001f9a69962dd8553e89b31e393cc9c91
MD5 500ff88aecc7a0068e94e178780f46f8
BLAKE2b-256 3a224698f38bac087ad68c0a6feed9460d868c6c9ecf663dce85c16456b08eee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page