mirror of
https://github.com/open-mmlab/mmsegmentation.git
synced 2025-06-03 22:03:48 +08:00
Merge branch 'xiexinchen/docstring' into 'refactor_dev'
[Fix] Fix docstring See merge request openmmlab-enterprise/openmmlab-ce/mmsegmentation!57
This commit is contained in:
commit
95b4926e37
@ -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'.
|
||||
"""
|
||||
|
@ -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, ).
|
||||
"""
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user