AssertionError: ..\..\best.pt (2 classes) trained on different --data than what yo【yolov5自训练报错日志及解决】
运行Val.py时如下报错:AssertionError: ..\..\best.pt (2 classes) trained on different --data than what you passed (80 classes). Pass correct combination of --weights and --data that are trained together.
·
Q :运行Val.py时如下报错:
AssertionError: ..\..\best.pt (2 classes) trained on different --data than what you passed (80 classes). Pass correct combination of --weights and --data that are trained together.

S:在yolov5s.yaml下检查 nc 分类是否与自己的数据集分类吻合。
源代码下默认 nc = 80 。
此处我的数据集分为两类,则改为 nc = 2 。

更多推荐



所有评论(0)