diff --git a/mmseg/datasets/isprs.py b/mmseg/datasets/isprs.py index 9306b4847..888ea4762 100644 --- a/mmseg/datasets/isprs.py +++ b/mmseg/datasets/isprs.py @@ -7,7 +7,7 @@ from .custom import CustomDataset class ISPRSDataset(CustomDataset): """ISPRS dataset. - In segmentation map annotation for LoveDA, 0 is the ignore index. + In segmentation map annotation for ISPRS, 0 is the ignore index. ``reduce_zero_label`` should be set to True. The ``img_suffix`` and ``seg_map_suffix`` are both fixed to '.png'. """ diff --git a/mmseg/metrics/iou_metric.py b/mmseg/metrics/iou_metric.py index 4486e1213..c5bf28d6f 100644 --- a/mmseg/metrics/iou_metric.py +++ b/mmseg/metrics/iou_metric.py @@ -129,7 +129,7 @@ class IoUMetric(BaseMetric): @staticmethod def intersect_and_union(pred_label: torch.tensor, label: torch.tensor, num_classes: int, ignore_index: int): - """Calculate intersection and Union. + """Calculate Intersection and Union. Args: pred_label (torch.tensor): Prediction segmentation map @@ -175,22 +175,22 @@ class IoUMetric(BaseMetric): beta: int = 1): """Calculate evaluation metrics Args: - total_area_intersect (ndarray): The intersection of prediction and - ground truth histogram on all classes. - total_area_union (ndarray): The union of prediction and ground + total_area_intersect (np.ndarray): The intersection of prediction + and ground truth histogram on all classes. + total_area_union (np.ndarray): The union of prediction and ground truth histogram on all classes. - total_area_pred_label (ndarray): The prediction histogram on all - classes. - total_area_label (ndarray): The ground truth histogram on + total_area_pred_label (np.ndarray): The prediction histogram on all classes. - metrics (list[str] | str): Metrics to be evaluated, 'mIoU' and + total_area_label (np.ndarray): The ground truth histogram on + all classes. + metrics (List[str] | str): Metrics to be evaluated, 'mIoU' and 'mDice'. nan_to_num (int, optional): If specified, NaN values will be replaced by the numbers defined by the user. Default: None. beta (int): Determines the weight of recall in the combined score. Default: 1. Returns: - Dict[str, ndarray]: per category evaluation metrics, + Dict[str, np.ndarray]: per category evaluation metrics, shape (num_classes, ). """ diff --git a/mmseg/models/segmentors/encoder_decoder.py b/mmseg/models/segmentors/encoder_decoder.py index bb6b80691..135e29528 100644 --- a/mmseg/models/segmentors/encoder_decoder.py +++ b/mmseg/models/segmentors/encoder_decoder.py @@ -44,7 +44,7 @@ class EncoderDecoder(BaseSegmentor): whole_inference()/slide_inference(): encoder_decoder() encoder_decoder(): extract_feat() -> decode_head.predict() - 4 The ``_forward`` method is used to output the tensor by running the model, + 3. The ``_forward`` method is used to output the tensor by running the model, which includes two steps: (1) Extracts features to obtain the feature maps (2)Call the decode head forward function to forward decode head model.