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"]
docstr: update num_inst and sum_metric 
docstr_tok: ["update","num_inst","and","sum_metric"]
code: def _update(self):
      """update num_inst and sum_metric"""
      aps = []
      recall, precs = self._recall_prec()
      for l, rec, prec in zip(range(len(precs)), recall, precs):
          ap = self._average_precision(rec, prec)
          aps.append(ap)
          if self.num is not None and l < (self.num - 1):
              self.sum_metric[l] = ap
              self.num_inst[l] = 1
      if self.num is None:
          self.num_inst = 1
          self.sum_metric = np.nanmean(aps)
      else:
          self.num_inst[-1] = 1
          self.sum_metric[-1] = np.nanmean(aps)
  
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 5 for calling the VOCMApMetric obj's underlying member method code with example usage: obj._update() without return types