              print("Multiple faces were detected in one or more pictures.")
              print("Double check your results.")
              print("-------------------------")
  
          images_found = 0
          num_faces_detected = 0
          print("Done!")
          return images_found, num_faces_detected
  
  
  class Images():
 
</s> remove         return images_found, num_faces_detected
 </s> add  </s> remove class Images():
    """ Holds the full frames/images """
    def __init__(self, arguments):
 </s> add class Alignments():
    """ Holds processes pertaining to the alignments file """
    def __init__(self, arguments, is_extract):
        self.is_extract = is_extract </s> remove         for filename, faces in tqdm(
                pool_process(
                    self.process_single_image,
                    self.images.input_images),
                total=self.images.images_found,
                file=sys.stdout):
            self.faces.num_faces_detected += 1
            self.faces.faces_detected[os.path.basename(filename)] = faces
 </s> add         if self.plugins.is_parallel:
            self.plugins.launch_aligner()
            self.plugins.launch_detector()

        if not self.plugins.is_parallel:
            self.run_detection(to_process)
            self.plugins.launch_aligner()

        for faces in tqdm(self.plugins.detect_faces(extract_pass="align"),
                          total=to_process,
                          file=sys.stdout,
                          desc="Extracting faces"):

            exception = faces.get("exception", False)
            if exception:
                break
            filename = faces["filename"]

            faces["output_file"] = self.output_dir / Path(filename).stem

            self.post_process.do_actions(faces)

            faces_count = len(faces["detected_faces"])
            if self.args.verbose and faces_count == 0:
                print("Warning: No faces were detected in image: "
                      "{}".format(os.path.basename(filename)))

            if not self.verify_output and faces_count > 1:
                self.verify_output = True

            self.process_faces(filename, faces)
 </s> remove         self.rotation_angles = self.get_rotation_angles()
        self.already_processed = self.get_already_processed()
        self.input_images = self.get_input_images()
        self.images_found = len(self.input_images)
 </s> add         self.serializer = self.get_serializer()
        self.location = self.get_location()
        self.have_alignments_file = os.path.exists(self.location)
        self.data = self.load() </s> remove                 self.write_alignments()
 </s> add                 self.alignments.save()
              print("Multiple faces were detected in one or more pictures.")
              print("Double check your results.")
              print("-------------------------")
  


          print("Done!")
          return images_found, num_faces_detected
  
  
  class Images():
keep keep keep keep replace 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 
scripts/fsmedia.py