yolov5_deepsort_tensorrt icon indicating copy to clipboard operation
yolov5_deepsort_tensorrt copied to clipboard

cannot open shared object file: No such file or directory

Open zgyknight9z opened this issue 3 years ago • 9 comments

Traceback (most recent call last): File "demo_trt.py", line 58, in ctypes.CDLL(PLUGIN_LIBRARY) File "/usr/lib/python3.6/ctypes/init.py", line 348, in init self._handle = _dlopen(self._name, mode) OSError: weights/libmyplugins.so: cannot open shared object file: No such file or directory

zgyknight9z avatar Oct 20 '21 01:10 zgyknight9z

I have uploaded this 'libmyplugins.so' file, please test again.

cong avatar Nov 24 '21 09:11 cong

I have uploaded this 'libmyplugins.so' file, please test again.

我也遇到了这个问题,libmyplugins.so已经下载了,路径也没问题,不知道是不是环境哪里有问题呢?

lencm avatar Dec 02 '21 02:12 lencm

I have uploaded this 'libmyplugins.so' file, please test again.

环境为Ubuntu18.04 with CUDA 10.2 and cuDNN 8.0.0 TensorRT jetpack自带 PyTorch 1.8.0 and TorchVision 0.9.0 OpenCV-Python 4.5 pycuda 2019.1

lencm avatar Dec 02 '21 03:12 lencm

I have uploaded this 'libmyplugins.so' file, please test again.

环境为Ubuntu18.04 with CUDA 10.2 and cuDNN 8.0.0 TensorRT jetpack自带 PyTorch 1.8.0 and TorchVision 0.9.0 OpenCV-Python 4.5 pycuda 2019.1

你在Jetson板子上运行的吧?libmyplugins.so得重新编译生成

cong avatar Dec 02 '21 03:12 cong

嗯嗯,使用自己生成的文件后跑通了。目前只能用CPU跑,速度在0.5fps,用CUDA的话会报错,单独测试cuda没问题,重装了pytorch还是不行。不知道哪里有问题 Traceback (most recent call last): File "demo_trt.py", line 60, in detect(video_path, engine_file_path) File "demo_trt.py", line 31, in detect bboxes = detector.detect(img) File "/home/nvidia/yolov5_deepsort_tensorrt/detector_trt.py", line 120, in detect results_trt= self.post_process_new(trt_outputs, origin_h, origin_w) File "/home/nvidia/yolov5_deepsort_tensorrt/detector_trt.py", line 255, in post_process_new pred = torch.Tensor(pred).cuda() File "/home/nvidia/.local/lib/python3.6/site-packages/torch/cuda/ini t.py", line 164, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled") AssertionError: Torch not compiled with CUDA enabled

lencm avatar Dec 02 '21 09:12 lencm

I have uploaded this 'libmyplugins.so' file, please test again.

环境为Ubuntu18.04 with CUDA 10.2 and cuDNN 8.0.0 TensorRT jetpack自带 PyTorch 1.8.0 and TorchVision 0.9.0 OpenCV-Python 4.5 pycuda 2019.1

你在Jetson板子上运行的吧?libmyplugins.so得重新编译生成

问题已解决,jetson有专用的pytorch和torchvision包,需要去nvidia官网安装。目前GPU已跑通,但是NX上的帧率是2fps左右,和您说的6fps有些差距,不知道是为什么,您能提供一些思路吗?

lencm avatar Dec 03 '21 00:12 lencm

I have uploaded this 'libmyplugins.so' file, please test again.

环境为Ubuntu18.04 with CUDA 10.2 and cuDNN 8.0.0 TensorRT jetpack自带 PyTorch 1.8.0 and TorchVision 0.9.0 OpenCV-Python 4.5 pycuda 2019.1

你在Jetson板子上运行的吧?libmyplugins.so得重新编译生成

问题已解决,jetson有专用的pytorch和torchvision包,需要去nvidia官网安装。目前GPU已跑通,但是NX上的帧率是2fps左右,和您说的6fps有些差距,不知道是为什么,您能提供一些思路吗?

目标的数量一定程度上会影响速度。我过几天有空会更新一版代码,可能会稍微提速一下,具体提升多少还没有空测试过。

cong avatar Dec 03 '21 01:12 cong

I have uploaded this 'libmyplugins.so' file, please test again.

环境为Ubuntu18.04 with CUDA 10.2 and cuDNN 8.0.0 TensorRT jetpack自带 PyTorch 1.8.0 and TorchVision 0.9.0 OpenCV-Python 4.5 pycuda 2019.1

你在Jetson板子上运行的吧?libmyplugins.so得重新编译生成

我也遇到同样的问题,非常好的项目,请问如何编译libmyplugins.so

43998213 avatar Dec 15 '21 10:12 43998213

I have uploaded this 'libmyplugins.so' file, please test again.

环境为Ubuntu18.04 with CUDA 10.2 and cuDNN 8.0.0 TensorRT jetpack自带 PyTorch 1.8.0 and TorchVision 0.9.0 OpenCV-Python 4.5 pycuda 2019.1

你在Jetson板子上运行的吧?libmyplugins.so得重新编译生成

我也遇到同样的问题,非常好的项目,请问如何编译libmyplugins.so

build tensorrtx / yolov5 and generate ***.engine

cd {tensorrtx}/yolov5/

update CLASS_NUM in yololayer.h if your model is trained on custom dataset

mkdir build cd build cp {ultralytics}/yolov5/yolov5s.wts {tensorrtx}/yolov5/build cmake .. make 没记错的话是这个编译完会有,按流程来就行

lencm avatar Dec 17 '21 07:12 lencm