      def align_image(self, detected_face, image):
          """ Align the incoming image for prediction """
          logger.trace("Aligning image around center")
  
          box = (detected_face.left, detected_face.top, detected_face.right, detected_face.bottom)
          diff_height_width = detected_face.height - detected_face.width
          offset_y = int(abs(diff_height_width / 2))
          box_moved = self.move_box(box, [0, offset_y])
  
          # Make box square.
          roi = self.get_square_box(box_moved)
 
</s> remove         logger.trace("Created from BoundingBox: (x: %s, w: %s, y: %s. h: %s)",
 </s> add         logger.trace("Created from bounding box dict: (x: %s, w: %s, y: %s. h: %s)", </s> remove         center = np.array([(detected_face.left + detected_face.right) / 2.0,
                           (detected_face.top + detected_face.bottom) / 2.0])
 </s> add         center = np.array([(detected_face["left"] + detected_face["right"]) / 2.0,
                           (detected_face["top"] + detected_face["bottom"]) / 2.0]) </s> remove         center = np.array([(detected_face.left + detected_face.right) / 2.0,
                           (detected_face.top + detected_face.bottom) / 2.0])
 </s> add         center = np.array([(detected_face["left"] + detected_face["right"]) / 2.0,
                           (detected_face["top"] + detected_face["bottom"]) / 2.0]) </s> remove         center[1] -= detected_face.height * 0.12
 </s> add         height = detected_face["bottom"] - detected_face["top"]
        width = detected_face["right"] - detected_face["left"] </s> remove         center[1] -= detected_face.height * 0.12
 </s> add         height = detected_face["bottom"] - detected_face["top"]
        width = detected_face["right"] - detected_face["left"]
        box = (detected_face["left"],
               detected_face["top"],
               detected_face["right"],
               detected_face["bottom"])
        height = detected_face["bottom"] - detected_face["top"]
        width = detected_face["right"] - detected_face["left"]
        diff_height_width = height - width
      def align_image(self, detected_face, image):
          """ Align the incoming image for prediction """
          logger.trace("Aligning image around center")
  
        box = (detected_face["left"],
               detected_face["top"],
               detected_face["right"],
               detected_face["bottom"])
        height = detected_face["bottom"] - detected_face["top"]
        width = detected_face["right"] - detected_face["left"]
        diff_height_width = height - width
        box = (detected_face["left"],
               detected_face["top"],
               detected_face["right"],
               detected_face["bottom"])
        height = detected_face["bottom"] - detected_face["top"]
        width = detected_face["right"] - detected_face["left"]
        diff_height_width = height - width
          offset_y = int(abs(diff_height_width / 2))
          box_moved = self.move_box(box, [0, offset_y])
  
          # Make box square.
          roi = self.get_square_box(box_moved)
keep keep keep keep replace replace keep keep keep keep keep
 Bugfix: Extract - Remove BoundingBox object and replace with dict 
plugins/extract/align/cv2_dnn.py