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",")"]
docstr: Third stage of the MTCNN.
  
  :param img:
  :param total_boxes:
  :param stage_status:
  :return:
docstr_tok: ["Third","stage","of","the","MTCNN",".",":","param","img",":",":","param","total_boxes",":",":","param","stage_status",":",":","return",":"]
code: def __stage3(self, img, total_boxes, stage_status: StageStatus):
      """
      Third stage of the MTCNN.
  
      :param img:
      :param total_boxes:
      :param stage_status:
      :return:
      """
      num_boxes = total_boxes.shape[0]
      if num_boxes == 0:
          return total_boxes, np.empty(shape=(0,))
  
      total_boxes = np.fix(total_boxes).astype(np.int32)
  
      status = StageStatus(
          self.__pad(
              total_boxes.copy(),
              stage_status.width,
              stage_status.height,
          ),
          width=stage_status.width,
          height=stage_status.height,
      )
  
      tempimg = np.zeros((48, 48, 3, num_boxes))
  
      for k in range(0, num_boxes):
          tmp = np.zeros((int(status.tmph[k]), int(status.tmpw[k]), 3))
  
          tmp[
              status.dy[k] - 1 : status.edy[k],
              status.dx[k] - 1 : status.edx[k],
              :,
          ] = img[
              status.y[k] - 1 : status.ey[k],
              status.x[k] - 1 : status.ex[k],
              :,
          ]
  
          if (
              tmp.shape[0] > 0
              and tmp.shape[1] > 0
              or tmp.shape[0] == 0
              and tmp.shape[1] == 0
          ):
              tempimg[:, :, :, k] = cv2.resize(
                  tmp, (48, 48), interpolation=cv2.INTER_AREA
              )
          else:
              return np.empty(shape=(0,)), np.empty(shape=(0,))
  
      tempimg = (tempimg - 127.5) * 0.0078125
      tempimg1 = np.transpose(tempimg, (3, 1, 0, 2))
  
      out = self._onet.predict(tempimg1)
      out0 = np.transpose(out[0])
      out1 = np.transpose(out[1])
      out2 = np.transpose(out[2])
  
      score = out2[1, :]
  
      points = out1
  
      ipass = np.where(score > self._steps_threshold[2])
  
      points = points[:, ipass[0]]
  
      total_boxes = np.hstack(
          [
              total_boxes[ipass[0], 0:4].copy(),
              np.expand_dims(score[ipass].copy(), 1),
          ]
      )
  
      mv = out0[:, ipass[0]]
  
      w = total_boxes[:, 2] - total_boxes[:, 0] + 1
      h = total_boxes[:, 3] - total_boxes[:, 1] + 1
  
      points[0:5, :] = (
          np.tile(w, (5, 1)) * points[0:5, :]
          + np.tile(total_boxes[:, 0], (5, 1))
          - 1
      )
      points[5:10, :] = (
          np.tile(h, (5, 1)) * points[5:10, :]
          + np.tile(total_boxes[:, 1], (5, 1))
          - 1
      )
  
      if total_boxes.shape[0] > 0:
          total_boxes = self.__bbreg(
              total_boxes.copy(), np.transpose(mv)
          )
          pick = self.__nms(total_boxes.copy(), 0.7, "Min")
          total_boxes = total_boxes[pick, :]
          points = points[:, pick]
  
      return total_boxes, points
  
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 14 for calling the MTCNN obj's underlying member method code with example usage: obj.__stage3(img, total_boxes, stage_status) and returns: total_boxes,  points, total_boxes,  np, np,  np