          Pass in a DetectedFace object or Alignments dict """
      logger = logging.getLogger(__name__)  # pylint:disable=invalid-name
      logger.trace("Rotating landmarks: (rotation_matrix: %s, type(face): %s",
                   rotation_matrix, type(face))
      # Detected Face Object
      if isinstance(face, DetectedFace):
          bounding_box = [[face.x, face.y],
                          [face.x + face.w, face.y],
                          [face.x + face.w, face.y + face.h],
                          [face.x, face.y + face.h]]
 
</s> remove         landmarks = face.landmarksXY
 </s> add         landmarks = face.landmarks_xy </s> remove         Pass in a DetectedFace object, Alignments dict or bounding box dict
        (as defined in lib/plugins/extract/detect/_base.py) """
 </s> add         Pass in a DetectedFace object or Alignments dict """ </s> remove         landmarks = face.get("landmarksXY", list())

    # Bounding Box Dict
    elif isinstance(face, dict) and "left" in face:
        bounding_box = [[face["left"], face["top"]],
                        [face["right"], face["top"]],
                        [face["right"], face["bottom"]],
                        [face["left"], face["bottom"]]]
        landmarks = list()
 </s> add         landmarks = face.get("landmarks_xy", list()) </s> remove         if rotated_width is None or rotated_height is None:
            abs_cos = abs(rotation_matrix[0, 0])
            abs_sin = abs(rotation_matrix[0, 1])
            if rotated_width is None:
                rotated_width = int(height*abs_sin + width*abs_cos)
            if rotated_height is None:
                rotated_height = int(height*abs_cos + width*abs_sin)
        rotation_matrix[0, 2] += rotated_width/2 - image_center[0]
        rotation_matrix[1, 2] += rotated_height/2 - image_center[1]
 </s> add         rotation_matrix[0, 2] += self.input_size / 2 - image_center[0]
        rotation_matrix[1, 2] += self.input_size / 2 - image_center[1] </s> remove         return (cv2.warpAffine(image,  # pylint: disable=no-member
 </s> add         image = cv2.warpAffine(image,  # pylint: disable=no-member
    rotated_landmarks = None
          Pass in a DetectedFace object or Alignments dict """
      logger = logging.getLogger(__name__)  # pylint:disable=invalid-name
      logger.trace("Rotating landmarks: (rotation_matrix: %s, type(face): %s",
                   rotation_matrix, type(face))
    rotated_landmarks = None
      # Detected Face Object
      if isinstance(face, DetectedFace):
          bounding_box = [[face.x, face.y],
                          [face.x + face.w, face.y],
                          [face.x + face.w, face.y + face.h],
                          [face.x, face.y + face.h]]
keep keep keep add keep keep keep keep keep keep
 De-Multiprocess Extract (#871)

* requirements.txt: - Pin opencv to 4.1.1 (fixes cv2-dnn error)

* lib.face_detect.DetectedFace: change LandmarksXY to landmarks_xy. Add left, right, top, bottom attributes

* lib.model.session: Session manager for loading models into different graphs (for Nvidia + CPU)

* plugins.extract._base: New parent class for all extract plugins

* plugins.extract.pipeline. Remove MultiProcessing. Dynamically limit batchsize for Nvidia cards. Remove loglevel input

* S3FD + FAN plugins. Standardise to Keras version for all backends

* Standardize all extract plugins to new threaded codebase

* Documentation. Start implementing Numpy style docstrings for Sphinx Documentation

* Remove s3fd_amd. Change convert OTF to expect DetectedFace object

* faces_detect - clean up and documentation

* Remove PoolProcess

* Migrate manual tool to new extract workflow

* Remove AMD specific extractor code from cli and plugins

* Sort tool to new extract workflow

* Remove multiprocessing from project

* Remove multiprocessing queues from QueueManager

* Remove multiprocessing support from logger

* Move face_filter to new extraction pipeline

* Alignments landmarksXY > landmarks_xy and legacy handling

* Intercept get_backend for sphinx doc build

# Add Sphinx documentation 
lib/utils.py