原因就是下载的权重文件版本不对,如果不是从官方v5.0下面下载的权重文件,那么很大概率出这个问题,哪怕直接运行detect.py下载的也不是正确版本,下图才是最正确下载权重文件的位置,附网址:Releases · ultralytics/yolov5 (github.com)
找到v5.0版本,在Assets里下载对应的权重文件
如果github打开总是出错又找不到科学上网的方法,建议使用watt toolkit,之前只用这个来加速steam,所以也叫steam++,偶然看到还可以加速github,虽然有点慢但至少能进去。
附watt toolkit网址:瓦特工具箱(Steam++官网) - Watt Toolkit (steampp.net)
对于官网下载慢的问题,建议右键要下载的文件 --- 复制链接 --- 在迅雷新建下载任务,相比于Edge几十kb的下载速度,迅雷几百kb还是下载的比较快的。
如果你的迅雷下载到一半下载速度卡住了,可以试用一下1min的会员加速,十几秒就下完了hh
我这边已经下好而且跑完了,有偷懒的同学可以直接从网盘下载,包含yolov5s.pt,yolov5m.pt,yolov5l.pt和yolov5x.pt 这几个权重文件只是v5 5.0版本的,别的版本能不能用我不知道。
链接:https://pan.baidu.com/s/1uO7Q29sQihndj71I9cMQBg?pwd=6666
提取码:6666
--来自百度网盘超级会员V4的分享