      """
  
  import os
  
  from copy import copy
  
  import cv2
  import dlib
  
  from lib.gpu_stats import GPUStats
  from lib.utils import rotate_image_by_angle, rotate_landmarks
 
</s> remove      "detected_faces": <list of final DetectedFaces objects>}
 </s> add      "detected_faces": <list of tuples containing (dlibRectangle, Landmarks)>} </s> remove         # Detected_Face Object. Passed in from initialization to avoid race condition
        self.obj_detected_face = None

 </s> add  </s> remove         detected_faces = self.to_detected_face(output["image"],
                                               output["detected_faces"])
        output["detected_faces"] = detected_faces
 </s> add  </s> remove         self.obj_detected_face = kwargs["detected_face"]
 </s> add  </s> remove     def to_detected_face(self, image, dlib_rects):
        """ Convert list of dlib rectangles to a
            list of DetectedFace objects
            and add the cropped face """
        retval = list()
        for d_rect in dlib_rects:
            if not isinstance(
                    d_rect,
                    dlib.rectangle):  # pylint: disable=c-extension-no-member
                retval.append(list())
                continue
            this_face = copy(self.obj_detected_face)
            this_face.from_dlib_rect(d_rect)
            this_face.image_to_face(image)
            this_face.frame_dims = image.shape[:2]
            retval.append(this_face)
        return retval

 </s> add 
      """
  
  import os
  


  import cv2
  import dlib
  
  from lib.gpu_stats import GPUStats
  from lib.utils import rotate_image_by_angle, rotate_landmarks
keep keep keep keep replace replace keep keep keep keep keep
 Remove DetectedFace object from plugins due to multiprocess error 
plugins/extract/detect/_base.py