I have converted
yolov5s.pt file into
yolov5s.wts and then build the engine file
yolov5s.engine. I have modified some parts of the code from here Jetson/L4T/TRT Customized Example - eLinux.org and some code taken from this repo tensorrtx/yolov5_det_trt.py at master · wang-xinyu/tensorrtx · GitHub . Everything is working fine but when I close the window by pressing
Esc, it closes with error msg:
[03/30/2023-19:08:59] [TRT] [E] 1: [defaultAllocator.cpp::deallocate::35] Error Code 1: Cuda Runtime (invalid argument)
Tensor rt version: 184.108.40.206
Board Type: Jetson Nano
I have uploaded my project here: test.zip - Google Drive
with all the files. Please if anyone can suggest what is the issue? Thanks
This is related to the destructor of TensorRT.
Could you try to unset the engine variable to see if it helps?
engine = 
Where exactly I have to put this in code I shared?
I created another function in the class
self.engine = 
and called this outside of
while display.IsStreaming(): so that once application closes,
self.engine =  is called but still getting the same error.
Hi, @AastaLLL is there any update on this, please? Thanks
Solved it by moving the below variable outside of the class
Sorry for the late reply.
Thanks for the update and good to know it works now.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.