From c69abeb5615d1d81dc90ddbbb6c205ba5d63161b Mon Sep 17 00:00:00 2001 From: Melt <60842553+NeKoooo233@users.noreply.github.com> Date: Sun, 5 May 2024 16:21:21 +0800 Subject: [PATCH] Update common.py Fixed a bug. When using a higher version of tensorrt and val.py to verify the model, the following problems may occur: getPluginCreator could not find plugin: InstanceNormalization_TRT version: 1 Serialization assertion creator failed.Cannot deserialize plugin since corresponding IPluginCreator not found in Plugin Registry Signed-off-by: Melt <60842553+NeKoooo233@users.noreply.github.com> --- models/common.py | 1 + 1 file changed, 1 insertion(+) diff --git a/models/common.py b/models/common.py index 8925897099c1..426d5fabb30b 100644 --- a/models/common.py +++ b/models/common.py @@ -521,6 +521,7 @@ def __init__(self, weights="yolov5s.pt", device=torch.device("cpu"), dnn=False, Binding = namedtuple("Binding", ("name", "dtype", "shape", "data", "ptr")) logger = trt.Logger(trt.Logger.INFO) with open(w, "rb") as f, trt.Runtime(logger) as runtime: + trt.init_libnvinfer_plugins(None, "") model = runtime.deserialize_cuda_engine(f.read()) context = model.create_execution_context() bindings = OrderedDict()