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: get recall and precision from internal records 
docstr_tok: ["get","recall","and","precision","from","internal","records"]
code: def _recall_prec(self):
      """get recall and precision from internal records"""
      n_fg_class = max(self._n_pos.keys()) + 1
      prec = [None] * n_fg_class
      rec = [None] * n_fg_class
  
      for l in self._n_pos.keys():
          score_l = np.array(self._score[l])
          match_l = np.array(self._match[l], dtype=np.int32)
  
          order = score_l.argsort()[::-1]
          match_l = match_l[order]
  
          tp = np.cumsum(match_l == 1)
          fp = np.cumsum(match_l == 0)
  
          # If an element of fp + tp is 0,
          # the corresponding element of prec[l] is nan.
          with np.errstate(divide="ignore", invalid="ignore"):
              prec[l] = tp / (fp + tp)
          # If n_pos[l] is 0, rec[l] is None.
          if self._n_pos[l] > 0:
              rec[l] = tp / self._n_pos[l]
  
      return rec, prec
  
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 6 for calling the VOCMApMetric obj's underlying member method code with example usage: obj._recall_prec() and returns: rec,  prec