From 37c9d5382481b51835c245d5cc0a743466b8e681 Mon Sep 17 00:00:00 2001 From: Ikko Eltociear Ashimine Date: Mon, 20 Feb 2023 23:55:00 +0900 Subject: [PATCH] Fix typo in metrics.py Wether -> Whether --- annotator/uniformer/mmseg/core/evaluation/metrics.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/annotator/uniformer/mmseg/core/evaluation/metrics.py b/annotator/uniformer/mmseg/core/evaluation/metrics.py index 16c7dd47ca..ec4819e60e 100644 --- a/annotator/uniformer/mmseg/core/evaluation/metrics.py +++ b/annotator/uniformer/mmseg/core/evaluation/metrics.py @@ -39,7 +39,7 @@ def intersect_and_union(pred_label, ignore_index (int): Index that will be ignored in evaluation. label_map (dict): Mapping old labels to new labels. The parameter will work only when label is str. Default: dict(). - reduce_zero_label (bool): Wether ignore zero label. The parameter will + reduce_zero_label (bool): Whether ignore zero label. The parameter will work only when label is str. Default: False. Returns: @@ -101,7 +101,7 @@ def total_intersect_and_union(results, num_classes (int): Number of categories. ignore_index (int): Index that will be ignored in evaluation. label_map (dict): Mapping old labels to new labels. Default: dict(). - reduce_zero_label (bool): Wether ignore zero label. Default: False. + reduce_zero_label (bool): Whether ignore zero label. Default: False. Returns: ndarray: The intersection of prediction and ground truth histogram @@ -149,7 +149,7 @@ def mean_iou(results, nan_to_num (int, optional): If specified, NaN values will be replaced by the numbers defined by the user. Default: None. label_map (dict): Mapping old labels to new labels. Default: dict(). - reduce_zero_label (bool): Wether ignore zero label. Default: False. + reduce_zero_label (bool): Whether ignore zero label. Default: False. Returns: dict[str, float | ndarray]: @@ -188,7 +188,7 @@ def mean_dice(results, nan_to_num (int, optional): If specified, NaN values will be replaced by the numbers defined by the user. Default: None. label_map (dict): Mapping old labels to new labels. Default: dict(). - reduce_zero_label (bool): Wether ignore zero label. Default: False. + reduce_zero_label (bool): Whether ignore zero label. Default: False. Returns: dict[str, float | ndarray]: Default metrics. @@ -229,7 +229,7 @@ def mean_fscore(results, nan_to_num (int, optional): If specified, NaN values will be replaced by the numbers defined by the user. Default: None. label_map (dict): Mapping old labels to new labels. Default: dict(). - reduce_zero_label (bool): Wether ignore zero label. Default: False. + reduce_zero_label (bool): Whether ignore zero label. Default: False. beta (int): Determines the weight of recall in the combined score. Default: False. @@ -275,7 +275,7 @@ def eval_metrics(results, nan_to_num (int, optional): If specified, NaN values will be replaced by the numbers defined by the user. Default: None. label_map (dict): Mapping old labels to new labels. Default: dict(). - reduce_zero_label (bool): Wether ignore zero label. Default: False. + reduce_zero_label (bool): Whether ignore zero label. Default: False. Returns: float: Overall accuracy on all images. ndarray: Per category accuracy, shape (num_classes, ).