Python scripts performing object detection using the YOLOv8 model in ONNX.
Original image: https://www.flickr.com/photos/nicolelee/19041780
git clone https://github.com/ibaiGorordo/ONNX-YOLOv8-Object-Detection.git
cd ONNX-YOLOv8-Object-Detection
pip install -r requirements.txt
For Nvidia GPU computers:
pip install onnxruntime-gpu
Otherwise:
pip install onnxruntime
Use the Google Colab notebook to convert the model:
You can convert the model using the following code after installing ultralitics (pip install ultralytics
):
from ultralytics import YOLO
model = YOLO("yolov8m.pt")
model.export(format="onnx", imgsz=[480,640])
The original YOLOv8 model can be found in this repository: YOLOv8 Repository
python image_object_detection.py
python webcam_object_detection.py
python video_object_detection.py
Original video: https://youtu.be/Snyg0RqpVxY