def __init__(self, root_dir, domain, pred_dir, transform=None): super().__init__(root_dir, domain, with_id=True) self.pred_dir = pred_dir self.transform = transform cmap_dic, _, class_names = get_color_map_dic() self.colors = np.asarray([cmap_dic[class_name] for class_name in class_names])
def __init__(self, root_dir, domain): super().__init__(root_dir, domain, with_id=True, with_tags=True, with_mask=True) cmap_dic, _, class_names = get_color_map_dic() self.colors = np.asarray([cmap_dic[class_name] for class_name in class_names]) data = read_json('./data/VOC_2012.json') self.class_names = np.asarray(class_names[1:21]) self.class_dic = data['class_dic'] self.classes = data['classes']