关于Yolo环境配置、模型训练问题记录
yolo运行中的问题小记
文章共1,460字 · 阅读需要大约5分钟
一键AI生成摘要,助你高效阅读
问答
·
目录
- YOLOV5
- 1. OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.OMP:Hint This means that multiple copies of the OpenMP runtime have been linked into the program.That is dangerous*
- 2. OSError:【WinError 126】找不到指定的模块。Enror loading "D: \PyCharm\pycharm\conda\envs\pytorchLib\site-packages\torch\Lib\caffe2_detectron_ops_qpu.dLL" or one of its dependencies.
- 3. AttributeError: Can't get attribute 'SPPF' on <module 'models.common'from'D:\IPyCharm\lCodellyoLov5-v4.e\lmodeLs\lcommon.py'
- 4. RntineEFron:Given groups=1, weight of size [512,,124,,1,1], expected imputl1,512,8,8] to have 1024 channels, but got 512 channels instead
- 5. OSError: WinError 1455页面文件太小,无法完成操作Error loading "D: PyCharm\pycharmlconda\envslpytorch\lib\site-packages\torch\Lib\caffe2_detectron_ops_qpu.dll" or one ofits dependencies
- 6. Yolov5-5.0 初次运行detect报错:OSError:【WinError 127】找不到指定的程序。Error Loading "D: \PyCharm\pycharm\conda\envs\pytorch\Lib\site-packages\torchLib\c10_cuda.dLL" or one of its dependencies.
- 7. IndexError: index 1 is out of bounds for axis 0 with size 1
- 8. 在yolov5-4.0中运行detect执行yolov5-6.2的pt时:AttributeError: Can't get attribute 'DetectionModel’on <module 'models.yolo’from 'D: \\yolov5-4.0\\models\\yolo.py'>
- YOLOV7
- YOLOV8
- YOLOV9
YOLOV5
1. OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.OMP:Hint This means that multiple copies of the OpenMP runtime have been linked into the program.That is dangerous*
【libiomp5md.dll文件已存在】
解决:查找电脑中的libiomp5md.dll文件并删除
2. OSError:【WinError 126】找不到指定的模块。Enror loading “D: \PyCharm\pycharm\conda\envs\pytorchLib\site-packages\torch\Lib\caffe2_detectron_ops_qpu.dLL” or one of its dependencies.
【错误加载或者依赖项出错】
查找方法:
(1)cuda手动安装包不完整:
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch
【11.1为个人使用版本】——未解决
(2)pip install intel-openmp——解决√
3. AttributeError: Can’t get attribute ‘SPPF’ on <module ‘models.common’from’D:\IPyCharm\lCodellyoLov5-v4.e\lmodeLs\lcommon.py’
解决:
4. RntineEFron:Given groups=1, weight of size [512,,124,,1,1], expected imputl1,512,8,8] to have 1024 channels, but got 512 channels instead
解决:
指定yaml文件[修改前此处为空]
5. OSError: WinError 1455页面文件太小,无法完成操作Error loading “D: PyCharm\pycharmlconda\envslpytorch\lib\site-packages\torch\Lib\caffe2_detectron_ops_qpu.dll” or one ofits dependencies
解决:
将worker的参数改为0或1即可
6. Yolov5-5.0 初次运行detect报错:OSError:【WinError 127】找不到指定的程序。Error Loading “D: \PyCharm\pycharm\conda\envs\pytorch\Lib\site-packages\torchLib\c10_cuda.dLL” or one of its dependencies.
解决:未找到有效的直接的方式,所以,直接新建一个虚拟环境然后,重新配置相关文件
结果:解决√
7. IndexError: index 1 is out of bounds for axis 0 with size 1
解决:
是实际标签类别数和自己设定的不同,如,此处是设定nc为1,class为ship,所以按理应该txt文件第一列的数字都为0,但查看txt文件存在“15”(解决办法:循环读取txt文件列表将其修改为0)
8. 在yolov5-4.0中运行detect执行yolov5-6.2的pt时:AttributeError: Can’t get attribute 'DetectionModel’on <module 'models.yolo’from ‘D: \yolov5-4.0\models\yolo.py’>
解决思路同问题3
YOLOV7
1. subprocess.CalledProcessError: Command 'git tag’returned non-zero exit status 128.
问题:未下载yolov7.pt或未未正确引用
解决:手动下载权重文件(也有可能是下载了权重文件但路径不对,可以检查一下文件路径)
YOLOV8
yolov8的环境基本与yolov5相同,并不需要特别配置什么,但是部分库可能需要升级一下,可以一边调一边升。
YOLOV9
1. AttributeError: ‘FreeTypeFont’ object has no attribute ‘getsize’
解决:分析可能是pillow版本太高,新的版本中移除了相关方法
查看自己的pillow版本:
降低pillow版本:
pip install Pillow==9.5.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
2. WARNING TensorBoard graph visualization failure Only tensors, lists, tuples of tensors, or dictionary of tensors can be output from traced functions
解决:分析可能是TensorBoard 版本太高,新的版本中移除了相关方法
查看自己的TensorBoard 版本:
降低TensorBoard 版本:
pip install tensorboard==2.9.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
更多推荐
已为社区贡献1条内容
所有评论(0)