  """ Facial landmarks extractor for faceswap.py
      Code adapted and modified from:
      https://github.com/1adrianb/face-alignment
  """
  import cv2
  import numpy as np
  
  from lib.model.session import KSession
  from ._base import Aligner, AlignerBatch, logger
 
</s> remove from ._base import Aligner, logger
 </s> add from ._base import Aligner, AlignerBatch, logger

if TYPE_CHECKING:
    from lib.align import DetectedFace </s> remove from ._base import Aligner, logger
 </s> add from ._base import Aligner, AlignerBatch, logger

if TYPE_CHECKING:
    from lib.align.detected_face import DetectedFace </s> remove     @staticmethod
    def get_pts_from_predict(batch):
        """ Get points from predictor """
        for prediction, roi, offset in zip(batch["prediction"], batch["roi"], batch["offsets"]):
 </s> add     @classmethod
    def get_pts_from_predict(cls, batch: AlignerBatch):
        """ Get points from predictor and populates the :attr:`landmarks` property

        Parameters
        ----------
        batch: :class:`AlignerBatch`
            The current batch from the model with :attr:`predictions` populated
        """
        landmarks = []
        for prediction, roi, offset in zip(batch.prediction,
                                           batch.data[0]["roi"],
                                           batch.data[0]["offsets"]): </s> remove     def predict(self, batch):
        """ Predict the 68 point landmarks """
 </s> add     def predict(self, batch: np.ndarray) -> np.ndarray:
        """ Predict the 68 point landmarks

        Parameters
        ----------
        batch: :class:`numpy.ndarray`
            The batch to feed into the aligner

        Returns
        -------
        :class:`numpy.ndarray`
            The predictions from the aligner
        """
from typing import cast, List, TYPE_CHECKING

  """ Facial landmarks extractor for faceswap.py
      Code adapted and modified from:
      https://github.com/1adrianb/face-alignment
  """
from typing import cast, List, TYPE_CHECKING

  import cv2
  import numpy as np
  
  from lib.model.session import KSession
  from ._base import Aligner, AlignerBatch, logger
keep keep keep add keep keep keep keep keep
 Extract updates:
  - Default CPU detector to MTCNN
  - add basic Aligner false positive filters
  - Typing: align + plugins
  - Use specific AlignerBatch class for alignment
  - 
plugins/extract/align/fan.py