Tramac / Fast-SCNN-pytorch

A PyTorch Implementation of Fast-SCNN: Fast Semantic Segmentation Network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problems while loadeing the dataset.

umgefahren opened this issue · comments

I tried to recreate the training of the model. I trained the model with the newest version of cityscapes. Before training the following error occurs:
Found 2970 images in the folder ./datasets/citys/leftImg8bit/train Found 500 images in the folder ./datasets/citys/leftImg8bit/val w/ class balance Starting Epoch: 0, Total Epochs: 160 Traceback (most recent call last): File "/home/hannes/.vscode/extensions/ms-python.python-2020.2.64397/pythonFiles/ptvsd_launcher.py", line 48, in <module> main(ptvsdArgs) File "/home/hannes/.vscode/extensions/ms-python.python-2020.2.64397/pythonFiles/lib/python/old_ptvsd/ptvsd/__main__.py", line 432, in main run() File "/home/hannes/.vscode/extensions/ms-python.python-2020.2.64397/pythonFiles/lib/python/old_ptvsd/ptvsd/__main__.py", line 316, in run_file runpy.run_path(target, run_name='__main__') File "/usr/lib/python3.7/runpy.py", line 263, in run_path pkg_name=pkg_name, script_name=fname) File "/usr/lib/python3.7/runpy.py", line 96, in _run_module_code mod_name, mod_spec, pkg_name, script_name) File "/usr/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/media/hannes/SanDisk/Fast-SCNN-pytorch/train.py", line 201, in <module> trainer.train() File "/media/hannes/SanDisk/Fast-SCNN-pytorch/train.py", line 128, in train for i, (images, targets) in enumerate(self.train_loader): File "/home/hannes/.local/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 345, in __next__ data = self._next_data() File "/home/hannes/.local/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 385, in _next_data data = self._dataset_fetcher.fetch(index) # may raise StopIteration File "/home/hannes/.local/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/hannes/.local/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp> data = [self.dataset[idx] for idx in possibly_batched_index] File "/media/hannes/SanDisk/Fast-SCNN-pytorch/data_loader/cityscapes.py", line 79, in __getitem__ mask = Image.open(self.mask_paths[index]) File "/usr/lib/python3/dist-packages/PIL/Image.py", line 2822, in open raise IOError("cannot identify image file %r" % (filename if filename else fp)) OSError: cannot identify image file './datasets/citys/gtFine/train/darmstadt/darmstadt_000046_000019_gtFine_labelIds.png'

Please help.