class_docstr: Allows to perform MTCNN Detection ->
      a) Detection of faces (with the confidence probability)
      b) Detection of keypoints (left eye, right eye, nose, mouth_left, mouth_right)
class_docstr_tok: ["Allows","to","perform","MTCNN","Detection","-",">","a",")","Detection","of","faces","(","with","the","confidence","probability",")","b",")","Detection","of","keypoints","(","left","eye",",","right","eye",",","nose",",","mouth_left",",","mouth_right",")"]
code: def __generate_bounding_box(imap, reg, scale, t):
      # use heatmap to generate bounding boxes
      stride = 2
      cellsize = 12
  
      imap = np.transpose(imap)
      dx1 = np.transpose(reg[:, :, 0])
      dy1 = np.transpose(reg[:, :, 1])
      dx2 = np.transpose(reg[:, :, 2])
      dy2 = np.transpose(reg[:, :, 3])
  
      y, x = np.where(imap >= t)
  
      if y.shape[0] == 1:
          dx1 = np.flipud(dx1)
          dy1 = np.flipud(dy1)
          dx2 = np.flipud(dx2)
          dy2 = np.flipud(dy2)
  
      score = imap[(y, x)]
      reg = np.transpose(
          np.vstack(
              [dx1[(y, x)], dy1[(y, x)], dx2[(y, x)], dy2[(y, x)]]
          )
      )
  
      if reg.size == 0:
          reg = np.empty(shape=(0, 3))
  
      bb = np.transpose(np.vstack([y, x]))
  
      q1 = np.fix((stride * bb + 1) / scale)
      q2 = np.fix((stride * bb + cellsize) / scale)
      boundingbox = np.hstack([q1, q2, np.expand_dims(score, 1), reg])
  
      return boundingbox, reg
  
imports: import cv2
  import numpy
  import pkg_resources
  from mtcnn.exceptions import InvalidImage
  from mtcnn.network.factory import NetworkFactory
label_desc: Use image node_id 6 for calling the MTCNN obj's underlying member method code with example usage: obj.__generate_bounding_box(imap, reg, scale, t) and returns: boundingbox,  reg