          self.y = d_rect.top()
          self.h = d_rect.bottom() - d_rect.top()
          if image is not None and image.any():
              self.image_to_face(image)
          logger.trace("Created from dlib_rectangle: (x: %s, w: %s, y: %s. h: %s)",
                       self.x, self.w, self.y, self.h)
  
      def image_to_face(self, image):
          """ Crop an image around bounding box to the face
              and capture it's dimensions """
 
</s> remove     def from_dlib_rect(self, d_rect, image=None):
        """ Set Bounding Box from a Dlib Rectangle """
        logger.trace("Creating from dlib_rectangle: %s", d_rect)
        if not isinstance(d_rect, d_rectangle):
            raise ValueError("Supplied Bounding Box is not a dlib.rectangle.")
        self.x = d_rect.left()
        self.w = d_rect.right() - d_rect.left()
        self.y = d_rect.top()
        self.h = d_rect.bottom() - d_rect.top()
 </s> add     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> remove         box = (detected_face.left(), detected_face.top(),
               detected_face.right(), detected_face.bottom())
        diff_height_width = (box[3] - box[1]) - (box[2] - box[0])
 </s> add         box = (detected_face.left, detected_face.top, detected_face.right, detected_face.bottom)
        diff_height_width = detected_face.height - detected_face.width </s> remove         d_rect, landmarks = extract_data
        alignment["x"] = d_rect.left()
        alignment["w"] = d_rect.right() - d_rect.left()
        alignment["y"] = d_rect.top()
        alignment["h"] = d_rect.bottom() - d_rect.top()
 </s> add         bbox, landmarks = extract_data
        alignment["x"] = bbox.left
        alignment["w"] = bbox.width
        alignment["y"] = bbox.top
        alignment["h"] = bbox.height </s> remove         center = np.array([(detected_face.left()
                            + detected_face.right()) / 2.0,
                           (detected_face.top()
                            + detected_face.bottom()) / 2.0])

        center[1] -= (detected_face.bottom()
                      - detected_face.top()) * 0.12

        scale = (detected_face.right()
                 - detected_face.left()
                 + detected_face.bottom()
                 - detected_face.top()) / self.reference_scale
 </s> add         center = np.array([(detected_face.left + detected_face.right) / 2.0,
                           (detected_face.top + detected_face.bottom) / 2.0])

        center[1] -= detected_face.height * 0.12

        scale = (detected_face.width + detected_face.height) / self.reference_scale </s> remove         Pass in a DetectedFace object, Alignments dict or DLib rectangle"""
 </s> add         Pass in a DetectedFace object, Alignments dict or BoundingBox"""
        logger.trace("Created from BoundingBox: (x: %s, w: %s, y: %s. h: %s)",
          self.y = d_rect.top()
          self.h = d_rect.bottom() - d_rect.top()
          if image is not None and image.any():
              self.image_to_face(image)
        logger.trace("Created from BoundingBox: (x: %s, w: %s, y: %s. h: %s)",
                       self.x, self.w, self.y, self.h)
  
      def image_to_face(self, image):
          """ Crop an image around bounding box to the face
              and capture it's dimensions """
keep keep keep keep replace keep keep keep keep keep
 Remove dlib.rectangles. Replace with BoundingBox class 
lib/faces_detect.py