Skip to main content

Run YOLOv10 model with ONNX Runtime

Project description

ONNX YOLOv10 Object Detection

Python scripts performing object detection using the YOLOv10 model in ONNX.

!ONNX YOLOv10 Object Detection

[!CAUTION] I skipped adding the pad to the input image when resizing, which might affect the accuracy of the model if the input image has a different aspect ratio compared to the input size of the model. Always try to get an input size with a ratio close to the input images you will use.

Requirements

  • Check the requirements.txt file.
  • For ONNX, if you have a NVIDIA GPU, then install the onnxruntime-gpu, otherwise use the onnxruntime library.

Installation PyPI

pip install yolov10-onnx

Or, clone this repository:

git clone https://github.com/ibaiGorordo/ONNX-YOLOv10-Object-Detection.git
cd ONNX-YOLOv10-Object-Detection
pip install -r requirements.txt

ONNX Runtime

For Nvidia GPU computers: pip install onnxruntime-gpu

Otherwise: pip install onnxruntime

ONNX model

  • If the model file is not found in the models directory, it will be downloaded automatically from the Official Repo.
  • Available models: yolov10n.onnx, yolov10s.onnx, yolov10m.onnx, yolov10b.onnx, yolov10l.onnx, yolov10x.onnx

Original YOLOv10 model

The original YOLOv10 model can be found in this repository: https://github.com/THU-MIG/yolov10

Examples

  • Image inference:
python image_object_detection.py
  • Webcam inference:
python webcam_object_detection.py
python video_object_detection.py

!yolov10_object_detection

References:

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

yolov10_onnx-0.3.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

yolov10_onnx-0.3.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file yolov10_onnx-0.3.0.tar.gz.

File metadata

  • Download URL: yolov10_onnx-0.3.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.8

File hashes

Hashes for yolov10_onnx-0.3.0.tar.gz
Algorithm Hash digest
SHA256 28bdba98494f9eb61016a3c0f98581acc5a014688a4174b3be49b76e535bd927
MD5 1168f46f001ffb9f34d75bb0adcd450c
BLAKE2b-256 c22854f2d965dc98da37000767c0e25ddbe186c14d5a940b2738717fc6d01e2b

See more details on using hashes here.

File details

Details for the file yolov10_onnx-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for yolov10_onnx-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cac319c39f9357fe40b54b5bc1f4b33b346804b47b27de26dc89e568576ad8d
MD5 5f1f84428da481dfaa14ce014a010a4b
BLAKE2b-256 927d79f40cb97111bb17855511ee4642e1c2879832d6b5f34c4db1a36730d1f9

See more details on using hashes here.

Supported by

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