argusswift / YOLOv4-pytorch

This is a pytorch repository of YOLOv4, attentive YOLOv4 and mobilenet YOLOv4 with PASCAL VOC and COCO
1.68k stars 330 forks source link

训练过程中报错 #76

Closed moxiaoguai1993 closed 4 years ago

moxiaoguai1993 commented 4 years ago

Traceback (most recent call last): File "D:/Project_Code/YOLOv4-pytorch-master/train.py", line 360, in fp_16=opt.fp_16, File "D:/Project_Code/YOLOv4-pytorch-master/train.py", line 164, in train ) in enumerate(self.train_dataloader): File "C:\ProgramData\Anaconda3\envs\gpupy\lib\site-packages\torch\utils\data\dataloader.py", line 363, in next data = self._next_data() File "C:\ProgramData\Anaconda3\envs\gpupy\lib\site-packages\torch\utils\data\dataloader.py", line 403, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "C:\ProgramData\Anaconda3\envs\gpupy\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "C:\ProgramData\Anaconda3\envs\gpupy\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "D:\Project_Code\YOLOv4-pytorch-master\utils\datasets.py", line 45, in getitem self.annotations[item_mix] File "D:\Project_Code\YOLOv4-pytorch-master\utils\datasets.py", line 113, in parse_annotation img, bboxes = dataAug.RandomCrop()(np.copy(img), np.copy(bboxes)) File "D:\Project_Code\YOLOv4-pytorch-master\utils\data_augment.py", line 30, in call np.min(bboxes[:, 0:2], axis=0), IndexError: too many indices for array

cangwang commented 4 years ago

你dataset加载解析有问题,自己断点检查一下