一、tensorrtx

编译步骤:

mkdir build
cd build
cmake ..
make                         // /workspace/tensorrt_release/include# cp -r NvInfer.h /usr/local/include/tensorrt/ ***
sudo ./yolov5 -s             // serialize model to plan file i.e. 'yolov5s.engine'
sudo ./yolov5 -d  ../samples // deserialize plan file and run inference, the images in samples will be processed.

make时遇到问题:

CMake Error: The current CMakeCache.txt directory /workspace/tensorrtx/yolov5/build/CMakeCache.txt is different than the directory /home/zbsj2/projects/deploy/tensorrtx/yolov5/build where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt

CMakeCache.txt之前编译时留下的缓存,应该把build删掉重新mdir build 编译。

二、tensorrtx

make时:

/workspace/tensorrtx/yolov5/yololayer.h:6:10: fatal error: NvInfer.h: No such file or directory
 #include "NvInfer.h"

需要把tensorrt release版本下的include添加到系统环境变量

/workspace/tensorrt_release/include# cp -r NvInfer.h /usr/local/include/tensorrt/

三、tensorrtx

make时:

Linking CXX shared library libmyplugins.so
/usr/bin/ld: cannot find -lnvinfer
collect2: error: ld returned 1 exit status

问题:系统环境变量缺少对应的lib

/workspace/tensorrt_release/lib# cp -r libnvinfer.so /usr/local/lib

四、tensorrtx编译完产物:

得到生成的 libmyplugins.so yolov5

五、yolov5s.engine

执行命令sudo ./yolov5 -s 时报错:./yolov5: error while loading shared libraries: libmyelin.so.1: cannot open shared object file: No such file or directory

同样的道理,没有把对应的静态库添加到系统环境变量

解决:cp lib

得到产物yolov5s.engine:

六、images

执行 sudo ./yolov5 -d  ../samples 时得到检测后的两张图 时:

报错:read_files_in_dir failed.

解决:将原图目录samples 放到build 同级目录。

七、mnist例子

跑tensorrt_release 下面的mnist例子

报错:

root@65c48c6dc77c:/workspace/tensorrt_release/data/mnist# python3 ./download_pgms.py
Traceback (most recent call last):
  File "./download_pgms.py", line 2, in <module>
    from PIL import Image
ModuleNotFoundError: No module named 'PIL'

解决:pip install pillow

通过运行生成的 sample_mnist 文件就可以测试TensorRT是否正确的编译安装了。但是运行前需要先下载mnist数据。完成的操作如下:

# 进入下载mnist数据脚本所在的目录
cd $TRT_RELEASE/data/mnist# 运行下载mnist数据的脚本
python3 ./download_pgms.py# 进入sample_mnist 所在的目录
cd $TRT_RELEASE/bin# 运行sample_mnist
./sample_onnx_mnist

如下图所示:

tensorrt之tensorrtx编译:遇到的错误提示相关推荐

  1. 关于ml.exe编译时的错误提示:error A2138 和 error A2036

    重新编译以前写的MASM32程序代码时ml.exe提示出错:error A2138 和 error A2036 这个MASM32程序代码以前是可以编译通过的. 经过检查测试,发现是引发错误的代码,截图 ...

  2. 编译mysql4.0时候出现错误提示checking LinuxThreads... Not found

    编译mysql4.0时候出现错误提示checking "LinuxThreads"... "Not found" 2009-06-30 18:25 解压mysq ...

  3. JAVA编译时出现的错误提示

    1.错误:非法字符 看到这个错误提示,我们首先要考虑是否使用了中文字符 2.错误:找不到符号 看到这个错误,我们要考虑单词有没有拼写错误. 3.编译不报错,但是运行时出现错误 这种属于业务逻辑错误.环 ...

  4. 编译后错误提示为pls-00103:出现符号在需要下列之一时:begin case declare

    create or replace trigger auth_secure before insert or update or delete --/对整表更新前触发 on g002 begin IF ...

  5. 编译期会出现错误提示有哪些_Webpack 5有哪些值得期待

    Webpack 5已经到来 早在今年(2019年)的2月份,Webpack核心团队的Sean Larkin就做过一次关于webpack 5新特性的演讲,为大家讲述了webpack 5目前的开发进展,还 ...

  6. .iOS APP Project or Mac APP Project编译错误提示: My Mac 64-bit is not valid for Running the scheme...

    1. iOS APP Project or  Mac APP Project编译错误提示: "The run destination My Mac 64-bit is not valid f ...

  7. Android Studio 4.2Previw版本编译错误提示Disable offline mode and rerun the build

    编译出现的问题 项目在Android Studio 4.2Previw版本编译错误提示Disable offline mode and rerun the build No cached versio ...

  8. 解决Android Studio编译时INSTALL_FAILED_MISSING_SHARED_LIBRARY错误,提示 unavailable shared library wearable的问题

    1.问题现象 在编译app时安装到虚拟器上时,突然报错: 16:24 Executing tasks: [:app:assembleDebug] in project D:\Android\Proje ...

  9. 【GCC编译优化系列】GCC链接失败的错误提示 undefined reference to ‘xxx‘ 可能还有一种情况你没注意到?

    文章目录 1 写在前面 2 问题描述 2.1 问题现场 2.2 快速排查 2.3 判断问题 3 知识点突破 3.1 场景复现 3.2 深入分析 3.3 涨点新知识 4 经验总结 5 参考链接 6 更多 ...

最新文章

  1. 【Docker】Docker的三大核心组件
  2. atitit.人脸识别的应用场景and使用最佳实践 java .net php
  3. 注射“基因剪刀”治疗罕见遗传病,患者28天内无明显不良反应,诺奖得主很激动...
  4. opencv 计时 帧率
  5. vba搜索java里面的sql_在EXCEL中使用SQL语句查询集锦-持续更新中,敬请关注
  6. 果断拿下4000万美元D轮融资,Rancher发力中国本土化与国产化!
  7. java win10 通知,如何使用Java AWT创建和显示Windows 10通知
  8. 【深度学习】全连接层or卷积层
  9. 利用过滤器防止XSS攻击
  10. bt文件如何找到资源服务器,如何用Folx创建种子分享自己的文件资源
  11. 如何配置Gitlab的双因子验证(Two-Factor Authentication)
  12. PLsql oracle 误删除 恢复
  13. c语言中的布尔类型头文件,C语言的布尔类型(_Bool)
  14. topic是短语还是句子_词组、短语、句子--Unit 3 Topic 3
  15. UVA - 1389 Hard Life【分数规划+最小割】【最大权闭合图】
  16. linux图片裁剪软件安卓版,照片裁剪软件下载-照片裁剪 安卓版v2.2-PC6安卓网
  17. 怎么把两个音频合成一个?
  18. 02325计算机系统结构201810,2018年10月自考02325计算机系统结构真题及答案
  19. DGA数据集和算法研究
  20. 少年为了学计算机的电影,少年十大励志电影排行榜 能改变人生的励志电影推荐...

热门文章

  1. 前人栽树,后人擦屁股
  2. 学会asp后再学php,九天学会ASP 之 第二天
  3. dhcp(客户端)协议使用哪个众所周知的端口号?_DHCP不详解
  4. 如何判断对方列表里是不是好友_微信如何快速查看是否为好友关系
  5. java sctp_[编织消息框架][传输协议]sctp简单开发
  6. ROS 搞懂多话题回调机制以及消息队列
  7. 一个正则替换:一段文本中有若干a img标记,替换文本中的某些词,不包含除了a img标记 中的文字、属性...
  8. 瑞星2009网络版-服务器端安装和配置
  9. 在idea中设置java方法自定义注释
  10. SHELL TIPS: GNU SCREEN 的一些小技巧