  class Detect(Detector):
      """ MTCNN detector for face recognition """
      def __init__(self, **kwargs):
          git_model_id = 2
          model_filename = ["mtcnn_det_v1.1.npy", "mtcnn_det_v1.2.npy", "mtcnn_det_v1.3.npy"]
          super().__init__(git_model_id=git_model_id, model_filename=model_filename, **kwargs)
          self.kwargs = self.validate_kwargs()
          self.name = "mtcnn"
          self.target = 2073600  # Uses approx 1.30 GB of VRAM
          self.vram = 1408
 
</s> remove         self.kwargs = self.validate_kwargs()
        self.name = "mtcnn"
        self.target = 2073600  # Uses approx 1.30 GB of VRAM
 </s> add         self.name = "MTCNN"
        self.input_size = 1440 </s> remove         git_model_id = 3
        model_filename = "s3fd_v1.pb"
 </s> add         git_model_id = 11
        model_filename = "s3fd_keras_v1.h5" </s> remove # Must import tensorflow inside the spawned process
# for Windows machines
tf = None  # pylint: disable = invalid-name


def import_tensorflow():
    """ Import tensorflow from inside spawned process """
    global tf  # pylint: disable = invalid-name,global-statement
    import tensorflow as tflow
    tf = tflow


 </s> add  </s> remove         self.target = (300, 300)  # Doesn't use VRAM
        self.vram = 0
        self.detector = None
 </s> add         self.name = "cv2-DNN Detector"
        self.input_size = 300
        self.vram = 0  # CPU Only. Doesn't use VRAM
        self.batchsize = 1 </s> remove         git_model_id = 0
        model_filename = "face-alignment-network_2d4_v1.pb"
        super().__init__(git_model_id=git_model_id,
                         model_filename=model_filename,
                         colorspace="RGB",
                         input_size=256,
                         **kwargs)
 </s> add         git_model_id = 9
        model_filename = "face-alignment-network_2d4_keras_v1.h5"
        super().__init__(git_model_id=git_model_id, model_filename=model_filename, **kwargs)
        self.name = "FAN"
        self.input_size = 256
        self.colorformat = "RGB"
        model_filename = ["mtcnn_det_v2.1.h5", "mtcnn_det_v2.2.h5", "mtcnn_det_v2.3.h5"]
  class Detect(Detector):
      """ MTCNN detector for face recognition """
      def __init__(self, **kwargs):
          git_model_id = 2
        model_filename = ["mtcnn_det_v2.1.h5", "mtcnn_det_v2.2.h5", "mtcnn_det_v2.3.h5"]
          super().__init__(git_model_id=git_model_id, model_filename=model_filename, **kwargs)
          self.kwargs = self.validate_kwargs()
          self.name = "mtcnn"
          self.target = 2073600  # Uses approx 1.30 GB of VRAM
          self.vram = 1408
keep keep keep keep replace 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 
plugins/extract/detect/mtcnn.py