Skip to content

Yet another export yolov5 models to ONNX and inference with TensorRT #1597

@linghu8812

Description

@linghu8812

Hello everyone, here is a repo that can convert the yolov5 model to ONNX model and inference with TensorRT. The code is here: https://github.com/linghu8812/tensorrt_inference/tree/master/project/yolov5. It supported all yolov5 models including yolov5s, yolov5m, yolov5l and yolov5x. An onnxsim module has been imported to simplify the yolov5 structure. Before simplify the yolov5 onnx structure was shown like this:

image

after simplified the onnx model has been simplified to:

image

some extra node have been simplified.

In addition, a TensorRT inference code has also been supplied, the inference result has been shown below:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleStale and schedule for closing soonenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions