class_docstr: Calculate mean AP for object detection task
  
  Parameters:
  ---------
  iou_thresh : float
      IOU overlap threshold for TP
  class_names : list of str
      optional, if provided, will print out AP for each class
class_docstr_tok: ["Calculate","mean","AP","for","object","detection","task","Parameters",":","--","--","--","--","-","iou_thresh",":","float","IOU","overlap","threshold","for","TP","class_names",":","list","of","str","optional",",","if","provided",",","will","print","out","AP","for","each","class"]
code: def __init__(self, iou_thresh=0.5, class_names=None):
      super(VOCMApMetric, self).__init__("VOCMeanAP")
      if class_names is None:
          self.num = None
      else:
          assert isinstance(class_names, (list, tuple))
          for name in class_names:
              assert isinstance(name, str), "must provide names as str"
          num = len(class_names)
          self.name = list(class_names) + ["mAP"]
          self.num = num + 1
      self.reset()
      self.iou_thresh = iou_thresh
      self.class_names = class_names
  
file_path: gluon-cv/gluoncv/utils/metrics/voc_detection.py
imports: from __future__ import division
  from collections import defaultdict
  import numpy
  import mxnet
  from ..bbox import bbox_iou
label_desc: Use image node_id 1 to create a new VOCMApMetric object from inherited base classes: EvalMetric with example: obj = VOCMApMetric(iou_thresh, class_names)