      def alignment_dict(image):
          """ Set the image to a dict for alignment """
          height, width = image.shape[:2]
          face = DetectedFace(x=0, w=width, y=0, h=height)
          face = face.to_bounding_box()
          return {"image": image,
                  "detected_faces": [face]}
  
      @staticmethod
      def get_landmarks(filename):
 
</s> remove         """ Rotate a BoundingBox based on the rotation_matrix"""
        logger.trace("Rotating BoundingBox")
 </s> add         """ Rotate a bounding box dict based on the rotation_matrix"""
        logger.trace("Rotating bounding box") </s> remove     def set_predetected(width, height):
        """ Set a BoundingBox for predetected faces """
 </s> add     def to_bounding_box_dict(left, top, right, bottom):
        """ Return a dict for the bounding box """
        return dict(left=int(round(left)),
                    right=int(round(right)),
                    top=int(round(top)),
                    bottom=int(round(bottom)))

    def set_predetected(self, width, height):
        """ Set a bounding box dict for predetected faces """ </s> remove     def from_bounding_box(self, bounding_box, image=None):
        """ Set Bounding Box from a BoundingBox """
        logger.trace("Creating from BoundingBox: %s", bounding_box)
        if not isinstance(bounding_box, BoundingBox):
            raise ValueError("Supplied Bounding Box is not a BoundingBox.")
        self.x = bounding_box.left
        self.w = bounding_box.width
        self.y = bounding_box.top
        self.h = bounding_box.height
 </s> add     def from_bounding_box_dict(self, bounding_box_dict, image=None):
        """ Set Bounding Box from a bounding box dict """
        logger.trace("Creating from bounding box dict: %s", bounding_box_dict)
        if not isinstance(bounding_box_dict, dict):
            raise ValueError("Supplied Bounding Box is not a dictionary.")
        self.x = bounding_box_dict["left"]
        self.w = bounding_box_dict["right"] - bounding_box_dict["left"]
        self.y = bounding_box_dict["top"]
        self.h = bounding_box_dict["bottom"] - bounding_box_dict["top"] </s> remove         box = (detected_face.left, detected_face.top, detected_face.right, detected_face.bottom)
        diff_height_width = detected_face.height - detected_face.width
 </s> add         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 </s> remove      "detected_faces": <list of BoundingBoxes>} (Class defined in /lib/faces_detect)
 </s> add      "detected_faces": <list of dicts containing bounding box points>}}

    - Use the function self.to_bounding_box_dict(left, right, top, bottom) to define the dict
        face = face.to_bounding_box_dict()
      def alignment_dict(image):
          """ Set the image to a dict for alignment """
          height, width = image.shape[:2]
          face = DetectedFace(x=0, w=width, y=0, h=height)
        face = face.to_bounding_box_dict()
          return {"image": image,
                  "detected_faces": [face]}
  
      @staticmethod
      def get_landmarks(filename):
keep keep keep keep replace keep keep keep keep keep
 Bugfix: Extract - Remove BoundingBox object and replace with dict 
tools/sort.py