Yolov9 tensorRT not doing inference on Jetson Orin Nano

After running python3 yolov9_trt.py I got this error
Ive been following the youtube video on Robot Mania’s youtube channel
Everything was going fine up until the 14:30 mark

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>[07/05/2024-14:42:26] [TRT] [W] onnx2trt_utils.cpp:372: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
2024-07-05 14:42:26,214 - INFO - tensorrt_base,create_engine: create engine with FP16
2024-07-05 14:42:26,215 - INFO - tensorrt_base,create_engine: Creating an inference engine, please wait a few minutes!!!
[07/05/2024-15:05:50] [TRT] [W] TensorRT encountered issues when converting weights between types and that could affect accuracy.
[07/05/2024-15:05:50] [TRT] [W] If this is not the desired behavior, please modify the weights or retrain with regularization to adjust the magnitude of the weights.
[07/05/2024-15:05:50] [TRT] [W] Check verbose logs for the list of affected weights.
[07/05/2024-15:05:50] [TRT] [W] - 278 weights are affected by this issue: Detected subnormal FP16 values.
[07/05/2024-15:05:50] [TRT] [W] - 1 weights are affected by this issue: Detected values less than smallest positive FP16 subnormal value and converted them to the FP16 minimum subnormalized value.
2024-07-05 15:05:50,138 - INFO - tensorrt_base,create_engine: Creating an inference engine successful!
/home/duncan/yolov9-tensorrt/yolov9_trt.py:175: DeprecationWarning: Use get_tensor_shape instead.
self.logger.info("bingding shape:{}".format(engine.get_binding_shape(binding)))
2024-07-05 15:05:51,372 - INFO - yolov9_trt,get_trt_model_stream: bingding shape:(1, 3, 640, 640)
/home/duncan/yolov9-tensorrt/yolov9_trt.py:176: DeprecationWarning: Use get_tensor_shape instead.
size = trt.volume(engine.get_binding_shape(binding))
/home/duncan/yolov9-tensorrt/yolov9_trt.py:177: DeprecationWarning: Use get_tensor_dtype instead.
dtype = trt.nptype(engine.get_binding_dtype(binding))
/home/duncan/yolov9-tensorrt/yolov9_trt.py:185: DeprecationWarning: Use get_tensor_shape instead.
self.input_w = engine.get_binding_shape(binding)[-1]
/home/duncan/yolov9-tensorrt/yolov9_trt.py:186: DeprecationWarning: Use get_tensor_shape instead.
self.input_h = engine.get_binding_shape(binding)[-2]
2024-07-05 15:05:51,380 - INFO - yolov9_trt,get_trt_model_stream: bingding shape:(1, 84, 8400)
2024-07-05 15:05:51,381 - INFO - yolov9_trt,get_trt_model_stream: bingding shape:(1, 84, 8400)
wrapper took 17.6005 ms to execute.
Error in do_infer: 'Yolov9' object has no attribute 'output_dim'
wrapper took 199.6112 ms to execute.
Traceback (most recent call last):
File "/home/duncan/yolov9-tensorrt/yolov9_trt.py", line 243, in <module>
draw_detect_results(img, detect_results)
File "/home/duncan/yolov9-tensorrt/python/draw_AI_results.py", line 24, in draw_detect_results
for r in results:
TypeError: 'NoneType' object is not iterable
-------------------------------------------------------------------
PyCUDA ERROR: The context stack was not empty upon module cleanup.
-------------------------------------------------------------------
A context was still active when the context stack was being
cleaned up. At this point in our execution, CUDA may already
have been deinitialized, so there is no way we can finish
cleanly. The program will be aborted now.
Use Context.pop() to avoid this problem.
-------------------------------------------------------------------
Aborted (core dumped)
</code>
<code>[07/05/2024-14:42:26] [TRT] [W] onnx2trt_utils.cpp:372: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32. 2024-07-05 14:42:26,214 - INFO - tensorrt_base,create_engine: create engine with FP16 2024-07-05 14:42:26,215 - INFO - tensorrt_base,create_engine: Creating an inference engine, please wait a few minutes!!! [07/05/2024-15:05:50] [TRT] [W] TensorRT encountered issues when converting weights between types and that could affect accuracy. [07/05/2024-15:05:50] [TRT] [W] If this is not the desired behavior, please modify the weights or retrain with regularization to adjust the magnitude of the weights. [07/05/2024-15:05:50] [TRT] [W] Check verbose logs for the list of affected weights. [07/05/2024-15:05:50] [TRT] [W] - 278 weights are affected by this issue: Detected subnormal FP16 values. [07/05/2024-15:05:50] [TRT] [W] - 1 weights are affected by this issue: Detected values less than smallest positive FP16 subnormal value and converted them to the FP16 minimum subnormalized value. 2024-07-05 15:05:50,138 - INFO - tensorrt_base,create_engine: Creating an inference engine successful! /home/duncan/yolov9-tensorrt/yolov9_trt.py:175: DeprecationWarning: Use get_tensor_shape instead. self.logger.info("bingding shape:{}".format(engine.get_binding_shape(binding))) 2024-07-05 15:05:51,372 - INFO - yolov9_trt,get_trt_model_stream: bingding shape:(1, 3, 640, 640) /home/duncan/yolov9-tensorrt/yolov9_trt.py:176: DeprecationWarning: Use get_tensor_shape instead. size = trt.volume(engine.get_binding_shape(binding)) /home/duncan/yolov9-tensorrt/yolov9_trt.py:177: DeprecationWarning: Use get_tensor_dtype instead. dtype = trt.nptype(engine.get_binding_dtype(binding)) /home/duncan/yolov9-tensorrt/yolov9_trt.py:185: DeprecationWarning: Use get_tensor_shape instead. self.input_w = engine.get_binding_shape(binding)[-1] /home/duncan/yolov9-tensorrt/yolov9_trt.py:186: DeprecationWarning: Use get_tensor_shape instead. self.input_h = engine.get_binding_shape(binding)[-2] 2024-07-05 15:05:51,380 - INFO - yolov9_trt,get_trt_model_stream: bingding shape:(1, 84, 8400) 2024-07-05 15:05:51,381 - INFO - yolov9_trt,get_trt_model_stream: bingding shape:(1, 84, 8400) wrapper took 17.6005 ms to execute. Error in do_infer: 'Yolov9' object has no attribute 'output_dim' wrapper took 199.6112 ms to execute. Traceback (most recent call last): File "/home/duncan/yolov9-tensorrt/yolov9_trt.py", line 243, in <module> draw_detect_results(img, detect_results) File "/home/duncan/yolov9-tensorrt/python/draw_AI_results.py", line 24, in draw_detect_results for r in results: TypeError: 'NoneType' object is not iterable ------------------------------------------------------------------- PyCUDA ERROR: The context stack was not empty upon module cleanup. ------------------------------------------------------------------- A context was still active when the context stack was being cleaned up. At this point in our execution, CUDA may already have been deinitialized, so there is no way we can finish cleanly. The program will be aborted now. Use Context.pop() to avoid this problem. ------------------------------------------------------------------- Aborted (core dumped) </code>
[07/05/2024-14:42:26] [TRT] [W] onnx2trt_utils.cpp:372: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
2024-07-05 14:42:26,214 - INFO - tensorrt_base,create_engine: create engine with FP16
2024-07-05 14:42:26,215 - INFO - tensorrt_base,create_engine: Creating an inference engine, please wait a few minutes!!!
[07/05/2024-15:05:50] [TRT] [W] TensorRT encountered issues when converting weights between types and that could affect accuracy.
[07/05/2024-15:05:50] [TRT] [W] If this is not the desired behavior, please modify the weights or retrain with regularization to adjust the magnitude of the weights.
[07/05/2024-15:05:50] [TRT] [W] Check verbose logs for the list of affected weights.
[07/05/2024-15:05:50] [TRT] [W] - 278 weights are affected by this issue: Detected subnormal FP16 values.
[07/05/2024-15:05:50] [TRT] [W] - 1 weights are affected by this issue: Detected values less than smallest positive FP16 subnormal value and converted them to the FP16 minimum subnormalized value.
2024-07-05 15:05:50,138 - INFO - tensorrt_base,create_engine: Creating an inference engine successful!
/home/duncan/yolov9-tensorrt/yolov9_trt.py:175: DeprecationWarning: Use get_tensor_shape instead.
  self.logger.info("bingding shape:{}".format(engine.get_binding_shape(binding)))
2024-07-05 15:05:51,372 - INFO - yolov9_trt,get_trt_model_stream: bingding shape:(1, 3, 640, 640)
/home/duncan/yolov9-tensorrt/yolov9_trt.py:176: DeprecationWarning: Use get_tensor_shape instead.
  size = trt.volume(engine.get_binding_shape(binding))
/home/duncan/yolov9-tensorrt/yolov9_trt.py:177: DeprecationWarning: Use get_tensor_dtype instead.
  dtype = trt.nptype(engine.get_binding_dtype(binding))
/home/duncan/yolov9-tensorrt/yolov9_trt.py:185: DeprecationWarning: Use get_tensor_shape instead.
  self.input_w = engine.get_binding_shape(binding)[-1]
/home/duncan/yolov9-tensorrt/yolov9_trt.py:186: DeprecationWarning: Use get_tensor_shape instead.
  self.input_h = engine.get_binding_shape(binding)[-2]
2024-07-05 15:05:51,380 - INFO - yolov9_trt,get_trt_model_stream: bingding shape:(1, 84, 8400)
2024-07-05 15:05:51,381 - INFO - yolov9_trt,get_trt_model_stream: bingding shape:(1, 84, 8400)
wrapper took 17.6005 ms to execute.
Error in do_infer: 'Yolov9' object has no attribute 'output_dim'
wrapper took 199.6112 ms to execute.
Traceback (most recent call last):
  File "/home/duncan/yolov9-tensorrt/yolov9_trt.py", line 243, in <module>
    draw_detect_results(img, detect_results)
  File "/home/duncan/yolov9-tensorrt/python/draw_AI_results.py", line 24, in draw_detect_results
    for r in results:
TypeError: 'NoneType' object is not iterable
-------------------------------------------------------------------
PyCUDA ERROR: The context stack was not empty upon module cleanup.
-------------------------------------------------------------------
A context was still active when the context stack was being
cleaned up. At this point in our execution, CUDA may already
have been deinitialized, so there is no way we can finish
cleanly. The program will be aborted now.
Use Context.pop() to avoid this problem.
-------------------------------------------------------------------
Aborted (core dumped)

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật