(建议直接用yolov6.2的版本训练,前面的版本会出现很多问题)
Q1:pycocotools在windows安装失败
A1:①有conda:利用https://pan.baidu.com/s/1nWQdPRtGwNnOO2DkxRuGuA提取码:i5d7,安装完直接解压复制其中pycocotools两个文件夹到conda环境…\Lib\site-packages之中。
②无conda:安装完直接解压复制其中pycocotools两个文件夹到python的site-packages(如果找不到可以利用everything软件查找site直接搜索)
Q2:复现碰到报错Can't get attribute 'SPPF' on <module 'models.common' from 'D:\\Pycharm\\Code\\yolov5-5.0\\models\\common.py'>
A2: 用的是Tags5的话,就去Tags6里面的model/common.py里面去找到这个SPPF的类,把它拷过来到Tags5的model/common.py里面,这样你的代码就也有这个类了,还要引入一个warnings包(import warning),
Q3: The size of tensor a (80) must match the size of tensor b (56) at non-singleton dimension 3
Q4:AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'问题应该是pytorch新版本API修改导致的
A34:问题太多,解决问题一直出现新问题,最终采用6.2版本训练成功。