Closed sunyuxiu closed 9 months ago
@sunyuxiu 输入的视频路径不对,使用绝对路径试一试
@sunyuxiu 输入的视频路径不对,使用绝对路径试一试
/data/soft/tensorrt-alpha/yolov5/build$ ./app_yolov5 --version=v570 --model=../../data/yolov5/best1.trt --size=640 --batch_size=8 --video=/data/soft/tensorrt-alpha/yolov5/build/1.mp4 --savePath=../ [02/28/2024-15:07:39] [I] model_path = ../../data/yolov5/best1.trt [02/28/2024-15:07:39] [I] size = 640 [02/28/2024-15:07:39] [I] batch_size = 8 [02/28/2024-15:07:39] [I] video_path = /data/soft/tensorrt-alpha/yolov5/build/1.mp4 [02/28/2024-15:07:39] [I] save_path = ../ [02/28/2024-15:07:39] [I] yolov5 version = v570 [02/28/2024-15:07:39] [E] read the input data errors! 绝对路径试过了,还是不行
@sunyuxiu 输入的视频路径不对,使用绝对路径试一试
/data/soft/tensorrt-alpha/yolov5/build$ ./app_yolov5 --version=v570 --model=../../data/yolov5/best1.trt --size=640 --batch_size=8 --video=/data/soft/tensorrt-alpha/yolov5/build/1.mp4 --savePath=../ [02/28/2024-15:07:39] [I] model_path = ../../data/yolov5/best1.trt [02/28/2024-15:07:39] [I] size = 640 [02/28/2024-15:07:39] [I] batch_size = 8 [02/28/2024-15:07:39] [I] video_path = /data/soft/tensorrt-alpha/yolov5/build/1.mp4 [02/28/2024-15:07:39] [I] save_path = ../ [02/28/2024-15:07:39] [I] yolov5 version = v570 [02/28/2024-15:07:39] [E] read the input data errors! 绝对路径试过了,还是不行
原因是没有读到视频文件,建议写个小程序测试下你当前路径是?
FeiYull @.***
------------------ Original ------------------ From: sunyuxiu @.> Date: Wed,Feb 28,2024 3:09 PM To: FeiYull/TensorRT-Alpha @.> Cc: FeiYull @.>, Comment @.> Subject: Re: [FeiYull/TensorRT-Alpha] read the input data errors! (Issue #88)
@sunyuxiu 输入的视频路径不对,使用绝对路径试一试
/data/soft/tensorrt-alpha/yolov5/build$ ./app_yolov5 --version=v570 --model=../../data/yolov5/best1.trt --size=640 --batch_size=8 --video=/data/soft/tensorrt-alpha/yolov5/build/1.mp4 --savePath=../ [02/28/2024-15:07:39] [I] model_path = ../../data/yolov5/best1.trt [02/28/2024-15:07:39] [I] size = 640 [02/28/2024-15:07:39] [I] batch_size = 8 [02/28/2024-15:07:39] [I] video_path = /data/soft/tensorrt-alpha/yolov5/build/1.mp4 [02/28/2024-15:07:39] [I] save_path = ../ [02/28/2024-15:07:39] [I] yolov5 version = v570 [02/28/2024-15:07:39] [E] read the input data errors! 绝对路径试过了,还是不行
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
我这是在ubuntu下,用pwd来查询和复制当前路径的
用图片测试也是,序号为1.jpg, 2.jpg, 3.jpg的时候,只有1.jpg和2.jpg可以测试出来,测试3.jpg就是显示read the input data errors!
所以,写个小程序读一下数据,可能是数据有问题
FeiYull @.***
------------------ Original ------------------ From: sunyuxiu @.> Date: Wed,Feb 28,2024 3:29 PM To: FeiYull/TensorRT-Alpha @.> Cc: FeiYull @.>, Comment @.> Subject: Re: [FeiYull/TensorRT-Alpha] read the input data errors! (Issue #88)
用图片测试也是,序号为1.jpg, 2.jpg, 3.jpg的时候,只有1.jpg和2.jpg可以测试出来,测试3.jpg就是显示read the input data errors!
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
我写了一个opencv程序,读取OK的,数据没问题
可以把数据发网盘,我试下
FeiYull @.***
------------------ Original ------------------ From: sunyuxiu @.> Date: Wed,Feb 28,2024 3:35 PM To: FeiYull/TensorRT-Alpha @.> Cc: FeiYull @.>, Comment @.> Subject: Re: [FeiYull/TensorRT-Alpha] read the input data errors! (Issue #88)
我写了一个opencv程序,读取OK的,数据没问题
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
@sunyuxiu 你把图片发过来就行了, -_-!!!!
@FeiYull 稍等
链接:https://pan.baidu.com/s/1DhUY-Vkk1e4gJXR4CCcHqw 提取码:vnik
/data/soft/tensorrt-alpha/yolov5/build$ ./app_yolov5 --version=v570 --model=../../data/yolov5/best1.trt --size=640 --batch_size=8 --img=9.jpg --savePath=../ [02/28/2024-16:11:13] [I] model_path = ../../data/yolov5/best1.trt [02/28/2024-16:11:13] [I] size = 640 [02/28/2024-16:11:13] [I] batch_size = 8 [02/28/2024-16:11:13] [I] image_path = 9.jpg [02/28/2024-16:11:13] [I] savepath = ../ [02/28/2024-16:11:13] [I] yolov5 version = v570 [ WARN:0@0.005] global loadsave.cpp:241 findDecoder imread('%01d.jpg'): can't open/read file: check file path/integrity [02/28/2024-16:11:13] [I] [TRT] Loaded engine size: 31 MiB [02/28/2024-16:11:13] [I] [TRT] [MemUsageChange] TensorRT-managed allocation in engine deserialization: CPU +0, GPU +29, now: CPU 0, GPU 29 (MiB) [02/28/2024-16:11:13] [I] [TRT] [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +270, now: CPU 0, GPU 299 (MiB) [02/28/2024-16:11:13] [E] [TRT] 3: [runtime.cpp::~Runtime::346] Error Code 3: API Usage Error (Parameter check failed at: runtime/rt/runtime.cpp::~Runtime::346, condition: mEngineCounter.use_count() == 1. Destroying a runtime before destroying deserialized engines created by the runtime leads to undefined behavior. ) [02/28/2024-16:11:13] [I] the engine's info: [02/28/2024-16:11:13] [I] idx = 0, images: -1, 3, 640, 640, [02/28/2024-16:11:13] [I] idx = 1, output0: -1, 25200, 6, [02/28/2024-16:11:13] [I] the context's info: [02/28/2024-16:11:13] [I] idx = 0, images: 1, 3, 640, 640, [02/28/2024-16:11:13] [I] idx = 1, output0: 1, 25200, 6, [02/28/2024-16:11:13] [I] 1 [02/28/2024-16:11:13] [E] [TRT] 1: [caskUtils.cpp::createCaskHardwareInfo::852] Error Code 1: Cuda Runtime (an illegal memory access was encountered) Segmentation fault (core dumped) 测试最后一张图片的时候就报这个错
/data/soft/tensorrt-alpha/yolov5/build$ ./app_yolov5 --version=v570 --model=../../data/yolov5/best1.trt --size=640 --batch_size=8 --img=9.jpg --savePath=../ [02/28/2024-16:11:13] [I] model_path = ../../data/yolov5/best1.trt [02/28/2024-16:11:13] [I] size = 640 [02/28/2024-16:11:13] [I] batch_size = 8 [02/28/2024-16:11:13] [I] image_path = 9.jpg [02/28/2024-16:11:13] [I] savepath = ../ [02/28/2024-16:11:13] [I] yolov5 version = v570 [ WARN:0@0.005] global loadsave.cpp:241 findDecoder imread('%01d.jpg'): can't open/read file: check file path/integrity [02/28/2024-16:11:13] [I] [TRT] Loaded engine size: 31 MiB [02/28/2024-16:11:13] [I] [TRT] [MemUsageChange] TensorRT-managed allocation in engine deserialization: CPU +0, GPU +29, now: CPU 0, GPU 29 (MiB) [02/28/2024-16:11:13] [I] [TRT] [MemUsageChange] TensorRT-managed allocation in IExecutionContext creation: CPU +0, GPU +270, now: CPU 0, GPU 299 (MiB) [02/28/2024-16:11:13] [E] [TRT] 3: [runtime.cpp::~Runtime::346] Error Code 3: API Usage Error (Parameter check failed at: runtime/rt/runtime.cpp::~Runtime::346, condition: mEngineCounter.use_count() == 1. Destroying a runtime before destroying deserialized engines created by the runtime leads to undefined behavior. ) [02/28/2024-16:11:13] [I] the engine's info: [02/28/2024-16:11:13] [I] idx = 0, images: -1, 3, 640, 640, [02/28/2024-16:11:13] [I] idx = 1, output0: -1, 25200, 6, [02/28/2024-16:11:13] [I] the context's info: [02/28/2024-16:11:13] [I] idx = 0, images: 1, 3, 640, 640, [02/28/2024-16:11:13] [I] idx = 1, output0: 1, 25200, 6, [02/28/2024-16:11:13] [I] 1 [02/28/2024-16:11:13] [E] [TRT] 1: [caskUtils.cpp::createCaskHardwareInfo::852] Error Code 1: Cuda Runtime (an illegal memory access was encountered) Segmentation fault (core dumped) 测试最后一张图片的时候就报这个错
测试1-8.jpg的时候就没问题,测试最后一张9.jpg的时候就报错,然后添加一张10.jpg的话,9.jpg就没问题,10.jpg就会报上面的错,1-9.jpg都是在当前路径下,相对路径
@sunyuxiu 你给的图片,都可以正常推理(v5n小模型误检不用管),你用的tensorrt8.4?
@FeiYull tensorrt8.6
@FeiYull 你测试一下最后一张9.jpg
@sunyuxiu 测视频(yolov5n)效果也正常
@sunyuxiu 最后也正常
@sunyuxiu Q 732369616
@FeiYull 加过了,麻烦通过下
多谢@FeiYull 的解答,大概找到问题了,测试图片没问题,测试视频的时候一直找不到data,分析可能的原因是因为没有安装ffmpeg,现在安装下,等安装完再测试下再来反馈,再次感谢
踩坑纪录:可以读取到图片,但是读取不到视频的原因可能是没有安装ffmpeg,后来安装了ffmpeg后就可以读取、处理视频了(这里系统的opencv需要4.9版本的,我因为安装了3.x版本的,后来make的时候提示需要将opencv改为4.9版本,于是又改为了4.9版本,现在已经正常读取、识别了)
“read the input data errors!” in ubuntu if the input is video or sometime in picture. As show! tensorrt-alpha/yolov5/build$ ./app_yolov5 --version=v570 --model=../../data/yolov5/best1.trt --size=640 --batch_size=8 --video=1.mp4 --savePath=../ [02/28/2024-11:35:36] [I] model_path = ../../data/yolov5/best1.trt [02/28/2024-11:35:36] [I] size = 640 [02/28/2024-11:35:36] [I] batch_size = 8 [02/28/2024-11:35:36] [I] video_path = 1.mp4 [02/28/2024-11:35:36] [I] save_path = ../ [02/28/2024-11:35:36] [I] yolov5 version = v570 [02/28/2024-11:35:36] [E] read the input data errors!