Traceback (most recent call last):
File "/content/yolov9/train.py", line 634, in
main(opt)
File "/content/yolov9/train.py", line 528, in main
train(opt.hyp, opt, device, callbacks)
File "/content/yolov9/train.py", line 277, in train
for i, (imgs, targets, paths, _) in pbar: # batch -------------------------------------------------------------
File "/usr/local/lib/python3.10/dist-packages/tqdm/std.py", line 1181, in iter
for obj in iterable:
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 631, in next
data = self._next_data()
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 1326, in _next_data
return self._process_data(data)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 1372, in _process_data
data.reraise()
File "/usr/local/lib/python3.10/dist-packages/torch/_utils.py", line 722, in reraise
raise exception
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/content/yolov9/utils/dataloaders.py", line 656, in getitem
img, labels = self.load_mosaic(index)
File "/content/yolov9/utils/dataloaders.py", line 791, in load_mosaic
img4, labels4, segments4 = copy_paste(img4, labels4, segments4, p=self.hyp['copy_paste'])
File "/content/yolov9/utils/augmentations.py", line 248, in copy_paste
l, box, s = labels[j], boxes[j], segments[j]
IndexError: list index out of range
im getting these two errors while trying to train my custom dataset using roboflow colab guide. I used the same steps in yolov8 but there were no issues
the training starts bit stops at the 1st epoch itself
@akraylite Share your training command or change value of copy_paste parameter in hyp.scratch-high.yaml file to 0.0 and then try.
@akraylite Share your training command or change value of copy_paste parameter in hyp.scratch-high.yaml file to 0.0 and then try.
%cd {HOME}/yolov9
!python train.py
--batch 16 --epochs 25 --img 640 --device 0 --min-items 0 --close-mosaic 15
--data {dataset.location}/data.yaml
--weights {HOME}/weights/gelan-c.pt
--cfg models/detect/gelan-c.yaml
--hyp hyp.scratch-high.yaml
@akraylite Share your training command or change value of copy_paste parameter in hyp.scratch-high.yaml file to 0.0 and then try.
actually the change you suggested worked, thank you so much