          retval = d_rectangle(left, top, right, bottom)
          logger.trace("Returning: %s", retval)
          return retval
  
      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()
          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)
  
 
</s> remove         logger.trace("Created from dlib_rectangle: (x: %s, w: %s, y: %s. h: %s)",
 </s> add         logger.trace("Created from BoundingBox: (x: %s, w: %s, y: %s. h: %s)", </s> remove         retval = d_rectangle(left, top, right, bottom)
 </s> add         retval = BoundingBox(left, top, right, bottom) </s> remove     def to_dlib_rect(self):
        """ Return Bounding Box as Dlib Rectangle """
 </s> add     def to_bounding_box(self):
        """ Return Bounding Box as BoundingBox """ </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         """ Set a dlib rectangle for predetected faces """
 </s> add         """ Set a BoundingBox for predetected faces """
    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
          retval = d_rectangle(left, top, right, bottom)
          logger.trace("Returning: %s", retval)
          return retval
  
    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
    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
    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
    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
    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
    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
    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
    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
    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
          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)
  
keep keep keep keep replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Remove dlib.rectangles. Replace with BoundingBox class 
lib/faces_detect.py