                   padding=48, align_eyes=False):
          self.size = size
          self.padding = padding
          self.align_eyes = align_eyes
          self.extractor = PluginLoader.get_extractor("Align")()
          self.alignments = alignments
          self.frames = frames
  
          self.current_frame = None
          self.faces = list()
 
</s> remove         self.extract = Extract(None, "manual",
                               initialize_only=True, verbose=verbose)
 </s> add         self.extractor = {
            "detect": PluginLoader.get_detector("manual")(verbose=verbose),
            "align": PluginLoader.get_aligner("fan")(verbose=verbose)}
        self.init_extractor()
 </s> remove         self.faces = Faces(self.args)
        self.alignments = Alignments(self.args)
 </s> add         self.alignments = Alignments(self.args, True)
        self.plugins = Plugins(self.args) </s> remove         self.output_dir = self.faces.output_dir
 </s> add         self.post_process = PostProcess(arguments) </s> remove class DetectedFace():
    """ Detected face and landmark information """
    def __init__(self):
        self.image = None
        self.x = None
        self.w = None
        self.y = None
        self.h = None
        self.landmarksXY = None

    def alignment_to_face(self, image, alignment):
        """ Convert a face alignment to detected face object """
        self.image = image
        self.x = alignment["x"]
        self.w = alignment["w"]
        self.y = alignment["y"]
        self.h = alignment["h"]
        self.landmarksXY = alignment["landmarksXY"]

    def face_to_alignment(self, alignment):
        """ Convert a face alignment to detected face object """
        alignment["x"] = self.x
        alignment["w"] = self.w
        alignment["y"] = self.y
        alignment["h"] = self.h
        alignment["landmarksXY"] = self.landmarksXY
        return alignment

    def landmarks_as_xy(self):
        """ Landmarks as XY """
        return self.landmarksXY


 </s> add  </s> remove         self.faces = Faces(self.args)
        self.alignments = Alignments(self.args)
 </s> add         self.alignments = Alignments(self.args, False)

        # Legacy rotation conversion
        Rotate(self.alignments, self.args.verbose, self.images.input_images)

        self.post_process = PostProcess(arguments)
        self.verify_output = False
        self.extractor = AlignerExtract()
                   padding=48, align_eyes=False):
          self.size = size
          self.padding = padding
          self.align_eyes = align_eyes
        self.extractor = AlignerExtract()
          self.alignments = alignments
          self.frames = frames
  
          self.current_frame = None
          self.faces = list()
keep keep keep keep replace keep keep keep keep keep
 Extraction - Speed improvements (#522) (#523)

* Extraction - Speed improvements (#522)

* Initial Plugin restructure

* Detectors to plugins. Detector speed improvements

* Re-implement dlib aligner, remove models, FAN to TF. Parallel processing

* Update manual, update convert, implement parallel/serial switching

* linting + fix cuda check (setup.py). requirements update keras 2.2.4

* Add extract size option. Fix dlib hog init

* GUI: Increase tooltip width

* Update alignment tool to support new DetectedFace

* Add skip existing faces option

* Fix sort tool to new plugin structure

* remove old align plugin

* fix convert -skip faces bug

* Fix convert skipping no faces frames

* Convert - draw onto transparent layer

* Fix blur threshold bug

* fix skip_faces convert bug

* Fix training 
tools/lib_alignments/media.py