linghu8812 / tensorrt_inference

696 stars 205 forks source link

When converting the latest version of yolov5.pt to onnx Can I use the yolov5/export_onnx.py you provided? #141

Open leeyunhome opened 2 years ago

leeyunhome commented 2 years ago

Hello, @linghu8812

Thank you for good material. When converting the latest version of yolov5.pt to onnx Can I use the yolov5/export_onnx.py you provided?

Thank you.

linghu8812 commented 1 year ago

Hello, @linghu8812

Thank you for good material. When converting the latest version of yolov5.pt to onnx Can I use the yolov5/export_onnx.py you provided?

Thank you.

I have update the yolov5 C++ postProcess code, https://github.com/linghu8812/tensorrt_inference/blob/master/yolov5/yolov5.cpp#L203-L231, I will update the export onnx model method later.

leeyunhome commented 1 year ago

Hello, @linghu8812 Thank you for good material. When converting the latest version of yolov5.pt to onnx Can I use the yolov5/export_onnx.py you provided? Thank you.

I have update the yolov5 C++ postProcess code, https://github.com/linghu8812/tensorrt_inference/blob/master/yolov5/yolov5.cpp#L203-L231, I will update the export onnx model method later.

Hello, @linghu8812

Thank you for reply. image

I have downloaded yolov5s.pt you linked this repo. And convert that yolov5s.pt to onnx using your export script.

finally, I execute yolov5_trt with config.yaml. But I can't find bounding boxes on result image.

Where did I go wrong?

`./yolov5_trt ../config.yaml ../samples/ [07/19/2022-16:22:31] [I] [TRT] [MemUsageChange] Init CUDA: CPU +363, GPU +0, now: CPU 381, GPU 5947 (MiB) [07/19/2022-16:22:31] [I] [TRT] [MemUsageSnapshot] Begin constructing builder kernel library: CPU 381 MiB, GPU 5976 MiB [07/19/2022-16:22:32] [I] [TRT] [MemUsageSnapshot] End constructing builder kernel library: CPU 486 MiB, GPU 6081 MiB [07/19/2022-16:22:32] [I] [TRT] ---------------------------------------------------------------- [07/19/2022-16:22:32] [I] [TRT] Input filename: ../yolov5s.onnx [07/19/2022-16:22:32] [I] [TRT] ONNX IR version: 0.0.7 [07/19/2022-16:22:32] [I] [TRT] Opset version: 12 [07/19/2022-16:22:32] [I] [TRT] Producer name: pytorch [07/19/2022-16:22:32] [I] [TRT] Producer version: 1.10 [07/19/2022-16:22:32] [I] [TRT] Domain:
[07/19/2022-16:22:32] [I] [TRT] Model version: 0 [07/19/2022-16:22:32] [I] [TRT] Doc string:
[07/19/2022-16:22:32] [I] [TRT] ---------------------------------------------------------------- [07/19/2022-16:22:32] [W] [TRT] onnx2trt_utils.cpp:366: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32. [07/19/2022-16:22:32] [W] [TRT] onnx2trt_utils.cpp:392: One or more weights outside the range of INT32 was clamped [07/19/2022-16:22:32] [W] [TRT] onnx2trt_utils.cpp:392: One or more weights outside the range of INT32 was clamped [07/19/2022-16:22:32] [W] [TRT] onnx2trt_utils.cpp:392: One or more weights outside the range of INT32 was clamped [07/19/2022-16:22:32] [W] [TRT] onnx2trt_utils.cpp:392: One or more weights outside the range of INT32 was clamped [07/19/2022-16:22:32] [W] [TRT] onnx2trt_utils.cpp:392: One or more weights outside the range of INT32 was clamped [07/19/2022-16:22:32] [W] [TRT] onnx2trt_utils.cpp:392: One or more weights outside the range of INT32 was clamped [07/19/2022-16:22:32] [W] [TRT] onnx2trt_utils.cpp:392: One or more weights outside the range of INT32 was clamped [07/19/2022-16:22:32] [W] [TRT] onnx2trt_utils.cpp:392: One or more weights outside the range of INT32 was clamped start building engine [07/19/2022-16:22:32] [I] [TRT] ---------- Layers Running on DLA ---------- [07/19/2022-16:22:32] [I] [TRT] ---------- Layers Running on GPU ---------- [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Slice_4 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Slice_9 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Slice_14 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Slice_19 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Slice_24 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Slice_29 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Slice_34 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Slice_39 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_41 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_42), Mul_43) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_44 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_45), Mul_46) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_47 || Conv_58 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_48), Mul_49) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_50 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_51), Mul_52) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_53 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(PWN(HardSigmoid_54), Mul_55), Add_56) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_57 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 224 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] BatchNormalization_60 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(LeakyRelu_61) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_62 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_63), Mul_64) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_65 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_66), Mul_67) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_68 || Conv_93 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_69), Mul_70) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_71 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_72), Mul_73) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_74 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(PWN(HardSigmoid_75), Mul_76), Add_77) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_78 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_79), Mul_80) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_81 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(PWN(HardSigmoid_82), Mul_83), Add_84) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_85 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_86), Mul_87) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_88 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(PWN(HardSigmoid_89), Mul_90), Add_91) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_92 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 259 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] BatchNormalization_95 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(LeakyRelu_96) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_97 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_98), Mul_99) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_100 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_101), Mul_102) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_103 || Conv_128 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_104), Mul_105) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_106 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_107), Mul_108) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_109 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(PWN(HardSigmoid_110), Mul_111), Add_112) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_113 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_114), Mul_115) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_116 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(PWN(HardSigmoid_117), Mul_118), Add_119) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_120 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_121), Mul_122) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_123 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(PWN(HardSigmoid_124), Mul_125), Add_126) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_127 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 294 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] BatchNormalization_130 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(LeakyRelu_131) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_132 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_133), Mul_134) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_135 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_136), Mul_137) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_138 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_139), Mul_140) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] MaxPool_141 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] MaxPool_142 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] MaxPool_143 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 306 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 307 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 308 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 309 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_145 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_146), Mul_147) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_148 || Conv_158 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_149), Mul_150) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_151 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_152), Mul_153) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_154 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_155), Mul_156) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_157 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 324 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] BatchNormalization_160 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(LeakyRelu_161) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_162 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_163), Mul_164) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_165 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_166), Mul_167) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Resize_169 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 338 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_171 || Conv_181 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_172), Mul_173) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_174 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_175), Mul_176) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_177 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_178), Mul_179) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_180 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 350 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] BatchNormalization_183 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(LeakyRelu_184) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_185 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_186), Mul_187) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_188 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_189), Mul_190) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Resize_192 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 364 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_194 || Conv_204 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_195), Mul_196) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_197 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_198), Mul_199) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_200 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_201), Mul_202) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_203 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 376 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] BatchNormalization_206 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(LeakyRelu_207) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_208 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_209), Mul_210) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_211 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_212), Mul_213) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 359 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_215 || Conv_225 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_216), Mul_217) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_218 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_219), Mul_220) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_221 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_222), Mul_223) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_224 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 397 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] BatchNormalization_227 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(LeakyRelu_228) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_229 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_230), Mul_231) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_232 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_233), Mul_234) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 333 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_236 || Conv_246 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_237), Mul_238) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_239 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_240), Mul_241) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_242 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_243), Mul_244) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_245 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 418 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] BatchNormalization_248 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(LeakyRelu_249) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_250 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(PWN(HardSigmoid_251), Mul_252) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_253 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Reshape_254 + Transpose_255 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(Sigmoid_256) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Reshape_257 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_258 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Reshape_259 + Transpose_260 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(Sigmoid_261) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Reshape_262 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Conv_263 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Reshape_264 + Transpose_265 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] PWN(Sigmoid_266) [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] Reshape_267 [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 446 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 468 copy [07/19/2022-16:22:32] [I] [TRT] [GpuLayer] 490 copy [07/19/2022-16:22:34] [I] [TRT] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +226, GPU +205, now: CPU 745, GPU 6346 (MiB) [07/19/2022-16:22:35] [I] [TRT] [MemUsageChange] Init cuDNN: CPU +308, GPU +308, now: CPU 1053, GPU 6654 (MiB) [07/19/2022-16:22:35] [I] [TRT] Local timing cache in use. Profiling results in this builder pass will not be stored. [07/19/2022-16:26:20] [I] [TRT] Some tactics do not have sufficient workspace memory to run. Increasing workspace size may increase performance, please check verbose output.

[07/19/2022-16:35:46] [I] [TRT] Detected 1 inputs and 4 output network tensors. [07/19/2022-16:35:46] [I] [TRT] Total Host Persistent Memory: 174048 [07/19/2022-16:35:46] [I] [TRT] Total Device Persistent Memory: 15526400 [07/19/2022-16:35:46] [I] [TRT] Total Scratch Memory: 0 [07/19/2022-16:35:46] [I] [TRT] [MemUsageStats] Peak memory usage of TRT CPU/GPU memory allocators: CPU 18 MiB, GPU 934 MiB [07/19/2022-16:35:46] [I] [TRT] [BlockAssignment] Algorithm ShiftNTopDown took 81.8537ms to assign 7 blocks to 153 nodes requiring 172032000 bytes. [07/19/2022-16:35:46] [I] [TRT] Total Activation Memory: 172032000 [07/19/2022-16:35:46] [I] [TRT] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +1, GPU +0, now: CPU 1538, GPU 6745 (MiB) [07/19/2022-16:35:46] [I] [TRT] [MemUsageChange] Init cuDNN: CPU +0, GPU +0, now: CPU 1538, GPU 6745 (MiB) [07/19/2022-16:35:46] [I] [TRT] [MemUsageChange] TensorRT-managed allocation in building engine: CPU +14, GPU +16, now: CPU 14, GPU 16 (MiB) build engine done writing engine file... save engine file done [07/19/2022-16:35:46] [I] [TRT] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +1, GPU +0, now: CPU 1417, GPU 6755 (MiB) [07/19/2022-16:35:46] [I] [TRT] [MemUsageChange] Init cuDNN: CPU +0, GPU +0, now: CPU 1417, GPU 6755 (MiB) [07/19/2022-16:35:46] [I] [TRT] [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +178, now: CPU 14, GPU 194 (MiB) binding0: 49152000 binding1: 85680000 Processing: ../samples//dog.jpg prepareImage prepare image take: 19.7432 ms. host2device execute Inference take: 192.976 ms. execute success device2host post process Post process take: 103.412 ms. ../samples//dog.jpg Processing: ../samples//horses.jpg prepareImage prepare image take: 7.5729 ms. host2device execute Inference take: 190.68 ms. execute success device2host post process Post process take: 95.5745 ms. ../samples//horses.jpg Processing: ../samples//giraffe.jpg prepareImage prepare image take: 11.9909 ms. host2device execute Inference take: 190.817 ms. execute success device2host post process Post process take: 101.227 ms. ../samples//giraffe.jpg Processing: ../samples//zidane.jpg prepareImage prepare image take: 7.13594 ms. host2device execute Inference take: 190.855 ms. execute success device2host post process Post process take: 93.5977 ms. ../samples//zidane.jpg Processing: ../samples//eagle.jpg prepareImage prepare image take: 7.19696 ms. host2device execute Inference take: 190.486 ms. execute success device2host post process Post process take: 103.947 ms. ../samples//eagle.jpg Processing: ../samples//person.jpg prepareImage prepare image take: 4.50103 ms. host2device execute Inference take: 190.926 ms. execute success device2host post process Post process take: 93.5148 ms. ../samples//person.jpg Processing: ../samples//bus.jpg prepareImage prepare image take: 8.281 ms. host2device execute Inference take: 190.748 ms. execute success device2host post process Post process take: 107.169 ms. ../samples//bus_.jpg Average processing time is 300.336ms`

From the second execution, a segment fault appears as shown below. manager@manager-desktop:~/coding/GitHub/tensorrt_inference/yolov5/build$ ./yolov5_trt ../config.yaml ../samples/ loading filename from:../yolov5s.trt [07/20/2022-07:44:38] [I] [TRT] [MemUsageChange] Init CUDA: CPU +363, GPU +0, now: CPU 398, GPU 5410 (MiB) [07/20/2022-07:44:38] [I] [TRT] Loaded engine size: 16 MiB [07/20/2022-07:44:39] [I] [TRT] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +226, GPU +229, now: CPU 633, GPU 5648 (MiB) [07/20/2022-07:44:40] [I] [TRT] [MemUsageChange] Init cuDNN: CPU +307, GPU +308, now: CPU 940, GPU 5956 (MiB) [07/20/2022-07:44:40] [I] [TRT] [MemUsageChange] TensorRT-managed allocation in engine deserialization: CPU +0, GPU +14, now: CPU 0, GPU 14 (MiB) deserialize done [07/20/2022-07:44:40] [I] [TRT] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +0, GPU +0, now: CPU 923, GPU 5940 (MiB) [07/20/2022-07:44:40] [I] [TRT] [MemUsageChange] Init cuDNN: CPU +0, GPU +0, now: CPU 923, GPU 5940 (MiB) [07/20/2022-07:44:40] [I] [TRT] [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +179, now: CPU 0, GPU 193 (MiB) binding0: 49152000 binding1: 85680000 Processing: ../samples//dog.jpg prepareImage prepare image take: 15.7516 ms. host2device Segmentation fault (core dumped)

Thank you.