class_docstr: A simple segmentation accuracy metric
  
  Calculates segmentation accuracy.
  
  # Arguments
      ignore_class: class to ignore during metric computation (e.g. void class).
code: def finalize(self) -> Dict[str, float]:
      if self.ignore_class is not None:
          keep_idxs = self._seg_masks_gt != self.ignore_class
          target = self._seg_masks_gt[keep_idxs]
          pred = self._seg_masks_pred[keep_idxs]
      else:
          target = self._seg_masks_gt
          pred = self._seg_masks_pred
  
      accuracy = (target == pred).mean()
  
      self._reset()
      return {"dummy_value_for_fastai": accuracy}
  
file_path: icevision/icevision/metrics/segmentation_accuracy/segmentation_accuracy.py
imports: from icevision.imports import *
  from icevision.utils import *
  from icevision.data import *
  from icevision.metrics.metric import *
label_desc: Use image node_id 4 for calling the SegmentationAccuracy obj's underlying member method code with example usage: obj.finalize() and returns: dict