Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cocostuff dataset validation bug #25

Open
chencheng1203 opened this issue Apr 25, 2022 · 0 comments
Open

cocostuff dataset validation bug #25

chencheng1203 opened this issue Apr 25, 2022 · 0 comments

Comments

@chencheng1203
Copy link

in the segmentation folder -> segmentation_val/segmentor/tester.py line183

def __relabel(self, label_map):
    height, width = label_map.shape
    label_dst = np.zeros((height, width), dtype=np.uint8)
    for i in range(self.configer.get('data', 'num_classes')):
        label_dst[label_map == i] = self.configer.get('data', 'label_list')[i]
  
    label_dst = np.array(label_dst, dtype=np.uint8)
  
    return label_dst

if self.configer.exists('data', 'reduce_zero_label') and self.configer.get('data', 'reduce_zero_label'):
    label_img = label_img + 1
    label_img = label_img.astype(np.uint8)
if self.configer.exists('data', 'label_list'):
    label_img_ = self.__relabel(label_img)
else:
    label_img_ = label_img

for cocostuff dataset (171 num classes), the origin predicted classes range from 0-170, after +1, it range from 1-171, then feed the label_img into __relabel() func. However, the loop in __relabel() range from 0-170, and the class 171 is not be operated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant