Open hw2hwei opened 3 years ago
Hello, do you solve the problem? I meet the same issue now.
Hello, do you solve the problem? I meet the same issue now.
self._key = np.array(range(len(self._mapping))).astype('uint8')
add this line after the definition of self._mapping in pascal_ctx.py https://github.com/HRNet/HRNet-Semantic-Segmentation/blob/8037a7fb867b58d885b26b1ceb8283a7ee252851/lib/datasets/pascal_ctx.py#L71
I solved this problem by updating the Pytorch version.
I solved this problem by updating the Pytorch version.
Can you get the results mIoU(59 classes)=54.0% and mIoU(60 classes)=48.3%? I got a big performance gap.
AttributeError: 'PASCALContext' object has no attribute '_key' Traceback (most recent call last): File "tools/train.py", line 286, in
main()
File "tools/train.py", line 115, in main
scale_factor=config.TRAIN.SCALE_FACTOR)
File "/home/huangwei/Codes/HRNet-Semantic-Segmentation-pytorch-v1.1/tools/../lib/datasets/pascal_ctx.py", line 76, in init
self.masks = self._preprocess(mask_file)
File "/home/huangwei/Codes/HRNet-Semantic-Segmentation-pytorch-v1.1/tools/../lib/datasets/pascal_ctx.py", line 93, in _preprocess
self.detail.getMask(img_id)))
File "/home/huangwei/Codes/HRNet-Semantic-Segmentation-pytorch-v1.1/tools/../lib/datasets/pascal_ctx.py", line 84, in _class_to_index
return self._key[index].reshape(mask.shape)
what's the "_key"?