即使所有标签都是唯一的,YOLOv5 也会抛出重复标签错误

YOLOv5 throws a duplicate labels error even though all labels are unique

我正在尝试使用 YOLOv5x 构建对象检测系统。我通过 Roboflow 网站创建了我的数据集,并将该集下载到我的笔记本后,我运行此命令开始训练:

!curl -L "https://app.roboflow.com/ds/[DATASET-LINK]" > roboflow.zip; unzip roboflow.zip; rm roboflow.zip

但是每张图片我都收到这个错误:

train: WARNING: Ignoring corrupted image and/or label /content/yolov5/train/images/output_0446_png.rf.caced7dfbd9c68fe51180ceb8c2f04e8.jpg: duplicate labels
train: WARNING: Ignoring corrupted image and/or label /content/yolov5/train/images/output_0450_png.rf.808e3c83dd6b516900257848467d9a5b.jpg: duplicate labels
train: WARNING: Ignoring corrupted image and/or label /content/yolov5/train/images/output_0456_png.rf.898ad055d9c4cf67db7657c4901db2b7.jpg: duplicate labels
train: WARNING: Ignoring corrupted image and/or label /content/yolov5/train/images/output_0459_png.rf.8bc9567fac8542598a79c2bf11d4d8d5.jpg: duplicate labels
train: WARNING: Ignoring corrupted image and/or label /content/yolov5/train/images/output_0461_png.rf.62c902b73e1b6a92e1417b90c8dd3c9c.jpg: duplicate labels
train: WARNING: Ignoring corrupted image and/or label /content/yolov5/train/images/output_0462_png.rf.bf025028cd9eb5fe98d3cd80452a8d86.jpg: duplicate labels
train: WARNING: Ignoring corrupted image and/or label /content/yolov5/train/images/output_0463_png.rf.931cea20da666391b1b855eed678dc47.jpg: duplicate labels
train: WARNING: Ignoring corrupted image and/or label /content/yolov5/train/images/output_0465_png.rf.5bedf83f99b1ee0bf8116c2d369ba202.jpg: duplicate labels
train: WARNING: Ignoring corrupted image and/or label /content/yolov5/train/images/output_0466_png.rf.75ceb50e893e1d7ff43a49c40767d552.jpg: duplicate labels

它抱怨“重复标签”,但我不知道这是什么意思。我没有 2 个相同的 类 并且这个数据集与 YOLOv4 和 YOLOv4-Tiny 配合得很好。

我用yolov5的时候也遇到过这个问题。它主要是在数据预处理期间。我发现的原因是,正如提示所说,标签是重复的。在txt标签文件中,标签的位置是重复的。如下所示,标签被复制了四次。如果只有一次,问题就会消失。 enter image description here