                                file=sys.stdout,
                                desc=desc)
              for idx, faces in enumerate(status_bar):
                  self._check_thread_error()
                  exception = faces.get("exception", False)
                  if exception:
                      break
  
                  if self._extractor.final_pass:
                      self._output_processing(faces, size)
                      self._output_faces(saver, faces)
                      if self._save_interval and (idx + 1) % self._save_interval == 0:
                          self._alignments.save()
                  else:
                      del faces["image"]
                      # cache detected faces for next run
 
</s> remove                     del faces["image"]
                    # cache detected faces for next run
                    detected_faces[faces["filename"]] = faces
 </s> add                     extract_media.remove_image()
                    # cache extract_media for next run
                    detected_faces[extract_media.filename] = extract_media </s> remove             for idx, faces in enumerate(status_bar):
 </s> add             for idx, extract_media in enumerate(status_bar): </s> remove                                      len(self._rollover["detected_faces"]),
                                     frame_faces, item["filename"])
 </s> add                                      len(self._rollover.detected_faces), frame_faces,
                                     item.filename) </s> remove                                      len(self._rollover["detected_faces"]),
                                     frame_faces, item["filename"])
 </s> add                                      len(self._rollover.detected_faces), frame_faces,
                                     item.filename) </s> remove                         self._rollover = {k: v[f_idx + 1:] if k == "detected_faces" else v
                                          for k, v in item.items()}
 </s> add                         self._rollover = ExtractMedia(item.filename, item.image)
                        self._rollover.add_detected_faces(item.detected_faces[f_idx + 1:])
                if is_final:
                    self._output_processing(extract_media, size)
                    self._output_faces(saver, extract_media)
                                file=sys.stdout,
                                desc=desc)
              for idx, faces in enumerate(status_bar):
                  self._check_thread_error()
                if is_final:
                    self._output_processing(extract_media, size)
                    self._output_faces(saver, extract_media)
                if is_final:
                    self._output_processing(extract_media, size)
                    self._output_faces(saver, extract_media)
                if is_final:
                    self._output_processing(extract_media, size)
                    self._output_faces(saver, extract_media)
                if is_final:
                    self._output_processing(extract_media, size)
                    self._output_faces(saver, extract_media)
                if is_final:
                    self._output_processing(extract_media, size)
                    self._output_faces(saver, extract_media)
                if is_final:
                    self._output_processing(extract_media, size)
                    self._output_faces(saver, extract_media)
                if is_final:
                    self._output_processing(extract_media, size)
                    self._output_faces(saver, extract_media)
                      if self._save_interval and (idx + 1) % self._save_interval == 0:
                          self._alignments.save()
                  else:
                      del faces["image"]
                      # cache detected faces for next run
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
 plugins.extract - Create ExtractMedia class for pipeline flow
Bugfix - Fix memory leak in extract 
scripts/extract.py