Open daixiaolei623 opened 3 years ago
This means that the centroïds where not correctly created. Either the .json files are empty, or something else. I stumbled upon the same issue, only 7 centroïds where found, thus my KeyError is 7. Hope it will help you
Its probably not point to the correct folder :)
Dear author. thank you for your sharing. but when i use 'python -m runx.runx scripts/train_cityscapes.yml -i' to train in cityscapes, i got the error: 'File "train.py", line 601, in
main()
File "train.py", line 340, in main
datasets.setup_loaders(args)
File "/home/dai/code/semantic_segmentation/12/semantic-segmentation-main/datasets/init.py", line 182, in setup_loaders
label_transform=target_train_transform)
File "/home/dai/code/semantic_segmentation/12/semantic-segmentation-main/datasets/cityscapes.py", line 167, in init
self.build_epoch()
File "/home/dai/code/semantic_segmentation/12/semantic-segmentation-main/datasets/base_loader.py", line 71, in build_epoch
self.train)
File "/home/dai/code/semantic_segmentation/12/semantic-segmentation-main/datasets/uniform.py", line 308, in build_epoch
msg = "cls {} len {}".format(class_id, len(centroids[class_id]))
KeyError: 0'
Could you please tell me how to solve, thank you.