Skip to content

How to convert yolov5x (and v5x6) to onnx? #279

Answered by zhiqwang
NMZ0429 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @NMZ0429 , Thanks for adding this ticket.

We've added the support for yolov5x and yolov5x6 in #261 . I haven't added its definition in models/__init__.py since we haven't uploaded the translated model yet. (We'll upload the translated PyTorch checkpoint at this week.) But you could find these in models/yolo.py:

https://github.com/zhiqwang/yolov5-rt-stack/blob/3485ea144fec7b2857d0d2e0d4ff329959e77027/yolort/models/yolo.py#L31-L32

And you can now use the following ways to load yolov5x6 in notebooks/export-onnx-inference-onnxruntime.ipynb:

from yolort.models import YOLOv5

# 'yolov5x.pt' is downloaded from https://github.com/ultralytics/yolov5/releases/download/v6.0/yolov5x6.pt
ckpt_path_…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@anshudaur
Comment options

@zhiqwang
Comment options

@anshudaur
Comment options

Answer selected by NMZ0429
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
3 participants