Yolov5 Inference in c++ takes long time in first frames

Hi
I’m using this repo to infer the yolov5 tensorrt model in C++ with Jetson TX1.
but when I give multiple images to the model, in the first images (first, second, and third) the inference time is much higher than the next frames
my frames resized to 640,640 and all images have the same size.
I don’t know why the first frames take longer to infer.

Hi,

The first kernel tends to be slower for initialization.
You can set up some warmup loops before processing the real data to improve this issue.

Thanks.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.