          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 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 """
 
</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     def to_bounding_box(self):
        """ Return Bounding Box as BoundingBox """
        left = self.x
        top = self.y
        right = self.x + self.w
        bottom = self.y + self.h
        retval = BoundingBox(left, top, right, bottom)
 </s> add     def to_bounding_box_dict(self):
        """ Return Bounding Box as a bounding box dixt """
        retval = dict(left=self.x, top=self.y, right=self.x + self.w, bottom=self.y + self.h) </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         # Sometimes BoundingBox doesn't get imported from the parent process
        # Hacky fix to import it inside the process
        global BoundingBox  # pylint:disable=global-statement,invalid-name
        from lib.faces_detect import BoundingBox as bb  # pylint:disable=reimported
        BoundingBox = bb
 </s> add  </s> remove         face = face.to_bounding_box()
 </s> add         face = face.to_bounding_box_dict()
        logger.trace("Created from bounding box dict: (x: %s, w: %s, y: %s. h: %s)",
          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 bounding box dict: (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
 Bugfix: Extract - Remove BoundingBox object and replace with dict 
lib/faces_detect.py