YOLOV5加速之TensorRT Python版API构建模型
看到几篇文章转YOLOV5到TRT时基本都在用C++构建,实际上TRT也有Python版本的API,自己试着搞了下也能用效果一样,下面贴下代码:from collections import OrderedDictimport tensorrt as trtimport torchfrom numpy import ceilimport numpy as npTRT_LOGGER = trt.Logger(trt.Logger.WARNING)INPUT_BLOB_NAME = "d