              final_faces.append({"file_location": self.output_dir / Path(filename).stem,
                                  "face": detected_face})
          faces["detected_faces"] = final_faces
  
      def output_faces(self, filename, faces, save_queue):
          """ Output faces to save thread """
          final_faces = list()
          for idx, detected_face in enumerate(faces["detected_faces"]):
              output_file = detected_face["file_location"]
              extension = Path(filename).suffix
 
</s> remove         load_queue.put(inp)
        faces = next(self.extractor.detect_faces())
 </s> add         self.extractor.input_queue.put(inp)
        faces = next(self.extractor.detected_faces()) </s> remove         self.threaded_io("reload", detected_faces)
 </s> add         if not self.verify_output and faces_count > 1:
            self.verify_output = True </s> remove     def run_extraction(self):
        """ Run Face Detection """
        save_queue = queue_manager.get_queue("extract_out")
        to_process = self.process_item_count()
        frame_no = 0
        size = self.args.size if hasattr(self.args, "size") else 256
        align_eyes = self.args.align_eyes if hasattr(self.args, "align_eyes") else False

        if self.plugins.is_parallel:
            logger.debug("Using parallel processing")
            self.plugins.launch_aligner()
            self.plugins.launch_detector()
        if not self.plugins.is_parallel:
            logger.debug("Using serial processing")
            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"):

            filename = faces["filename"]

            self.align_face(faces, align_eyes, size, filename)
            self.post_process.do_actions(faces)

            faces_count = len(faces["detected_faces"])
            if faces_count == 0:
                logger.verbose("No faces were detected in image: %s",
                               os.path.basename(filename))

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

            self.output_faces(filename, faces, save_queue)

            frame_no += 1
            if frame_no == self.save_interval:
                self.alignments.save()
                frame_no = 0

        save_queue.put("EOF")

 </s> add  </s> remove             del detected["image"]
            filename = detected["filename"]
 </s> add     def output_processing(self, faces, align_eyes, size, filename):
        """ Prepare faces for output """
        self.align_face(faces, align_eyes, size, filename)
        self.post_process.do_actions(faces) </s> remove     def detect_faces(self, load_queue, filename, image):
 </s> add     def detect_faces(self, filename, image):
    def output_faces(self, filename, faces):
              final_faces.append({"file_location": self.output_dir / Path(filename).stem,
                                  "face": detected_face})
          faces["detected_faces"] = final_faces
  
    def output_faces(self, filename, faces):
          """ Output faces to save thread """
          final_faces = list()
          for idx, detected_face in enumerate(faces["detected_faces"]):
              output_file = detected_face["file_location"]
              extension = Path(filename).suffix
keep keep keep keep replace keep keep keep keep keep
 Face filter vgg face (#724)

* Implement extraction pipeline

* Face filter to vgg_face. Resume partial model downloads

* On-the-fly conversion to extraction pipeline

* Move git model ids from get_model to model definition 
scripts/extract.py