python - 错误的注释 : class_id = 1. 但是 class_id 应该是 [from 0 to 0], file : data/obj/20210221_112744. txt

标签 python yolo

我在训练时使用 Yolo 来训练自定义对象检测,但出现以下错误

   Wrong annotation: class_id = 1. But class_id should be [from 0 to 0], file: data/obj/20210221_112732.txt 

最佳答案

似乎您有 1 个类(class),因此类(class) ID 变为 0。如果您有 1 个以上的类(class),则类(class) ID 应为 0 到 1。解决方案,您可以添加以下内容:
cfg、.data 和 .names 文件中的 classes = 2,因此您必须更改 cfg 文件中的过滤器、步骤和 max_batches
这个对我有用

关于python - 错误的注释 : class_id = 1. 但是 class_id 应该是 [from 0 to 0], file : data/obj/20210221_112744. txt,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66526821/

相关文章:

deep-learning - YOLOv7 中检测到的对象有限制吗?

java - 如何让 PyC​​harm 接受我的自签名 SSL 证书?

python - 如何使 python 导入模块和文件夹一起导入?

c++ - 打开 CV 延迟测量

python - 属性错误 : 'PhotoImage' object has no attribute '_PhotoImage__photo'

python - 尝试导出 YOLO 训练样本时 Labelimg 崩溃

python - 检查数字不是列表中 2 个整数的总和

python - 模块未找到错误: No module named 'tia.analysis.model'

python - 在 Python 中,为什么 isinstance 函数说 datetime 是 datetime.date 的一个实例?

artificial-intelligence - 如何从 COCO 数据集中过滤类?