iou = eval_semantic_segmentation_iou(pred_labels, gt_labels)
report = {"miou": np.nanmean(iou)}
if self.label_names is not None:
for l, label_name in enumerate(self.label_names):
After Change
if self.label_names is not None:
for l, label_name in enumerate(self.label_names):
try:
report["iou/{:s}".format(label_name)] = result["iou"][l]
report["class_accuracy/{:s}".format(label_name)] =\
result["class_accuracy"][l]
except IndexError: