class_docstr: Metric of separated and occluded masks which presented in paper `A Tri-
  Layer Plugin to Improve Occluded Detection.
  
  <https://arxiv.org/abs/2210.10046>`_.
  
  Separated COCO and Occluded COCO are automatically generated subsets of
  COCO val dataset, collecting separated objects and partially occluded
  objects for a large variety of categories. In this way, we define
  occlusion into two major categories: separated and partially occluded.
  
  - Separation: target object segmentation mask is separated into distinct
    regions by the occluder.
  - Partial Occlusion: target object is partially occluded but the
    segmentation mask is connected.
  
  These two new scalable real-image datasets are to benchmark a model's
  capability to detect occluded objects of 80 common categories.
  
  Please cite the paper if you use this dataset:
  
  @article{zhan2022triocc,
      title={A Tri-Layer Plugin to Improve Occluded Detection},
      author={Zhan, Guanqi and Xie, Weidi and Zisserman, Andrew},
      journal={British Machine Vision Conference},
      year={2022}
  }
  
  Args:
      occluded_ann (str): Path to the occluded coco annotation file.
      separated_ann (str): Path to the separated coco annotation file.
      score_thr (float): Score threshold of the detection masks.
          Defaults to 0.3.
      iou_thr (float): IoU threshold for the recall calculation.
          Defaults to 0.75.
      metric (str | List[str]): Metrics to be evaluated. Valid metrics
          include 'bbox', 'segm', 'proposal', and 'proposal_fast'.
          Defaults to 'bbox'.
docstr: Compute IoU between two masks.
docstr_tok: ["Compute","IoU","between","two","masks","."]
code: def mask_iou(
      self, mask1: np.ndarray, mask2: np.ndarray
  ) -> np.ndarray:
      """Compute IoU between two masks."""
      mask1_area = np.count_nonzero(mask1 == 1)
      mask2_area = np.count_nonzero(mask2 == 1)
      intersection = np.count_nonzero(
          np.logical_and(mask1 == 1, mask2 == 1)
      )
      iou = intersection / (mask1_area + mask2_area - intersection)
      return iou
  
file_path: mmdetection/mmdet/evaluation/metrics/coco_occluded_metric.py
imports: from typing import Dict, List, Optional, Union
  import mmengine
  import numpy
  from mmengine.fileio import load
  from mmengine.logging import print_log
  from pycocotools import mask
  from terminaltables import AsciiTable
  from mmdet.registry import METRICS
  from .coco_metric import CocoMetric
label_desc: Use image node_id 5 for calling the CocoOccludedSeparatedMetric obj's underlying member method code with example usage: obj.mask_iou(mask1, mask2) and returns: iou