              status_bar = tqdm(self._extractor.detected_faces(),
                                total=self._images.process_count,
                                file=sys.stdout,
                                desc=desc)
              for idx, faces in enumerate(status_bar):
                  self._check_thread_error()
                  exception = faces.get("exception", False)
                  if exception:
                      break
  
 
</s> remove                 exception = faces.get("exception", False)
                if exception:
                    break

                if self._extractor.final_pass:
                    self._output_processing(faces, size)
                    self._output_faces(saver, faces)
 </s> add                 if is_final:
                    self._output_processing(extract_media, size)
                    self._output_faces(saver, extract_media) </s> remove         filename, extension = os.path.splitext(os.path.basename(faces["filename"]))
        for idx, face in enumerate(faces["detected_faces"]):
 </s> add         filename, extension = os.path.splitext(os.path.basename(extract_media.filename))
        for idx, face in enumerate(extract_media.detected_faces): </s> remove         for idx, detect_face in enumerate(output_item["detected_faces"]):
 </s> add         for idx, detect_face in enumerate(extract_media.detected_faces): </s> remove         logger.trace("Outputting faces for %s", faces["filename"])
 </s> add         logger.trace("Outputting faces for %s", extract_media.filename) </s> remove         frame = os.path.splitext(os.path.basename(output_item["filename"]))[0]
        for idx, face in enumerate(output_item["detected_faces"]):
 </s> add         frame = os.path.splitext(os.path.basename(extract_media.filename))[0]
        for idx, face in enumerate(extract_media.detected_faces):
            for idx, extract_media in enumerate(status_bar):
              status_bar = tqdm(self._extractor.detected_faces(),
                                total=self._images.process_count,
                                file=sys.stdout,
                                desc=desc)
            for idx, extract_media in enumerate(status_bar):
                  self._check_thread_error()
                  exception = faces.get("exception", False)
                  if exception:
                      break
  
keep keep keep keep replace keep keep keep keep keep
 plugins.extract - Create ExtractMedia class for pipeline flow
Bugfix - Fix memory leak in extract 
scripts/extract.py