【AI】在NVIDIA Jetson Orin Nano上使用tensorrtx部署yolov5-v7.0

AI学习目录汇总

0、tensorrtx官网

https://github.com/wang-xinyu/tensorrtx
https://github.com/wang-xinyu/tensorrtx/tree/master/yolov5

1、下载源码

git clone -b v7.0 https://github.com/ultralytics/yolov5.git
git clone -b yolov5-v7.0 https://github.com/wang-xinyu/tensorrtx.git

2、版本对应的问题

2.1 yolov5训练和预测的版本

使用新版本的yolov5训练生成的pt文件在旧版本的yolov5中预测时会报错

AttributeError: Can't get attribute 'DetectionModel' on <module 'models.yolo' from '/home/jetson/yolov5/models/yolo.py'>

解决方法:
1)升级预测时使用的yolov5版本,使之和训练时的一致;
2)参考这篇博客修改旧版本的yolov5的源码:https://blog.csdn.net/weixin_46389664/article

猜你喜欢

转载自blog.csdn.net/u010168781/article/details/131632123