-
Notifications
You must be signed in to change notification settings - Fork 15
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
IndexError: list index out of range #7
Comments
That promblem seems not exist here in my local repository. Maybe you can debug and check your path |
I am also having the same issue, I am wondering if it was resolved, Below is a similar issue or error, which I can't tell how it is originated. Any hint or recommendation that will highly appreciate it. PS C:\dev1\RFNet> python train.py --depth --lr 1e-4 --weight-decay 2.5e-5 --workers 4 --epochs 200 --batch-size 8 --val-batch-size 3 --gpu-ids 0 --checkname test --eval-interval 2 --dataset cityscapes --loss-type ce --use-balanced-weights |
I think it is a similar problem that I had when running eval.py. In the dataloder file in this line: RFNet/dataloaders/datasets/cityscapes.py Line 32 in e135801
There is the suffix: 'labelTrainIds.png' set, but in my case the downloaded cityscapes dataset is named without 'Train' in the name. So i replaced the suffix with 'labelIds.png' and everything worked for me. I hope this will also solve your problem. |
This error reminds you to generate labelTrainIds.png.You can refer to this blog https://blog.csdn.net/lx_ros/article/details/125667076. |
I am training with only cityscapes dataset
But I have some error below:
IndexError: Caught IndexError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "C:\Users\parke.conda\envs\untitled\lib\site-packages\torch\utils\data_utils\worker.py", line 198, in _worker_loop
data = fetcher.fetch(index)
File "C:\Users\parke.conda\envs\untitled\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:\Users\parke.conda\envs\untitled\lib\site-packages\torch\utils\data_utils\fetch.py", line 44, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "E:\RFNet-master\dataloaders\datasets\cityscapes.py", line 54, in getitem
lbl_path = self.labels[self.split][index].rstrip()
IndexError: list index out of range
The text was updated successfully, but these errors were encountered: