GithubHelp home page GithubHelp logo

yutong-gannis / etsauto Goto Github PK

View Code? Open in Web Editor NEW
152.0 3.0 22.0 49.47 MB

🚚 ETSAuto is an Advanced driver Assistance System applied in Euro Truck Simulator 2, performing the functions of Lane Centering Control (LCC) and Auto Lane Change (ALC).

License: MIT License

Python 99.82% Batchfile 0.18%
adas autonomous-driving euro-truck-simulator-2 computer-vision cuda deep-learning self-driving-car python

etsauto's People

Contributors

eiyooooo avatar yutong-gannis avatar ywjno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

etsauto's Issues

大佬大佬,求助求助,帮看看报错

I:\fsd\fsd\venv\Scripts\python.exe script\main.py
[01/23/2023-20:24:19] [TRT] [E] 6: The engine plan file is not compatible with this version of TensorRT, expecting library version 8.4.2.4 got 8.4.0.6, please rebuild.
[01/23/2023-20:24:19] [TRT] [E] 4: [runtime.cpp::nvinfer1::Runtime::deserializeCudaEngine::50] Error Code 4: Internal Error (Engine deserialization failed.)
Traceback (most recent call last):
File "script\main.py", line 63, in
clrnet = CLRNet(llamas_engine_path)
File "I:\fsd\fsd\Perception\LaneDetection\clrnet_trt.py", line 75, in init
self.context = self.engine.create_execution_context()
AttributeError: 'NoneType' object has no attribute 'create_execution_context'

进程已结束,退出代码1

大佬求助

E:\python\python.exe: can't open file 'C:\Users\nijiuning\script\main.py': [Errno 2] No such file or directory
输入运行代码提示这个

感知部分复现

作者是这样的,我想把这个项目的感知部分作为毕设自己复刻一遍,请问需要怎么训练自己的数据集?1.1版本的

关于部署的请教

非常感谢作者的B站作品, 我认为做得已经非常不错了. 同时你也开源了.

我非常热爱此款模拟游戏(从开发布当年就开始玩了). 有时货运距离太长, 久坐也对身体不太好. 因此我非常想体验您的辅助驾驶系统.

不过由于编程方面, 我实在不太在行……

请问:

  1. 作者后期有时间会否考虑出一期视频部署教程?
  2. 远程操作的话, 时间成本会否划不来?
  3. 期待readme可以再多一些步骤. (可能很多卡友都想实现, 但因为专业领域知识的匮乏可能就只能看着别人玩了)
    如可以提供 QR code, 我想请作者喝杯咖啡.

快开学了, 祝作者学业进步!

没搞懂这一波git操作和一个小问题

没搞懂这一波git操作

另外

ETSAuto/script/main.py

Lines 97 to 99 in cac7de7

obstacles, cipv = thread2.result()
stop_line = thread3.result()
nav_line, curve_speed_limit = thread4.result()

被后面的

ETSAuto/script/main.py

Lines 113 to 134 in cac7de7

# 导航图处理
navmap = cv2.cvtColor(img[610:740, 580:780, :], cv2.COLOR_RGB2BGR) # 截取导航地图[130, 200, 3]
navmap[:, 0:50, :] = np.zeros([130, 50, 3])
navmap[:, 150:200, :] = np.zeros([130, 50, 3])
nav_line, curve_speed_limit = nav_process(navmap, truck, info, cipv)
im1 = np.uint8(im1)
# 自车状态监控
bar = cv2.cvtColor(img[750:768, 545:595, :], cv2.COLOR_RGB2BGR) # 截取速度条[18, 50, 3]
truck = speed_detect(ocr, bar, truck)
speed_limit = curve_speed_limit
# 障碍物及停止线检测
obstacles, cipv = cipv_notice(obstacles, bev_lanes)
if traffic_light is not None:
if traffic_light.tlcolor == 1 or traffic_light.tlcolor == 2: # 检测到红灯或黄灯时再检测停止线
stop_line = line_filter(cv2.resize(img, (1280, 720)), M, traffic_light)
else:
stop_line = None
else:
stop_line = None

给覆盖了吧

构建 YOLOV6 的 TensorRT 文件错误 build YOLOV6 TensorRT file error

PS D:\euro_track_simulate\Self-driving-Truck-in-Euro-Truck-Simulator2> python ./tools/export.py -o ./engines/yolov6s_bdd_60.onnx -e ./engines/yolov6s_bdd_60.engine --end2end

Traceback (most recent call last):
File "D:\euro_track_simulate\Self-driving-Truck-in-Euro-Truck-Simulator2\tools\export.py", line 7, in
import tensorrt as trt
File "E:\python\lib\site-packages\tensorrt_init_.py", line 129, in
ctypes.CDLL(find_lib(lib))
File "E:\python\lib\site-packages\tensorrt_init_.py", line 93, in find_lib
raise FileNotFoundError(
FileNotFoundError: Could not find: cublas64_10.dll. Is it on your PATH?
Note: Paths searched were:
['C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\libnvvp', '', '', 'C:\Windows\system32', 'C:\Windows', 'C:\Windows\System32\Wbem', 'C:\Windows\System32\WindowsPowerShell\v1.0\', 'C:\Windows\System32\OpenSSH\', 'C:\Program Files\Bandizip\', 'C:\Program Files\dotnet\', 'E:\Git\cmd', 'C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common', 'C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR', 'C:\Program Files\NVIDIA Corporation\Nsight Compute 2022.2.0\', 'E:\python\Scripts\', 'E:\python\', 'C:\Users\Administrator\AppData\Local\Programs\Python\Python312\Scripts\', 'C:\Users\Administrator\AppData\Local\Programs\Python\Python312\', 'C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps', 'E:\Microsoft VS Code\bin', 'C:\Program Files\NVIDIA\CUDNN\v8.x\bin', 'C:\Program Files\NVIDIA\TensorRT-8.4.2.4\lib', 'C:\Program Files\NVIDIA\TensorRT-8.4.2.4\bin', '']

PS D:\euro_track_simulate\Self-driving-Truck-in-Euro-Truck-Simulator2>
PS D:\euro_track_simulate\Self-driving-Truck-in-Euro-Truck-Simulator2>
PS D:\euro_track_simulate\Self-driving-Truck-in-Euro-Truck-Simulator2>
PS D:\euro_track_simulate\Self-driving-Truck-in-Euro-Truck-Simulator2>

版本 version

PS D:\euro_track_simulate\Self-driving-Truck-in-Euro-Truck-Simulator2> python -V
Python 3.10.4

PS D:\euro_track_simulate\Self-driving-Truck-in-Euro-Truck-Simulator2> pip -V
pip 22.3.1 from E:\python\lib\site-packages\pip (python 3.10)

PS D:\euro_track_simulate\Self-driving-Truck-in-Euro-Truck-Simulator2> nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_May__3_19:00:59_Pacific_Daylight_Time_2022
Cuda compilation tools, release 11.7, V11.7.64
Build cuda_11.7.r11.7/compiler.31294372_0

PS D:\euro_track_simulate\Self-driving-Truck-in-Euro-Truck-Simulator2> trtexec.exe -h
PS D:\euro_track_simulate\Self-driving-Truck-in-Euro-Truck-Simulator2>

怎么解决这个问题?How to solve the problem?

构建 YOLOV6 的 TensorRT 文件时出了问题,求大佬帮忙

Error Code 1: Cudnn (CUDNN_STATUS_EXECUTION_FAILED)
Traceback (most recent call last):
File "./tools/export.py", line 288, in
main(args)
File "./tools/export.py", line 249, in main
builder.create_engine(args.engine, args.precision, args.calib_input, args.calib_cache, args.calib_num_images,
File "./tools/export.py", line 242, in create_engine
with self.builder.build_engine(self.network, self.config) as engine, open(engine_path, "wb") as f:
AttributeError: enter

detect画面和游戏画面不同步

成功运行后, 识别的窗口显示的画面和游戏运行的画面不同步, 识别的窗口画面很慢

这是性能导致的吗?

麻烦作者查查这问题的原因

构建 YOLOV6 的 TensorRT 文件 出现了这个错误

构建 YOLOV6 的 TensorRT 文件 出现了这个错误

Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.

我找了pip install onnx-simplifier的方法也还是不行

导入错误ImportError: lap requires numpy

按照所有配置好环境以后,运行main.py报错 ModuleNotFoundError: No module named 'lap'
接着尝试pip install lap ,但是一直安装失败,提示 ImportError: lap requires numpy, please "pip install numpy".
可是numpy早就装上了,pip list里也能看到,接着换了几个版本的numpy都不行,系统win11,cuda11,7,torch 1.13.1
百度也搜不到解决的方法

部署完成后识别道路不准确

请教下部署完,成功运行以后,到游戏里就是一直在乱开,和视频上的对比了一下,为啥识别道路一直在跳动。为什么会这样呢。
还有就是CPU一直满载运行这正常吗。

image
image

关于bevmap比例问题

bevmap的比例尺是多少呢?如下代码所定义,bevmap是一个600x800的numpy数组,但单位好像并不是m。
bevmap = np.ones((600, 800)) * 75
我打印出检测到的汽车,其宽为8,长为20,如果单位是m,显然与事实不符,0.2m似乎更合理些。
image
所以,请问一下有具体的比例尺吗?

关于检测视频流崩溃的问题。

up您好,我在检测其他视频流时,会有崩溃情况,具体触发条件不详,但对于搞分辨率视频流(1920*1080)大概率崩溃,720P视频流小概率崩溃,在调整视频窗口大小和遇到一些复杂场景(车道+道路场景复杂)时也会崩溃,请问是什么原因呢?
以下为崩溃截图和报错代码:
Snipaste_2023-04-25_11-24-18

D:\anaconda\envs\ADAS\python.exe D:/Project/Self-driving-Truck-in-Euro-Truck-Simulator2-main/script/main.py
[04/25/2023-11:16:48] [TRT] [W] TensorRT was linked against cuDNN 8.6.0 but loaded cuDNN 8.5.0
[04/25/2023-11:16:48] [TRT] [W] TensorRT was linked against cuDNN 8.6.0 but loaded cuDNN 8.5.0
[04/25/2023-11:16:48] [TRT] [W] CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See CUDA_MODULE_LOADING in https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#env-vars
Traceback (most recent call last):
File "D:\anaconda\envs\ADAS\lib\site-packages\skfuzzy\control\controlsystem.py", line 586, in defuzz
return defuzz(ups_universe, output_mf,
File "D:\anaconda\envs\ADAS\lib\site-packages\skfuzzy\defuzzify\defuzz.py", line 248, in defuzz
assert not zero_truth_degree, 'Total area is zero in defuzzification!'
AssertionError: Total area is zero in defuzzification!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:/Project/Self-driving-Truck-in-Euro-Truck-Simulator2-main/script/main.py", line 234, in
acc, ang = Follow(cipv, vertical_fuzzy, horizontal_pid, nav_line)
File "D:\Project\Self-driving-Truck-in-Euro-Truck-Simulator2-main\Planning\Follow.py", line 17, in Follow
acc = fuzzy_compute(vertical_fuzzy, dspeed, distance)
File "D:\Project\Self-driving-Truck-in-Euro-Truck-Simulator2-main\Control\controllers\fuzzy_controller.py", line 108, in fuzzy_compute
fuzzy_system.compute()
File "D:\anaconda\envs\ADAS\lib\site-packages\skfuzzy\control\controlsystem.py", line 373, in compute
CrispValueCalculator(consequent, self).defuzz()
File "D:\anaconda\envs\ADAS\lib\site-packages\skfuzzy\control\controlsystem.py", line 589, in defuzz
raise ValueError("Crisp output cannot be calculated, likely "
ValueError: Crisp output cannot be calculated, likely because the system is too sparse. Check to make sure this set of input values will activate at least one connected Term in each Antecedent via the current set of Rules.

Process finished with exit code 1

An error about engine file

I used the yolov6s_bdd_60.engine in releases to run the program, and got error:

[01/21/2023-01:16:43] [TRT] [W] CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See `CUDA_MODULE_LOADING` in https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#env-vars
[01/21/2023-01:16:44] [TRT] [E] 1: [stdArchiveReader.cpp::nvinfer1::rt::StdArchiveReader::StdArchiveReader::42] Error Code 1: Serialization (Serialization assertion stdVersionRead == serializationVersion failed.Version tag does not match. Note: Current Version: 232, Serialized Engine Version: 213)
[01/21/2023-01:16:44] [TRT] [E] 4: [runtime.cpp::nvinfer1::Runtime::deserializeCudaEngine::66] Error Code 4: Internal Error (Engine deserialization failed.)
Traceback (most recent call last):
  File "D:\autodrive\script\main.py", line 54, in <module>
    clrnet = CLRNet("D:/autodrive/Perception/LaneDetection/weights/llamas_dla34.engine")
  File "D:\autodrive/Perception\LaneDetection\clrnet_trt.py", line 75, in __init__
    self.context = self.engine.create_execution_context()
AttributeError: 'NoneType' object has no attribute 'create_execution_context'

After that, I tried to translate onnx file into engine file use the way in readme. But I got error again:

PS D:\autodrive> python tools/export.py -o .\yolov6s_bdd_60.onnx -e .\yolov6s_bdd_60.engine --end2end
Namespace(onnx='.\\yolov6s_bdd_60.onnx', engine='.\\yolov6s_bdd_60.engine', precision='fp16', verbose=False, workspace=1, calib_input=None, calib_cache='./calibration.cache', calib_num_images=5000, calib_batch_size=8, end2end=True, conf_thres=0.4, iou_thres=0.5, max_det=100)
[01/21/2023-01:22:16] [TRT] [I] [MemUsageChange] Init CUDA: CPU +233, GPU +0, now: CPU 5459, GPU 437 (MiB)
[01/21/2023-01:22:20] [TRT] [I] [MemUsageChange] Init builder kernel library: CPU +131, GPU +21, now: CPU 6051, GPU 458 (MiB)
[01/21/2023-01:22:20] [TRT] [W] CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See `CUDA_MODULE_LOADING` in https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#env-vars
D:\autodrive\tools\export.py:109: DeprecationWarning: Use set_memory_pool_limit instead.
  self.config.max_workspace_size = workspace * (2 ** 30)
[01/21/2023-01:22:20] [TRT] [W] onnx2trt_utils.cpp:377: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
Network Description
Input 'images' with shape (1, 3, 640, 640) and dtype DataType.FLOAT
Output 'outputs' with shape (1, 8400, 15) and dtype DataType.FLOAT
D:\autodrive\tools\export.py:143: DeprecationWarning: Use network created with NetworkDefinitionCreationFlag::EXPLICIT_BATCH flag instead.
  self.builder.max_batch_size = self.batch_size
[01/21/2023-01:22:20] [TRT] [F] Validation failed: score_activation}tion missing required fields: {
C:\_src\plugin\common\plugin.cpp:41

[01/21/2023-01:22:20] [TRT] [E] Unknown exception
Traceback (most recent call last):
  File "D:\autodrive\tools\export.py", line 288, in <module>
    main(args)
  File "D:\autodrive\tools\export.py", line 248, in main
    builder.create_network(args.onnx, args.end2end, args.conf_thres, args.iou_thres, args.max_det)
  File "D:\autodrive\tools\export.py", line 191, in create_network
    layer = self.network.add_plugin_v2([boxes.get_output(0), updated_scores.get_output(0)], nms_layer)
TypeError: add_plugin_v2(): incompatible function arguments. The following argument types are supported:
    1. (self: tensorrt.tensorrt.INetworkDefinition, inputs: List[tensorrt.tensorrt.ITensor], plugin: tensorrt.tensorrt.IPluginV2) -> tensorrt.tensorrt.IPluginV2Layer

Invoked with: <tensorrt.tensorrt.INetworkDefinition object at 0x0000021DC887E170>, [<tensorrt.tensorrt.ITensor object at 0x0000021DC87DF230>, <tensorrt.tensorrt.ITensor object at 0x0000021DC87C38B0>], None

How can I fix it?

Help! 安装时nvidia-index时报错

大佬help! nvidia-index和polygraphy安装都报错。
安装时nvidia-index时报错,提示如下:
pip install nvidia-pyindex
Collecting nvidia-pyindex
Using cached nvidia-pyindex-1.0.9.tar.gz (10 kB)
Preparing metadata (setup.py) ... done
Building wheels for collected packages: nvidia-pyindex
Building wheel for nvidia-pyindex (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [90 lines of output]
c:\program files\python39\lib\site-packages\setuptools_init_.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
!!

          ********************************************************************************
          Requirements should be satisfied by a PEP 517 installer.
          If you are using pip, you can try `pip install --use-pep517`.
          ********************************************************************************
 
  !!
    dist.fetch_build_eggs(dist.setup_requires)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib
  creating build\lib\nvidia_pyindex
  copying nvidia_pyindex\cmdline.py -> build\lib\nvidia_pyindex
  copying nvidia_pyindex\utils.py -> build\lib\nvidia_pyindex
  copying nvidia_pyindex\__init__.py -> build\lib\nvidia_pyindex
  running egg_info
  writing nvidia_pyindex.egg-info\PKG-INFO
  writing dependency_links to nvidia_pyindex.egg-info\dependency_links.txt
  writing entry points to nvidia_pyindex.egg-info\entry_points.txt
  writing top-level names to nvidia_pyindex.egg-info\top_level.txt
  reading manifest file 'nvidia_pyindex.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  adding license file 'LICENSE.md'
  writing manifest file 'nvidia_pyindex.egg-info\SOURCES.txt'
  c:\program files\python39\lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
  !!
 
          ********************************************************************************
          Please avoid running ``setup.py`` directly.
          Instead, use pypa/build, pypa/installer, pypa/build or
          other standards-based tools.
 
          See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
          ********************************************************************************
 
  !!
    self.initialize_options()
  installing to build\bdist.win-amd64\wheel
  running install
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  COMMAND: InstallCommand
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  Traceback (most recent call last):
    File "C:\Users\Administrator\AppData\Local\Temp\pip-install-qxwp8kkc\nvidia-pyindex_2106c4fe88e545b0be405f66204e06b2\nvidia_pyindex\utils.py", line 20, in get_configuration_files
      output = subprocess.check_output(command, stderr=subprocess.STDOUT)
    File "c:\program files\python39\lib\subprocess.py", line 424, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    File "c:\program files\python39\lib\subprocess.py", line 528, in run
      raise CalledProcessError(retcode, process.args,
  subprocess.CalledProcessError: Command '['c:\\program files\\python39\\python.exe', 'filespython39python.exe', '-c', 'from pip._internal.configuration import get_configuration_files; print(get_configuration_files())']' returned non-zero exit 

status 2.

  The above exception was the direct cause of the following exception:
 
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\Administrator\AppData\Local\Temp\pip-install-qxwp8kkc\nvidia-pyindex_2106c4fe88e545b0be405f66204e06b2\setup.py", line 238, in <module>
      setup(
    File "c:\program files\python39\lib\site-packages\setuptools\__init__.py", line 107, in setup 
      return distutils.core.setup(**attrs)
    File "c:\program files\python39\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
    File "c:\program files\python39\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "c:\program files\python39\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "c:\program files\python39\lib\site-packages\setuptools\dist.py", line 1244, in run_command
      super().run_command(command)
    File "c:\program files\python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "c:\program files\python39\lib\site-packages\wheel\bdist_wheel.py", line 378, in run
      self.run_command("install")
    File "c:\program files\python39\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "c:\program files\python39\lib\site-packages\setuptools\dist.py", line 1244, in run_command
      super().run_command(command)
    File "c:\program files\python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\Administrator\AppData\Local\Temp\pip-install-qxwp8kkc\nvidia-pyindex_2106c4fe88e545b0be405f66204e06b2\setup.py", line 172, in run
      _install_nvidia_pypi_index()
    File "C:\Users\Administrator\AppData\Local\Temp\pip-install-qxwp8kkc\nvidia-pyindex_2106c4fe88e545b0be405f66204e06b2\setup.py", line 71, in _install_nvidia_pypi_index
      config_filedict = get_configuration_files()
    File "C:\Users\Administrator\AppData\Local\Temp\pip-install-qxwp8kkc\nvidia-pyindex_2106c4fe88e545b0be405f66204e06b2\nvidia_pyindex\utils.py", line 24, in get_configuration_files
      raise RuntimeError(output) from e
  RuntimeError: c:\program files\python39\python.exe: can't open file 'C:\Users\Administrator\AppData\Local\Temp\pip-install-qxwp8kkc\nvidia-pyindex_2106c4fe88e545b0be405f66204e06b2\filespython39python.exe': [Errno 2] No such file or directory 
 
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for nvidia-pyindex
Running setup.py clean for nvidia-pyindex
Failed to build nvidia-pyindex
ERROR: Could not build wheels for nvidia-pyindex, which is required to install pyproject.toml-based projects

关于pip配置环境的一点心得

奋战了整整一个晚上,终于运行起来了,下面来讲讲pip配置虚拟环境遇到的一些坑,也希望能帮到后来下载项目的同学们:
cuda和pytorch、torchvision:我用的分别为11.7和1.13.1和0.14.1,显卡3060ti,一开始装的项目推荐配置cuda10.2,结果运行时cuda提示算力不匹配,可以去nivdia官网或者直接百度一下你的显卡型号对应算力,不过这里可以直接装11.0以上版本,11.0以上增加了对新显卡算力的支持。
nvidia-pyindex,polygraphy安装失败,这里我是pip版本问题,更新到最新pip(23.1)反而无法安装,最后降级20.1后安装成功
lap安装失败,这里卡了半天,网上搜到的解决方法都不管用,一是用conda安装(我pip虚拟环境都配到这了要从头来?)二是pip从git上拉取安装,我科学上网也面临连接失败后,想到了一个方法,直接复制项目地址从git上克隆到本地,然后按照里面的readme本地构建安装。虚拟环境下cd进入lap文件夹,运行两行命令:

python setup.py build
python setup.py install

然后就能安装上了,亲测有效
然后基本就能愉快玩耍哩>=<

模型似乎很喜欢应急车道

当程序运行时,纵向控制的预测点总是位于车辆最右侧,所以总是被横向控制拉过去
ADE(XRC8W_K2S7L8IIE S6L
但是并不会撞墙,并且会在应急车道中稳定行驶
OJ HPA%KGVQ)RY AF${(1
想请教一下解决方法

车道线后处理那块不是很理解,希望得到帮助

def bev_lane(lanes, CAM, lines_cls, vanish_point):
    # CAM.update_intrinsic(vanish_point)  #根据灭点坐标的相机外参修正
    bev_lanes = []
    for i in range(len(lanes)):
        if len(lanes[i]) < 10:  # 过滤点数小于10的线
            continue
        bev_lane_pts = []
        bev_xy = [] # 拟合前
        for pt in lanes[i]:
            pt = list(pt)
            pt[1] = 720 - pt[1] #为什么要-pt[1]?
            bev_pt = CAM.pixel_to_world(pt).tolist() #像素坐标系转世界坐标系,为什么纵是X轴,横是Y轴?
            if 470 - bev_pt[0][1]/2 <= 250 or 470 - bev_pt[0][1]/2 >= 500:  #这段代码的作用?
                continue
            bev_xy.append([int(bev_pt[0][0]/5)+400, 470 - int(bev_pt[0][1]/1.8)]) #这段代码不是很理解
        bev_xy = np.array(bev_xy).T
        fit = np.polyfit(bev_xy[:][1], bev_xy[:][0], 3)  # 三次函数拟合
        bev_y = np.linspace(250, 470, 20)  # 为了减少计算量,采样点减少为20个
        bev_x = fit[0] * bev_y ** 3 + fit[1] * bev_y ** 2 + fit[2] * bev_y + fit[3]
        for j in range(20):
            if np.abs(bev_x[j]-400) >= 60: continue #这段代码的作用
            bev_lane_pts.append((int(bev_x[j]), int(bev_y[j])))
        if len(bev_lane_pts) >= 1: # 之前过滤了一次距离,可能全过滤掉了
            bev_line = Bev_Lane(lines_cls[i], 5, fit, bev_lane_pts[-1], bev_lane_pts[0], bev_lane_pts)  # 封装bev车道线信息
            bev_lanes.append(bev_line)
    return bev_lanes

另外我想问下,这个bev_lanes 名称的含义是什么,指的是在bev图上的lanes吗?另外我想知道相机内参 self.T = [0, 0, 300] # 机身坐标与地面坐标间的平移向量,这个300指的是300mm吗,也就是在z轴平移了300mm?

關於迥旋重疊路線問題

導航地圖中有迥旋重疊路線,方向會導致錯誤應該怎樣解決?
例如下面圖像中,行駛到交叉線時候,車輛會轉左邊行駛,而不是直去

未命名

第一遍用cuda10.2不成功,改用cuda11.7遇到了这样的问题

在构建 YOLOV6 的 TensorRT 文件时报错如下:

python ./tools/export.py -o ./engines/yolov6s_bdd_60.onnx -e ./engines/yolov6s_bdd_60.engine --end2end
Traceback (most recent call last):
File "./tools/export.py", line 7, in
import tensorrt as trt
File "E:\python\lib\site-packages\tensorrt_init_.py", line 129, in
ctypes.CDLL(find_lib(lib))
File "E:\python\lib\site-packages\tensorrt_init_.py", line 93, in find_lib
raise FileNotFoundError(
FileNotFoundError: Could not find: cublas64_10.dll. Is it on your PATH?
Note: Paths searched were:
['C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\libnvvp', 'E:\python\Scripts\', 'E:\python\', 'C:\Windows\system32', 'C:\Windows', 'C:\Windows\System32\Wbem', 'C:\Windows\System32\WindowsPowerShell\v1.0\', 'C:\Windows\System32\OpenSSH\', 'F:\Program Files\Polyspace\R2021a\runtime\win64', 'F:\Program Files\Polyspace\R2021a\bin', 'F:\Program Files\Polyspace\R2021a\polyspace\bin', 'F:\git\Git\cmd', 'C:\Program Files (x86)\GnuWin32\bin', 'C:\Program Files\CMake\bin', 'C:\WINDOWS\system32', 'C:\WINDOWS', 'C:\WINDOWS\System32\Wbem', 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\', 'C:\WINDOWS\System32\OpenSSH\', 'F:\epic\Epic Games\UE_4.24\Engine\Binaries\Win64', 'F:\7ZIP\7-Zip', 'C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common', 'C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR', 'C:\Program Files\NVIDIA Corporation\Nsight Compute 2022.2.0\', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\lib', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\include', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\libnvvp', 'E:\tensorrt\TensorRT-8.4.2.4.Windows10.x86_64.cuda-11.6.cudnn8.4\TensorRT-8.4.2.4\lib', 'E:\cudnn\cudnn-windows-x86_64-8.7.0.84_cuda11-archive\bin', 'E:\tensorrt\TensorRT-8.4.2.4.Windows10.x86_64.cuda-11.6.cudnn8.4\TensorRT-8.4.2.4\bin', 'C:\Users\student\AppData\Local\Microsoft\WindowsApps', '', 'F:\vscode\Microsoft VS Code\bin', 'F:\banzip\']
PS D:\ETSAuto\ETSAuto-1.1>

但是构建 CLRNet 的 TensorRT 文件没有报错

构建 环境感知 的 TensorRT 文件依旧报相同的错

PS D:\ETSAuto\ETSAuto-1.1> python ./tools/onnx2trt.py
Traceback (most recent call last):
File "./tools/onnx2trt.py", line 2, in
import tensorrt as trt
File "E:\python\lib\site-packages\tensorrt_init_.py", line 129, in
ctypes.CDLL(find_lib(lib))
File "E:\python\lib\site-packages\tensorrt_init_.py", line 93, in find_lib
raise FileNotFoundError(
FileNotFoundError: Could not find: cublas64_10.dll. Is it on your PATH?
Note: Paths searched were:
['C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\libnvvp', 'E:\python\Scripts\', 'E:\python\', 'C:\Windows\system32', 'C:\Windows', 'C:\Windows\System32\Wbem', 'C:\Windows\System32\WindowsPowerShell\v1.0\', 'C:\Windows\System32\OpenSSH\', 'F:\Program Files\Polyspace\R2021a\runtime\win64', 'F:\Program Files\Polyspace\R2021a\bin', 'F:\Program Files\Polyspace\R2021a\polyspace\bin', 'F:\git\Git\cmd', 'C:\Program Files (x86)\GnuWin32\bin', 'C:\Program Files\CMake\bin', 'C:\WINDOWS\system32', 'C:\WINDOWS', 'C:\WINDOWS\System32\Wbem', 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\', 'C:\WINDOWS\System32\OpenSSH\', 'F:\epic\Epic Games\UE_4.24\Engine\Binaries\Win64', 'F:\7ZIP\7-Zip', 'C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common', 'C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR', 'C:\Program Files\NVIDIA Corporation\Nsight Compute 2022.2.0\', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\lib', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\include', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\libnvvp', 'E:\tensorrt\TensorRT-8.4.2.4.Windows10.x86_64.cuda-11.6.cudnn8.4\TensorRT-8.4.2.4\lib', 'E:\cudnn\cudnn-windows-x86_64-8.7.0.84_cuda11-archive\bin', 'E:\tensorrt\TensorRT-8.4.2.4.Windows10.x86_64.cuda-11.6.cudnn8.4\TensorRT-8.4.2.4\bin', 'C:\Users\student\AppData\Local\Microsoft\WindowsApps', '', 'F:\vscode\Microsoft VS Code\bin', 'F:\banzip\']

导航路线获取

你好,我想请问一下,在游戏里在地图上选择一个目的地之后,导航会规划出来一条路线,我想要获取这个规划好的路线点信息,有办法吗?就是相当于导出导航规划好的路径

构建 CLRNet 的 TensorRT 文件时报错

已成功生成llamas_dla34_tmp.onnx文件,但在构建engine文件时出错,报错如下:
[03/29/2023-16:55:56] [E] [TRT] ModelImporter.cpp:776: --- End node ---
[03/29/2023-16:55:56] [E] [TRT] ModelImporter.cpp:779: ERROR: ModelImporter.cpp:180 In function parseGraph:
[6] Invalid Node - Pad_237
[shuffleNode.cpp::nvinfer1::builder::ShuffleNode::symbolicExecute::392] Error Code 4: Internal Error (Reshape_226: IShuffleLayer applied to shape tensor must have 0 or 1 reshape dimensi
ons: dimensions were [-1,2])
[03/29/2023-16:55:56] [E] Failed to parse onnx file
[03/29/2023-16:55:56] [I] Finish parsing network model
[03/29/2023-16:55:56] [E] Parsing model failed
[03/29/2023-16:55:56] [E] Failed to create engine from model or file.
[03/29/2023-16:55:56] [E] Engine set up failed
&&&& FAILED TensorRT.trtexec [TensorRT v8402] # trtexec --onnx=./engines/llamas_dla34_tmp.onnx --saveEngine=./engines/llamas_dla34.engine

构建 CLRNet 的 TensorRT 文件

輸入polygraphy surgeon sanitize 路徑\engines\llamas_dla34.onnx --fold-constants --output 路徑\engines\llamas_dla34_tmp.onnx trtexec --onnx=路徑\engines\llamas_dla34_tmp.onnx --saveEngine=路徑\engines\llamas_dla34.engine

顯示polygraphy : 無法辨識 'polygraphy' 詞彙是否為 Cmdlet、函數、指令檔或可執行程式的名稱。請檢查名稱拼字是否正確,如果包含路徑的
話,請確認路徑是否正確,然後再試一次。
位於 線路:1 字元:1

  • polygraphy surgeon sanitize F:\auto\ETSAuto-1.1\ETSAuto-1.1\engines\l ...
  •   + CategoryInfo          : ObjectNotFound: (polygraphy:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
      
      請問哪裡沒設定好?
    

如何将2D框转到bev视角?

看到作者2D框转到bev视角后,框的尺寸似乎没有发生形变?好像相关代码里也没有对这块进行深度估计,想问是如何实现的

The engine plan file has a layer that utilizes loop API or boolean tensors, but the current platform does not support these layers due to mismatch of libnvrtc version.

[01/24/2023-00:50:48] [TRT] [E] 9: The engine plan file has a layer that utilizes loop API or boolean tensors, but the current platform does not support these layers due to mismatch of libnvrtc version.
[01/24/2023-00:50:48] [TRT] [E] 1: [engine.cpp::nvinfer1::rt::Engine::deserialize::762] Error Code 1: Serialization (Serialization assertion postDeserializationCheck() failed.Post deserialization check failure)
[01/24/2023-00:50:48] [TRT] [E] 4: [runtime.cpp::nvinfer1::Runtime::deserializeCudaEngine::50] Error Code 4: Internal Error (Engine deserialization failed.)
Traceback (most recent call last):
File "D:\autodrive\script\main.py", line 54, in
clrnet = CLRNet("D:/autodrive/Perception/LaneDetection/weights/llamas_dla34.engine")
File "D:\autodrive/Perception\LaneDetection\clrnet_trt.py", line 75, in init
self.context = self.engine.create_execution_context()
AttributeError: 'NoneType' object has no attribute 'create_execution_context'

TensorRT 版本 8.4.3.1,CUDA 版本 10.2
请教大佬们如何解决此问题。万分感激。

与前车距离过近时报错

Crisp output cannot be calculated, likely because the system is too sparse. Check to make sure this set of input values will activate at least one connected Term in each Antecedent via the current set of Rules.
AssertionError: Total area is zero in defuzzification!

During handling of the above exception, another exception occurred:

File "xxx\Self-driving-Truck-in-Euro-Truck-Simulator2\Control\controllers\fuzzy_controller.py", line 108, in fuzzy_compute
fuzzy_system.compute()
File "xxx\Self-driving-Truck-in-Euro-Truck-Simulator2\Planning\Follow.py", line 17, in Follow
acc = fuzzy_compute(vertical_fuzzy, dspeed, distance)
File "xxx\Self-driving-Truck-in-Euro-Truck-Simulator2\script\main.py", line 182, in
acc, ang = Follow(cipv, vertical_fuzzy, horizontal_pid, nav_line)
ValueError: Crisp output cannot be calculated, likely because the system is too sparse. Check to make sure this set of input values will activate at least one connected Term in each Antecedent via the current set of Rules.

Linux下VJoy和pyvjoy的替代问题

作者您好,当我调试到最后一步的时候,发现pyvjoy使用from ctypes import wintypes,使用的都是Windows上的API,所以项目无法在Linux上运行,请问您知道Linux上有什么vjoy的替代品么?或者可以使用什么其他方法(比如键盘直接输入)进行控制么?

關於ETSAuto 2.0dev 橫向移動問題

我用了1.0的项目转向基本上没有问题,但是用了2.0的项目,转向弯道转不了,我已经把游戏控制设置转向调整到最高了,还是没有解决问题
圖片_2023-08-15_172412551

分享:我部署时遇到的问题和解决方法,望能够帮到其他伙伴

  • 看到作者有更新,我脑子一热:一定要捣鼓出来!
    • 于是:昨晚通宵了……
      • 自动驾驶
        • 我用到的版本:
          • Miniconda3 py38_23.1.0-1 (Python 3.8.16 64-bit)
          • CUDA:11.7
          • cudnn:8.7
          • TensorRT:8.4.2.4(TensorRT 8.4 GA Update 1)
          • 版本不太建议选太高
          • 如果你有时间去重新来过可以试试
          • 我在选11.8、8.8、8.6后
          • 做到中途查看 PyTorch 是否为 cuda 版本结果是false
          • onnx 1.13.1 requires protobuf<4,>=3.20.2
          • paddlepaddle 2.4.2 requires protobuf<=3.20.0,>=3.1.0
          • 于是……通宵就开始了……
        • 注意:
          • 几个依赖包的安装
          • python -m pip install torch --extra-index-url https://download.pytorch.org/whl/cu117 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
          • python -m pip install numpy<1.24 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
          • tensorrt安装是在自己的tensorrt文件夹里的,按照自己的实际情况修改路径
          • python -m pip install D:\Files\TensorRT\python\tensorrt-8.4.2.4-cp38-none-win_amd64.whl
          • python -m pip install numpy<1.24 lap
          • ★★★出现lap安装不上
          • 安装依赖包
          • 在项目根目录(也就是作者ETSAuto文件夹)下运行以下命令
          • python -m pip install D:\Files\TensorRT\python\tensorrt-8.4.2.4-cp38-none-win_amd64.whl
          • python -m pip install -r requirements_cu117.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
          • ★★★出现pycuda安装不了wheel,手动安装pycuda
          • 避免后续出错,我重新执行了requirements_cu117.txt的安装
          • python -m pip install -r requirements_cu117.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
          • python -m pip uninstall -y opencv-python-headless
          • python -m pip install -r last_requirements.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
          • 查看 PyTorch 是否为 cuda 版本
          • python
          • import torch
          • torch.cuda.is_available()
          • True
          • 安装好vJoy
          • 打开Configure vJoy
          • enable就好
          • 安装mod
          • Google Maps Navigation Night Version
          • SISL's Route Adviser
          • 设置游戏
          • 选项 - 图像,取消全屏模式,分辨率设置为 1360x768
          • 选项 - 控制,选择 键盘 + vJoy Device
          • 把游戏窗口移动到合适的位置
          • 我的是左上角一些
          • 设置脚本
          • title_bar_height设为游戏窗口的标题栏高度
          • 我没找到在哪里
          • 在在项目根目录(也就是作者ETSAuto文件夹)的地址栏输入powershell
          • 回车
          • ★★★出现ModuleNotFoundError: No module named 'cv2'
            • 解决方法查找
            • https://blog.csdn.net/qq_44789949/article/details/129902468
            • pip uninstall numpy
            • pip uninstall opencv-python
            • pip uninstall opencv-contrib-python
            • pip install numpy
            • pip install opencv-python
            • pip install opencv-contrib-python
            • 直接在使用到import cv2的python文件中导入此包
            • 这步我没明白,但此时已经成功
            • 已经出现【cv2】文件夹
            • 我的路径:D:\Files\miniconda\Lib\site-packages\cv2
          • 在在项目根目录(也就是作者ETSAuto文件夹)的地址栏输入powershell
          • 回车
          • 在powershell里输入:python script/main.py
          • 回车
          • 出现侦测窗口
          • 退出自动驾驶
          • 地图和速度侦测窗口单独提取
          • 用编辑器打开main.py文件
          • 在nav_line, curve_speed_limit = nav_process(navmap, truck, info, cipv)下
          • 添加:cv2.imshow('navmap', navmap)
          • 在speed_limit = curve_speed_limit下
          • 添加:cv2.imshow('speed_bar', bar)
          • 非常感谢网友:shogun_xjtu
          • 他指导了我很多,这个方法也是他教我的
          • 我成功运行后也是第一个给他发消息
          • 也建议作者加入这条在readme里,这样方便调节游戏窗口位置
          • 重复
          • 在在项目根目录(也就是作者ETSAuto文件夹)的地址栏输入powershell
          • 回车
          • 在powershell里输入:python script/main.py
          • 回车
          • 出现侦测窗口
          • all + tab
          • 找到【navmap】和【speed bar】放到合适的位置
          • 我放到侦测窗口的下方
          • 进游戏后开到路上
          • 切换到前车视角
          • 把车开在右侧车道中间
          • 按F1暂停
          • 调节合适的游戏位置
          • 直到参考线、车道线、车速、导航都被识别到
          • 成功了
          • 也天亮了
          • 希望这分享能够帮到一些伙伴

  • 另外
    • 两个疑问
      • ①:如果我用顶部导航,侦测的位置数据我该改哪里?
        • (我用顶部导航很长时间了,看着舒服也不会挡住方向盘)
        • 希望得到作者的帮助
      • ②:为啥不用原版地图呢?是因为颜色侦测精准问题吗?

some suggestions

  • translate the README into Chinese.
  • use relative path instead of absolute path.

If you need, I can set up a PR to solve those problems.

Thanks for your reading!

询问能否在自己的项目中使用本项目的模型

作者您好,Self-driving-Truck-in-Euro-Truck-Simulator2是一个很棒的项目,我正在实现一个辅助驾驶功能的代码,我能否在自己的项目中使用本项目的模型权重以及部分推理代码,我将以MIT协议开源我自己的项目并表明模型来源,希望得到您的允许

无法正常转向的问题

问题描述:

  • 进入游戏后,可以前进后退停车,但无法转向
  • 初始方向盘若不为正,则会立刻摆正
  • 键盘控制仍然有效(笔记本键盘,带小键盘)

已经确定无误的:

  • vjoy虚拟手柄软件已经安装
  • 模组Google Maps Navigation Night Version和SISL's Route Adviser已经启用
  • 控制改为键盘+vjoy Device
  • 键盘键位设为默认
  • 程序正常识别
  • steam控制器设置中,所有控制器支持均打开

运行 yolo2trt

运行 2trt

  1. (self: tensorrt.tensorrt.INetworkDefinition, inputs: List[tensorrt.tensorrt.ITensor], plugin: tensorrt.tensorrt.IPluginV2) -> tensorrt.tensorrt.IPluginV2
    Layer
    换了 tensorrt 8.6版本后出现这个问题,如果依旧使用 tensorrt 8.4版本则会出现下面这样的问题:
    ltWrapper.cpp::nvinfer1::rt::CublasLtWrapper::setupHeuristic::339] Error Code 2: Internal Error (Assertion cublasStatus == CUBLAS_STATUS_SUCCESS failed. )

不知道什么问题有大佬帮忙看看吗?

base) D:\Self-driving-Truck-in-Euro-Truck-Simulator2-main>python ./tools/export.py -o ./engines/yolov6s_bdd_60.onnx -e ./engines/yolov6s_bdd_60.engine --end2end -p fp32
Namespace(calib_batch_size=8, calib_cache='./calibration.cache', calib_input=None, calib_num_images=5000, conf_thres=0.4, end2end=True, engine='./engines/yolov6s_bdd_60.engine', iou_thres=0.5, max_det=100, onnx='./engines/yolov6s_bdd_60.onnx', precision='fp32', verbose=False, workspace=1)
[03/16/2023-19:16:06] [TRT] [I] [MemUsageChange] Init CUDA: CPU +35, GPU +0, now: CPU 8247, GPU 1161 (MiB)
[03/16/2023-19:16:14] [TRT] [I] [MemUsageChange] Init builder kernel library: CPU -15, GPU +0, now: CPU 8280, GPU 1161 (MiB)
./tools/export.py:109: DeprecationWarning: Use set_memory_pool_limit instead.
self.config.max_workspace_size = workspace * (2 ** 30)
[03/16/2023-19:16:14] [TRT] [W] onnx2trt_utils.cpp:369: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
Network Description
Input 'images' with shape (1, 3, 640, 640) and dtype DataType.FLOAT
Output 'outputs' with shape (1, 8400, 15) and dtype DataType.FLOAT
./tools/export.py:143: DeprecationWarning: Use network created with NetworkDefinitionCreationFlag::EXPLICIT_BATCH flag instead.
self.builder.max_batch_size = self.batch_size
Building fp32 Engine in D:\Self-driving-Truck-in-Euro-Truck-Simulator2-main\engines\yolov6s_bdd_60.engine
./tools/export.py:242: DeprecationWarning: Use build_serialized_network instead.
with self.builder.build_engine(self.network, self.config) as engine, open(engine_path, "wb") as f:
[03/16/2023-19:17:21] [TRT] [I] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU -111, GPU +52, now: CPU 8185, GPU 1213 (MiB)
[03/16/2023-19:17:21] [TRT] [I] [MemUsageChange] Init cuDNN: CPU +1, GPU +10, now: CPU 8186, GPU 1223 (MiB)
[03/16/2023-19:17:21] [TRT] [I] Local timing cache in use. Profiling results in this builder pass will not be stored.
[03/16/2023-19:17:29] [TRT] [E] 1: [convolutionRunner.cpp::nvinfer1::rt::cuda::CudnnConvolutionRunner::executeConv::465] Error Code 1: Cudnn (CUDNN_STATUS_EXECUTION_FAILED)
Traceback (most recent call last):
File "./tools/export.py", line 288, in
main(args)
File "./tools/export.py", line 249, in main
builder.create_engine(args.engine, args.precision, args.calib_input, args.calib_cache, args.calib_num_images,
File "./tools/export.py", line 242, in create_engine
with self.builder.build_engine(self.network, self.config) as engine, open(engine_path, "wb") as f:
AttributeError: enter

补一个我遇到的问题的解决方法 希望可以帮到大家

问题1 polygraphy.exe不存在
解决方法:重新安装polygraphy
pip uninstall polygraphy -y
pip install polygraphy
image

问题2
Traceback (most recent call last):
File ".\script\main.py", line 207, in
cv2.imshow('detect', img_show)
cv2.error: OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1272: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'
解决方法:重新安装opencv-python
pip uninstall opencv-python-headless
pip uninstall opencv-python
pip uninstall opencv-python
image

安装过程问题求助

CUDA完成安装 环境报错

NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running. This can also be happening if non-NVIDIA GPU is running as primary display, and NVIDIA GPU is in WDDM mode.

尝试构建 YOLOV6 的 TensorRT 文件时发生错误

PS E:\ai\eu2\auto2\Self-driving-Truck-in-Euro-Truck-Simulator2> python3.8.exe .\tools\export.py -o .\engines\yolov6s_bdd_60.onnx -e .\engines\yolov6s_bdd_60.engine --end2end
Namespace(calib_batch_size=8, calib_cache='./calibration.cache', calib_input=None, calib_num_images=5000, conf_thres=0.4, end2end=True, engine='.\engines\yolov6s_bdd_60.engine', iou_thres=0.5, max_det=100, onnx='.\engines\yolov6s_bdd_60.onnx', precision='fp16', verbose=False, workspace=1)
[02/10/2023-02:36:49] [TRT] [I] [MemUsageChange] Init CUDA: CPU +223, GPU +0, now: CPU 11354, GPU 1385 (MiB)
[02/10/2023-02:36:50] [TRT] [I] [MemUsageChange] Init builder kernel library: CPU -40, GPU +2, now: CPU 11375, GPU 1387 (MiB)
.\tools\export.py:109: DeprecationWarning: Use set_memory_pool_limit instead.
self.config.max_workspace_size = workspace * (2 ** 30)
[02/10/2023-02:36:50] [TRT] [W] onnx2trt_utils.cpp:369: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.
Network Description
Input 'images' with shape (1, 3, 640, 640) and dtype DataType.FLOAT
Output 'outputs' with shape (1, 8400, 15) and dtype DataType.FLOAT
.\tools\export.py:143: DeprecationWarning: Use network created with NetworkDefinitionCreationFlag::EXPLICIT_BATCH flag instead.
self.builder.max_batch_size = self.batch_size
Building fp16 Engine in E:\ai\eu2\auto2\Self-driving-Truck-in-Euro-Truck-Simulator2\engines\yolov6s_bdd_60.engine
.\tools\export.py:242: DeprecationWarning: Use build_serialized_network instead.
with self.builder.build_engine(self.network, self.config) as engine, open(engine_path, "wb") as f:
[02/10/2023-02:36:50] [TRT] [I] [MemUsageChange] Init cuBLAS/cuBLASLt: CPU +158, GPU +50, now: CPU 11573, GPU 1437 (MiB)
[02/10/2023-02:36:51] [TRT] [I] [MemUsageChange] Init cuDNN: CPU +140, GPU +50, now: CPU 11713, GPU 1487 (MiB)
[02/10/2023-02:36:51] [TRT] [I] Local timing cache in use. Profiling results in this builder pass will not be stored.
[02/10/2023-02:37:39] [TRT] [E] 1: [convolutionRunner.cpp::nvinfer1::rt::task::CaskConvolutionRunner::execute::213] Error Code 1: Cask (Cask convolution execution)
Traceback (most recent call last):
File ".\tools\export.py", line 288, in
main(args)
File ".\tools\export.py", line 249, in main
builder.create_engine(args.engine, args.precision, args.calib_input, args.calib_cache, args.calib_num_images,
File ".\tools\export.py", line 242, in create_engine
with self.builder.build_engine(self.network, self.config) as engine, open(engine_path, "wb") as f:
AttributeError: enter
PS E:\ai\eu2\auto2\Self-driving-Truck-in-Euro-Truck-Simulator2>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.