spacewalk01 / yolov9-bytetrack-tensorrt

Integration of YOLOv9 with ByteTracker
https://github.com/WongKinYiu/yolov9
74 stars 12 forks source link

Error Code 1: Cuda Runtime (misaligned address) #4

Closed whuhit closed 8 months ago

whuhit commented 8 months ago

When I run it, the following error occurs. Could you please help me take a look?

image

spacewalk01 commented 8 months ago

Looks the error occurs when destroying stream (error line yolov9.cpp : 71, 74). I added cuda sync before destroying cuda stream. You may try it again.

https://github.com/spacewalk01/TensorRT-YOLOv9/blob/849ae2366f191c3ebb74bbd88464015aa3d0abb6/src/yolov9.cpp#L71

whuhit commented 8 months ago

Looks the error occurs when destroying stream (error line yolov9.cpp : 71, 74). I added cuda sync before destroying cuda stream. You may try it again.

https://github.com/spacewalk01/TensorRT-YOLOv9/blob/849ae2366f191c3ebb74bbd88464015aa3d0abb6/src/yolov9.cpp#L71

I tried, but it didn't work. My cuda version is 11.6, tensorrt is 8.6.1.6, eigen is 3.4.0,opencv is 4.5.2,could you share your envs? and this is my onnx file,is it correct? link

spacewalk01 commented 8 months ago

My env was:

whuhit commented 8 months ago

My env was:

  • TensorRT-8.6.0.12
  • opencv 4.9
  • cdua 11.8
  • eigen 3.4.0

I changed back to your old TensorRT-YOLOv9 version without preprocess.cu,and use yolov9-c.pt(not yolov9-c-converted.pt), that works for me.

spacewalk01 commented 8 months ago

That is great. The old version preprocesses the input image on cpu

spacewalk01 commented 8 months ago

I will add the old version as a branch. Thank you for reporting it!

spacewalk01 commented 8 months ago

https://github.com/spacewalk01/TensorRT-YOLOv9/tree/cpu_preprocessing