/
How to get the ONNX from the official YOLOV8 PT File

How to get the ONNX from the official YOLOV8 PT File

This document describes how to convert the PT file provided by YOLOV8 to ONNX format.
The prerequisite is that the development environment for Python YOLOV8 has already been set up.

The requirement of ultralytics is in the file.

We supply the conda environment version list in the file.

1. Prepare Project File

Download from the GitHub:

git clone https://github.com/ultralytics/ultralytics.git git checkout v8.2.77

2. Write Python code

Save the file as export. py

from ultralytics import YOLO # Load a model model = YOLO("yolov8n.pt") # load a pretrained model # export the model model.export(format="onnx") # export the model to ONNX format

3. Export the ONNX

python export.sh

4. Demo Video

convertOnnx_v1.0.mp4

 

Related content

How to Use YOLOV8 Pose on C3V
How to Use YOLOV8 Pose on C3V
More like this
How to use YOLOV5 Detection on C3V
How to use YOLOV5 Detection on C3V
More like this
NN Model Conversion
NN Model Conversion
More like this
C3V Validation Guide
C3V Validation Guide
More like this
Execute the Converted NN Model on C3V Linux
Execute the Converted NN Model on C3V Linux
Read with this
Example: How to update YOLOV8s into the NN Framework
Example: How to update YOLOV8s into the NN Framework
More like this