class_docstr: Jaccard Index for Semantic Segmentation
  Calculates Jaccard Index for semantic segmentation (binary images only).
code: def accumulate(self, preds):
      pred = (
          np.stack([x.pred.segmentation.mask_array.data for x in preds])
          .astype(np.bool)
          .flatten()
      )
  
      target = (
          np.stack(
              [
                  x.ground_truth.segmentation.mask_array.data
                  for x in preds
              ]
          )
          .astype(np.bool)
          .flatten()
      )
  
      self._union += np.logical_or(pred, target).sum()
      self._intersection += np.logical_and(pred, target).sum()
  
file_path: icevision/icevision/metrics/jaccard_index/binary_jaccard_index.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 3 for calling the BinaryJaccardIndex obj's underlying member method code with example usage: obj.accumulate(preds) without return types