Discussions>How Can I Find a Guide For YoloV5 Models Inference?>

How Can I Find a Guide For YoloV5 Models Inference?

I want to set up an object detection model on my Linux device. How can I find a guide for it?

I also do not know which format is the best for inference. I know that I can convert into different formats, but can not find the best way to make it. I am using:

  • Python v3.7
  • Linux Ubuntu 18.04
  • PyTorch v1.9
2 votesJW330.00
1 Answers
JO297.00
2

It is often useful when you use office docs and follow their structures. Here is one way how you can do it.

  • First, clone the official Github repository from here (if you already have it, cool)
  • Make sure you have installed all requirements listed in requirements.txt
  • There are a couple of options that you can use for the format. Like PyTorch, TorchScript, ONNX, TFLite, etc...
    There is a script, which is created for the export of the trained model.

    python export.py --weights [weights-path] --img [image-size] --batch [batch-size]


    If you need to export into ONNX as well, or any other format, just call

    python export.py --weights [weights-path] --include onnx --dynamic

You can find more int the following doc: https://github.com/ultralytics/yolov5/issues/251

Reply
Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?