对YOLOv8进行训练时报如下错误:
Epoch GPU_mem box_loss cls_loss dfl_loss Instances Size
1/200 1.22G 0 3.662 0 0 576: 100%|██████████| 113/113 [00:08<00:00, 12.64it/s]
Class Images Instances Box(P R mAP50 mAP50-95): 100%|██████████| 15/15 [00:19<00:00, 1.27s/it]
Traceback (most recent call last):
File "F:\mDOS-train-v2.0.1\ultralytics\yolo\v8\detect\train.py", line 233, in <module>
train()
File "F:\mDOS-train-v2.0.1\ultralytics\yolo\v8\detect\train.py", line 229, in train
trainer.train()
File "F:\mDOS-train-v2.0.1\ultralytics\yolo\engine\trainer.py", line 188, in train
self._do_train(RANK, world_size)
File "F:\mDOS-train-v2.0.1\ultralytics\yolo\engine\trainer.py", line 349, in _do_train
self.metrics, self.fitness = self.validate()
File "F:\mDOS-train-v2.0.1\ultralytics\yolo\engine\trainer.py", line 445, in validate
metrics = self.validator(self)
File "D:\WorkSpace\PatternRecognition\Software\anaconda3\envs\fybsense\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "F:\mDOS-train-v2.0.1\ultralytics\yolo\engine\validator.py", line 177, in __call__
stats = self.get_stats()
File "F:\mDOS-train-v2.0.1\ultralytics\yolo\v8\detect\val.py", line 121, in get_stats
self.nt_per_class = np.bincount(stats[-1].astype(int), minlength=self.nc) # number of targets per class
**IndexError: list index out of range**
Process finished with exit code 1
使用的是自己的数据集,图片大小600*94,类别3类,每类1500张图片