class_docstr: An evaluation extension of instance-segmentation by PASCAL VOC metric.
  
  This extension iterates over an iterator and evaluates the prediction
  results by average precisions (APs) and mean of them
  (mean Average Precision, mAP).
  This extension reports the following values with keys.
  Please note that :obj:`'ap/<label_names[l]>'` is reported only if
  :obj:`label_names` is specified.
  
  * :obj:`'map'`: Mean of average precisions (mAP).
  * :obj:`'ap/<label_names[l]>'`: Average precision for class         :obj:`label_names[l]`, where :math:`l` is the index of the class.         For example, this evaluator reports :obj:`'ap/aeroplane'`,         :obj:`'ap/bicycle'`, etc. if :obj:`label_names` is         :obj:`~chainercv.datasets.sbd_instance_segmentation_label_names`.         If there is no bounding box assigned to class :obj:`label_names[l]`         in either ground truth or prediction, it reports :obj:`numpy.nan` as         its average precision.         In this case, mAP is computed without this class.
  
  Args:
      iterator (chainer.Iterator): An iterator. Each sample should be
          following tuple :obj:`img, bbox, label` or
          :obj:`img, bbox, label, difficult`.
          :obj:`img` is an image, :obj:`bbox` is coordinates of bounding
          boxes, :obj:`label` is labels of the bounding boxes and
          :obj:`difficult` is whether the bounding boxes are difficult or
          not. If :obj:`difficult` is returned, difficult ground truth
          will be ignored from evaluation.
      target (chainer.Link): An instance-segmentation link. This link must
          have :meth:`predict` method that takes a list of images and returns
          :obj:`bboxes`, :obj:`labels` and :obj:`scores`.
      iou_thresh (float): Intersection over Union (IoU) threshold for
          calulating average precision. The default value is 0.5.
      use_07_metric (bool): Whether to use PASCAL VOC 2007 evaluation metric
          for calculating average precision. The default value is
          :obj:`False`.
      label_names (iterable of strings): An iterable of names of classes.
          If this value is specified, average precision for each class is
          also reported with the key :obj:`'ap/<label_names[l]>'`.
      comm (~chainermn.communicators.CommunicatorBase):
          A ChainerMN communicator.
          If it is specified, this extension scatters the iterator of
          root worker and gathers the results to the root worker.
code: def __init__(
      self,
      iterator,
      target,
      iou_thresh=0.5,
      use_07_metric=False,
      label_names=None,
      comm=None,
  ):
      if iterator is None:
          iterator = {}
      super(InstanceSegmentationVOCEvaluator, self).__init__(
          iterator, target
      )
      self.iou_thresh = iou_thresh
      self.use_07_metric = use_07_metric
      self.label_names = label_names
      self.comm = comm
  
file_path: chainercv/chainercv/extensions/evaluator/instance_segmentation_voc_evaluator.py
imports: import copy
  import numpy
  from chainer import reporter
  import chainer.training.extensions
  from chainercv.evaluations import eval_instance_segmentation_voc
  from chainercv.utils import apply_to_iterator
label_desc: Use image node_id 1 to create a new InstanceSegmentationVOCEvaluator object from inherited base classes: chainer.training.extensions with example: obj = InstanceSegmentationVOCEvaluator(iterator, target, iou_thresh, use_07_metric, label_names, comm)