          landmarks = faces["landmarks"]
          detected_faces = faces["detected_faces"]
          for idx, face in enumerate(detected_faces):
              detected_face = DetectedFace()
              detected_face.from_dlib_rect(face, image)
              detected_face.landmarksXY = landmarks[idx]
              detected_face.load_aligned(image, size=size, align_eyes=align_eyes)
              final_faces.append({"file_location": self.output_dir / Path(filename).stem,
                                  "face": detected_face})
          faces["detected_faces"] = final_faces
 
</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         detected = [dlib.rectangle(  # pylint: disable=c-extension-no-member
            int(face.left() / scale),
            int(face.top() / scale),
            int(face.right() / scale),
            int(face.bottom() / scale))
 </s> add         detected = [BoundingBox(face.left / scale, face.top / scale,
                                face.right / scale, face.bottom / scale) </s> remove         detected = [dlib.rectangle(  # pylint: disable=c-extension-no-member
            int(face.left() / scale),
            int(face.top() / scale),
            int(face.right() / scale),
            int(face.bottom() / scale))
 </s> add         detected = [BoundingBox(face.left / scale, face.top / scale,
                                face.right / scale, face.bottom / scale) </s> remove         detected = [dlib.rectangle(  # pylint: disable=c-extension-no-member
            int(face.left() / scale), int(face.top() / scale),
            int(face.right() / scale), int(face.bottom() / scale))
 </s> add         detected = [BoundingBox(face.left / scale, face.top / scale,
                                face.right / scale, face.bottom / scale) </s> remove     elif isinstance(face,
                    dlib.rectangle):  # pylint: disable=c-extension-no-member
        bounding_box = [[face.left(), face.top()],
                        [face.right(), face.top()],
                        [face.right(), face.bottom()],
                        [face.left(), face.bottom()]]
 </s> add     elif isinstance(face, BoundingBox):
        bounding_box = [[face.left, face.top],
                        [face.right, face.top],
                        [face.right, face.bottom],
                        [face.left, face.bottom]]
            detected_face.from_bounding_box(face, image)
          landmarks = faces["landmarks"]
          detected_faces = faces["detected_faces"]
          for idx, face in enumerate(detected_faces):
              detected_face = DetectedFace()
            detected_face.from_bounding_box(face, image)
              detected_face.landmarksXY = landmarks[idx]
              detected_face.load_aligned(image, size=size, align_eyes=align_eyes)
              final_faces.append({"file_location": self.output_dir / Path(filename).stem,
                                  "face": detected_face})
          faces["detected_faces"] = final_faces
keep keep keep keep replace keep keep keep keep keep
 Remove dlib.rectangles. Replace with BoundingBox class 
scripts/extract.py