minor change

pull/1801/head
xiexinch 2022-07-05 20:43:33 +08:00
parent d54f80c649
commit 761e1a9983
3 changed files with 11 additions and 11 deletions

View File

@ -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'.
"""

View File

@ -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, ).
"""

View File

@ -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.