What's different .trt and .engine of model?

i used tensorrt_demos to change custom yolov4.weights to onnx and int8 engine.
i got model like this: yolov4-608-int8.trt, but it can not run at test5.
if i used ./trtexec to change that i will get engine which name xxx.engine and it works well, but only fp16.
could you advice to me what is different .trt and .engine files?
how can i do ?


and when i run:
./trtexec --onnx=yolov4_-1_3_608_608_dynamic.onnx --explicitBatch --saveEngine=yolov4_608.engine --best --verbose --calib=calib_yolov4-int8-608.bin

it shows error like below:


.trt and .engine are all TensorRT engine file.
Since it is just a serialized data, the file extension varies from the name user chooses.

The error you met is from the INT8 calibrator.
Do you generate the calibration cache with YOLOv4 on Xavier directly?


i used tensorrt_demos to generate my int8.trt files with my calib-images arround 10000pcs.
i changed classes names and nums for my own model.
and the file works well when i tested it by python3, when i put this model in test5, pipline can not open model.
i try to use this new cache file of int8.bin to run above command in my trainning path: ./trtexec xxxxxxxxx --int8 --calib, that shows error.
what do you mean generate cache with yolov4 on Xavier directly?
pls give some advice to go on my works for int8…

thank you very much!!


It looks like you are facing a similar issue with the following comment:

The above issue can be fixed by updating the input layer name from 000_net into data.
Could you check if the same solution also works for you?


yes it is that problem, now i get int8 works.
but new problem is why int8 inference time is slower that fp16?