-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
list index out of range problem #229
Comments
@menglongyue can you try it with flag |
i just tryed, when set v5loader=True, this problem did not occur again. thank you very much! this problem might be a bug in yolov8. |
@menglongyue ok got it! could you please tell me more about this issue? like is there negative labels or empty labels in you custom dataset? I'd like to reproduce your issue and solve it. :) |
` Overriding model.yaml nc=80 with nc=3
0 -1 1 1856 ultralytics.nn.modules.Conv [3, 64, 3, 2] DDP settings: RANK 0, WORLD_SIZE 2, DEVICE cuda:0 |
Hi @Laughing-q, I'm having the same problem while training on a custom dataset. Using Train code
My
My config
Error logs
|
there maybe some bugs exists in dataloading,waiting for the official optimization. |
@LNTH Did this error happen with both |
@LNTH looks like you're using EDIT: can you try to train |
@menglongyue hi this issue has fixed by this #249. |
When I run
After I manually create train folder, I got new error state that I don't have the valid data |
@Laughing-q |
This is the folder structure of coco128 (automatically downloaded and unzip)
|
@LNTH can you try this? results = model.train(data="coco128.yaml", epochs=100) |
@Laughing-q Both What does "your labels are segment labels" mean? Do you mean the same label format as Yolov5 seg? |
@LNTH yes, the same label format as yolov5 seg. :) |
Search before asking
Question
hi, thanks for you excellent work.
when i train yolov8l on my datasets, the following problem occurred,and i cannot find the reason:
len(self.labels) 3597
index 2178
len(self.labels) 3597
index 420
Traceback (most recent call last):
File "/data1/huangqj/YOLO/ultralytics/ultralytics/yolo/v8/detect/train.py", line 208, in train
model.train(**cfg)
File "/data1/huangqj/YOLO/ultralytics/ultralytics/yolo/engine/model.py", line 193, in train
self.trainer.train()
File "/data1/huangqj/YOLO/ultralytics/ultralytics/yolo/engine/trainer.py", line 177, in train
self._do_train(int(os.getenv("RANK", -1)), world_size)
File "/data1/huangqj/YOLO/ultralytics/ultralytics/yolo/engine/trainer.py", line 275, in _do_train
for i, batch in pbar:
File "/home/huangqj/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 652, in next
data = self._next_data()
File "/home/huangqj/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1347, in _next_data
return self._process_data(data)
File "/home/huangqj/.local/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1373, in _process_data
data.reraise()
File "/home/huangqj/.local/lib/python3.8/site-packages/torch/_utils.py", line 461, in reraise
raise exception
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/huangqj/.local/lib/python3.8/site-packages/torch/utils/data/_utils/worker.py", line 302, in _worker_loop
data = fetcher.fetch(index)
File "/home/huangqj/.local/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/huangqj/.local/lib/python3.8/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/data1/huangqj/YOLO/ultralytics/ultralytics/yolo/data/base.py", line 179, in getitem
return self.transforms(self.get_label_info(index))
File "/data1/huangqj/YOLO/ultralytics/ultralytics/yolo/data/augment.py", line 48, in call
data = t(data)
File "/data1/huangqj/YOLO/ultralytics/ultralytics/yolo/data/augment.py", line 48, in call
data = t(data)
File "/data1/huangqj/YOLO/ultralytics/ultralytics/yolo/data/augment.py", line 84, in call
mix_labels = [self.dataset.get_label_info(i) for i in indexes]
File "/data1/huangqj/YOLO/ultralytics/ultralytics/yolo/data/augment.py", line 84, in
mix_labels = [self.dataset.get_label_info(i) for i in indexes]
File "/data1/huangqj/YOLO/ultralytics/ultralytics/yolo/data/base.py", line 186, in get_label_info
label = self.labels[index].copy()
IndexError: list index out of range
Additional
No response
The text was updated successfully, but these errors were encountered: