项目
在 GitHub 查看
ibaiGorordo/ONNX-YOLOv8-Object-Detection
关于
使用 ONNX 格式的 YOLOv8 模型进行目标检测的 Python 脚本。
人工智能与机器学习实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- 0
- 1个月
- -1
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
Original image: https://www.flickr.com/photos/nicolelee/19041780
Important
- The input images are directly resized to match the input size of the model. I skipped adding the pad to the input image, it 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
git clone https://github.com/ibaiGorordo/ONNX-YOLOv8-Object-Detection.git
cd ONNX-YOLOv8-Object-Detection
pip install -r requirements.txt
ONNX Runtime
For Nvidia GPU computers:
pip install onnxruntime-gpu
Otherwise:
pip install onnxruntime
ONNX model
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])
Original YOLOv8 model
The original YOLOv8 model can be found in this repository: YOLOv8 Repository
- The License of the models is GPL-3.0 license: License
Examples
- Image inference:
python image_object_detection.py
- Webcam inference:
python webcam_object_detection.py
- Video inference: https://youtu.be/JShJpg8Mf7M
python video_object_detection.py

Original video: https://youtu.be/Snyg0RqpVxY
References:
- YOLOv8 model: https://github.com/ultralytics/ultralytics
- YOLOv5 model: https://github.com/ultralytics/yolov5
- YOLOv6 model: https://github.com/meituan/YOLOv6
- YOLOv7 model: https://github.com/WongKinYiu/yolov7
- PINTO0309's model zoo: https://github.com/PINTO0309/PINTO_model_zoo
- PINTO0309's model conversion tool: https://github.com/PINTO0309/openvino2tensorflow
探索相关项目
加载中…