吕某人☔️ 2021-06-27 14:14 采纳率: 0%
浏览 11359

yolov5训练数据时No labels in yolo_A\train.cache.

(venv) E:\yolov5-master>python train.py --img 640 --batch 4 --epoch 300 --data ./data/A.yaml --cfg ./models/yolov5m.yaml --weights weights/yolov5m.pt --workers 0
?[34m?[1mtrain: ?[0mweights=weights/yolov5m.pt, cfg=./models/yolov5m.yaml, data=./data/A.yaml, hyp=data/hyp.scratch.yaml, epochs=300, batch_size=4, img_size=[640], rect=False, resume=F
alse, nosave=False, notest=False, noautoanchor=False, evolve=False, bucket=, cache_images=False, image_weights=False, device=, multi_scale=False, single_cls=False, adam=False, sync_bn=
False, workers=0, project=runs/train, entity=None, name=exp, exist_ok=False, quad=False, linear_lr=False, label_smoothing=0.0, upload_dataset=False, bbox_interval=-1, save_period=-1, a
rtifact_alias=latest, local_rank=-1
?[34m?[1mgithub: ?[0mskipping check (not a git repository), for updates see https://github.com/ultralytics/yolov5
YOLOv5  2021-6-20 torch 1.9.0+cpu CPU

?[34m?[1mhyperparameters: ?[0mlr0=0.01, lrf=0.2, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0
, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosai
c=1.0, mixup=0.0
?[34m?[1mtensorboard: ?[0mStart with 'tensorboard --logdir runs/train', view at http://localhost:6006/
?[34m?[1mwandb: ?[0mInstall Weights & Biases for YOLOv5 logging with 'pip install wandb' (recommended)

                 from  n    params  module                                  arguments
  0                -1  1      5280  models.common.Focus                     [3, 48, 3]
  1                -1  1     41664  models.common.Conv                      [48, 96, 3, 2]
  2                -1  1     65280  models.common.C3                        [96, 96, 2]
  3                -1  1    166272  models.common.Conv                      [96, 192, 3, 2]
  4                -1  1    629760  models.common.C3                        [192, 192, 6]
  5                -1  1    664320  models.common.Conv                      [192, 384, 3, 2]
  6                -1  1   2512896  models.common.C3                        [384, 384, 6]
  7                -1  1   2655744  models.common.Conv                      [384, 768, 3, 2]
  8                -1  1   1476864  models.common.SPP                       [768, 768, [5, 9, 13]]
  9                -1  1   4134912  models.common.C3                        [768, 768, 2, False]
 10                -1  1    295680  models.common.Conv                      [768, 384, 1, 1]
 11                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']
 12           [-1, 6]  1         0  models.common.Concat                    [1]
 13                -1  1   1182720  models.common.C3                        [768, 384, 2, False]
 14                -1  1     74112  models.common.Conv                      [384, 192, 1, 1]
 15                -1  1         0  torch.nn.modules.upsampling.Upsample    [None, 2, 'nearest']
 16           [-1, 4]  1         0  models.common.Concat                    [1]
 17                -1  1    296448  models.common.C3                        [384, 192, 2, False]
 18                -1  1    332160  models.common.Conv                      [192, 192, 3, 2]
 19          [-1, 14]  1         0  models.common.Concat                    [1]
 20                -1  1   1035264  models.common.C3                        [384, 384, 2, False]
 21                -1  1   1327872  models.common.Conv                      [384, 384, 3, 2]
 22          [-1, 10]  1         0  models.common.Concat                    [1]
 23                -1  1   4134912  models.common.C3                        [768, 768, 2, False]
 24      [17, 20, 23]  1     56574  models.yolo.Detect                      [9, [[10, 13, 16, 30, 33, 23], [30, 61, 62, 45, 59, 119], [116, 90, 156, 198, 373, 326]], [192, 384, 768]]
E:\yolov5-master\venv\lib\site-packages\torch\nn\functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please d
o not use them for anything important until they are released as stable. (Triggered internally at  ..\c10/core/TensorImpl.h:1156.)
  return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
Model Summary: 391 layers, 21088734 parameters, 21088734 gradients, 50.5 GFLOPs

Transferred 498/506 items from weights\yolov5m.pt
Scaled weight_decay = 0.0005
Optimizer groups: 86 .bias, 86 conv.weight, 83 other
?[34m?[1mtrain: ?[0mScanning 'yolo_A\train' images and labels...:   0%|                                                                                                      | 0/22 [00:
?[34m?[1mtrain: ?[0mScanning 'yolo_A\train' images and labels...0 found, 1 missing, 0 empty, 0 corrupted:   5%|██▍                                                   | 1/22 [00:02<00:58
?[34m?[1mtrain: ?[0mScanning 'yolo_A\train' images and labels...0 found, 21 missing, 0 empty, 0 corrupted:  95%|█████████████████████████████████████████████████▋  | 21/22 [00:02<00:00
?[34m?[1mtrain: ?[0mScanning 'yolo_A\train' images and labels...0 found, 22 missing, 0 empty, 0 corrupted: 100%|████████████████████████████████████████████████████| 22/22 [00:02<00:00
,  7.58it/s]?[0m
?[34m?[1mtrain: ?[0mWARNING: No labels found in yolo_A\train.cache. See https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data
?[34m?[1mtrain: ?[0mNew cache created: yolo_A\train.cache
Traceback (most recent call last):
  File "train.py", line 647, in <module>
    main(opt)
  File "train.py", line 548, in main
    train(opt.hyp, opt, device)
  File "train.py", line 212, in train
    dataloader, dataset = create_dataloader(train_path, imgsz, batch_size // WORLD_SIZE, gs, single_cls,
  File "E:\yolov5-master\utils\datasets.py", line 70, in create_dataloader
    dataset = LoadImagesAndLabels(path, imgsz, batch_size,
  File "E:\yolov5-master\utils\datasets.py", line 405, in __init__
    assert nf > 0 or not augment, f'{prefix}No labels in {cache_path}. Can not train without labels. See {help_url}'
AssertionError: ?[34m?[1mtrain: ?[0mNo labels in yolo_A\train.cache. Can not train without labels. See https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data

  • 写回答

5条回答 默认 最新

  • 关注

    文件名 label改成labels

    评论

报告相同问题?

问题事件

  • 请回答用户的提问 8月29日

悬赏问题

  • ¥15 我的数据无法存进链表里
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端