PingoLH / FCHarDNet

Fully Convolutional HarDNet for Segmentation in Pytorch
MIT License
195 stars 52 forks source link

raise ValueError("Segmentation map contained invalid class values") #48

Open ThinkPig826 opened 3 years ago

ThinkPig826 commented 3 years ago

when i test the mode: python validate.py --model_path weights/hardnet70_cityscapes_model.pkl

raise self.exc_type(msg)

ValueError: Caught ValueError in DataLoader worker process 0. Original Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/worker.py", line 185, in _worker_loop data = fetcher.fetch(index) File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/_utils/fetch.py", line 44, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/yijiahe/AI/FCHarDNet/ptsemseg/loader/cityscapes_loader.py", line 170, in getitem img, lbl = self.transform(img, lbl) File "/home/yijiahe/AI/FCHarDNet/ptsemseg/loader/cityscapes_loader.py", line 209, in transform raise ValueError("Segmentation map contained invalid class values") ValueError: Segmentation map contained invalid class values