AssertionError: WARNING: No labels found in ** Can not train without labels.

 报错:

Traceback (most recent call last):
  File "D:/GraduationProject/Py_Code2.0/yolov5-master/train.py", line 466, in 
    train(hyp, opt, device, tb_writer)
  File "D:/GraduationProject/Py_Code2.0/yolov5-master/train.py", line 168, in train
    dataloader, dataset = create_dataloader(train_path, imgsz, batch_size, gs, opt,
  File "D:\GraduationProject\Py_Code2.0\yolov5-master\utils\datasets.py", line 53, in create_dataloader
    dataset = LoadImagesAndLabels(path, imgsz, batch_size,
  File "D:\GraduationProject\Py_Code2.0\yolov5-master\utils\datasets.py", line 466, in __init__
WARNING: No labels found in D:\GraduationProject\Py_Code2.0\NEU-DET\Train\Images\. See https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data
    assert not augment, '%s. Can not train without labels.' % s
AssertionError: WARNING: No labels found in D:\GraduationProject\Py_Code2.0\NEU-DET\Train\Images\. See https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data. Can not train without labels.

查看了各种地方,文件的格式、文件的存放路径等,最终发现原因是文件夹的名称问题。

将原文件夹名称:Lables 改为 lables。

运行程序,成功。

你可能感兴趣的:(深度学习,python,机器学习)