jason-li-831202 / Vehicle-CV-ADAS

The project can achieve FCWS, LDWS, and LKAS functions solely using only visual sensors. using YOLOv5 / YOLOv5-lite / YOLOv6 / YOLOv7 / YOLOv8 / YOLOv9 / EfficientDet and Ultra-Fast-Lane-Detection-v2 .
GNU General Public License v3.0
162 stars 38 forks source link

运行demo.py报错 #18

Open 1623021453 opened 8 months ago

1623021453 commented 8 months ago

运行onnx模型可以正常运行,运行trt模型,直接中断,输出如下 [2024-01-17 10:25:43] [INFO] [Pycuda] Cuda Version: (11, 4, 0) [2024-01-17 10:25:43] [INFO] [Driver] Cuda Version: 12020 [2024-01-17 10:25:43] [INFO] ---------------------------------------- [2024-01-17 10:25:43] [INFO] UfldDetector Model Type : UFLDV2_CULANE

1623021453 commented 8 months ago

trt模型是用本工程中的代码转的,请问有人知道是什么原因吗?困扰了我好久

jason-li-831202 commented 8 months ago

Check whether your tensorRT version is compatible with the cuda version.

1623021453 commented 8 months ago

是适配的,我的cuda版本是11.4,tensorrt的版本8.2 8.4 8.6都有试过,都是会直接中断

---原始邮件--- 发件人: "Kai Chun, @.> 发送时间: 2024年1月17日(周三) 下午2:12 收件人: @.>; 抄送: @.**@.>; 主题: Re: [jason-li-831202/Vehicle-CV-ADAS] 运行demo.py报错 (Issue #18)

Check whether your tensorRT version is compatible with the cuda version.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

SilaLiu commented 4 months ago

我也是运行了demo.py报错 ~/catkin_ws/src/Vehicle-CV-ADAS$ python3 demo.py /usr/lib/python3/dist-packages/scipy/init.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.26.4 warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}" Traceback (most recent call last): File "/home/pixbus/catkin_ws/src/Vehicle-CV-ADAS/ObjectDetector/yoloDetector.py", line 9, in from utils import ObjectModelType, hex_to_rgb, NMS, Scaler ModuleNotFoundError: No module named 'utils'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/pixbus/catkin_ws/src/Vehicle-CV-ADAS/demo.py", line 7, in from taskConditions import TaskConditions, Logger File "/home/pixbus/catkin_ws/src/Vehicle-CV-ADAS/taskConditions.py", line 5, in from ObjectDetector.utils import CollisionType File "/home/pixbus/catkin_ws/src/Vehicle-CV-ADAS/ObjectDetector/init.py", line 1, in from ObjectDetector.yoloDetector import YoloDetector File "/home/pixbus/catkin_ws/src/Vehicle-CV-ADAS/ObjectDetector/yoloDetector.py", line 14, in from .utils import ObjectModelType, hex_to_rgb, NMS, Scaler File "/home/pixbus/catkin_ws/src/Vehicle-CV-ADAS/ObjectDetector/utils.py", line 4, in from numba import jit File "/usr/lib/python3/dist-packages/numba/init.py", line 42, in from numba.np.ufunc import (vectorize, guvectorize, threading_layer, File "/usr/lib/python3/dist-packages/numba/np/ufunc/init.py", line 3, in from numba.np.ufunc.decorators import Vectorize, GUVectorize, vectorize, guvectorize File "/usr/lib/python3/dist-packages/numba/np/ufunc/decorators.py", line 3, in from numba.np.ufunc import _internal SystemError: initialization of _internal failed without raising an exception

SilaLiu commented 4 months ago

这是我的cuda版本: nvidia-smi Sat Apr 20 15:21:19 2024
+---------------------------------------------------------------------------------------+ | NVIDIA-SMI 545.23.08 Driver Version: 545.23.08 CUDA Version: 12.3 | |-----------------------------------------+----------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+======================+======================| | 0 NVIDIA GeForce RTX 3060 On | 00000000:01:00.0 On | N/A | | 30% 34C P8 14W / 170W | 131MiB / 12288MiB | 1% Default | | | | N/A | +-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=======================================================================================| | 0 N/A N/A 1395 G /usr/lib/xorg/Xorg 78MiB | | 0 N/A N/A 1700 G /usr/bin/gnome-shell 23MiB | | 0 N/A N/A 10782 G ...seed-version=20240419-130118.436000 18MiB | +---------------------------------------------------------------------------------------+

jason-li-831202 commented 4 months ago

https://github.com/jason-li-831202/Vehicle-CV-ADAS/blob/5852d162abf9d3a26a7e42080fc9fc9d2021efbc/ObjectDetector/utils.py#L4

https://github.com/jason-li-831202/Vehicle-CV-ADAS/blob/5852d162abf9d3a26a7e42080fc9fc9d2021efbc/ObjectDetector/utils.py#L130

https://github.com/jason-li-831202/Vehicle-CV-ADAS/blob/5852d162abf9d3a26a7e42080fc9fc9d2021efbc/ObjectDetector/utils.py#L195

Try commenting out the three lines above.

SilaLiu commented 4 months ago

我注释了,最后我得到这个结果,我确保我已经安装了,tensorrt

1623021453 commented 2 months ago

我可以正常运行demo.py了,我把cuda从11.4换成11.3后可以正常运行了,感谢作者的分享

1623021453 commented 2 months ago

我注释了,最后我得到这个结果,我确保我已经安装了,tensorrt

作者的代码是在windows下运行的,你是在ubuntu下运行的吗?