Skip to content

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

@ThinkPig826

Description

@ThinkPig826

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions