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 __rerec(bbox):
      # convert bbox to square
      height = bbox[:, 3] - bbox[:, 1]
      width = bbox[:, 2] - bbox[:, 0]
      max_side_length = np.maximum(width, height)
      bbox[:, 0] = bbox[:, 0] + width * 0.5 - max_side_length * 0.5
      bbox[:, 1] = bbox[:, 1] + height * 0.5 - max_side_length * 0.5
      bbox[:, 2:4] = bbox[:, 0:2] + np.transpose(
          np.tile(max_side_length, (2, 1))
      )
      return bbox
  
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 9 for calling the MTCNN obj's underlying member method code with example usage: obj.__rerec(bbox) and returns: bbox