def compute_metric(self, results):
    hist = np.zeros((self.config.num_classes, self.config.num_classes))
    correct = 0
    labeled = 0
    count = 0
    for d in results:
        hist += d['hist']
        correct += d['correct']
        labeled += d['labeled']
        count += 1
    (iu, mean_IU, mean_IU_no_back, mean_pixel_acc) = compute_score(hist, correct, labeled)
    result_line = print_iou(iu, mean_pixel_acc, self.dataset.get_class_names(), True)
    return (result_line, mean_IU)
def compute_metric(self, results):
    hist = np.zeros((self.config.num_classes, self.config.num_classes))
    correct = 0
    labeled = 0
    count = 0
    for d in results:
        hist += d['hist']
        correct += d['correct']
        labeled += d['labeled']
        count += 1
    (iu, mean_IU, mean_IU_no_back, mean_pixel_acc) = compute_score(hist, correct, labeled)
    result_line = print_iou(iu, mean_pixel_acc, self.dataset.get_class_names(), True)
    return (result_line, mean_IU)