yolo的label为txt,只需要创建内容为空的txt就行,否则会认为标签丢失,不送入训练。
加载时候也会进行提示:
如下,会提示8269 found, 4 missing(没有对应标签文件的), 64 empty(txt内容为空的),3 corrupted(图片读取错误的)
train: Scanning '/mediat/VOC2028/labels/train2017' for images and labels... 356 found, 0 missing, 1 empty, 2 corrupted: 4%|▍ | 358/8276 [00:00<00:02, 3565.22it/s]train: WARNING: Ignoring corrupted image and/or label /media/root/SB@home/hxzh/多种数据集/CV_安全帽检测数据集/数据集1/安全帽通用数据/boye_anquanmao/VOCdevkit/VOC2007/VOC2028/images/train2017/000385.jpg: invalid image format MPO
train: Scanning '/media/VOC2028/labels/train2017' for images and labels... 8269 found, 4 missing, 64 empty, 3 corrupted: 100%|██████████| 8276/8276 [00:09<00:00, 844.84it/s]