          """
          for face in faces["detected_faces"]:
              face.load_aligned(faces["image"], size=size)
  
          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(faces["filename"]))
 
</s> remove         faces_count = len(faces["detected_faces"])
 </s> add         faces_count = len(extract_media.detected_faces) </s> remove                            os.path.basename(faces["filename"]))
 </s> add                            os.path.basename(extract_media.filename)) </s> remove         for face in faces["detected_faces"]:
            face.load_aligned(faces["image"], size=size)
 </s> add         for face in extract_media.detected_faces:
            face.load_aligned(extract_media.image, size=size) </s> remove         faces: dict
            Dictionary output from :class:`plugins.extract.Pipeline.Extractor`
 </s> add         extract_media: :class:`plugins.extract.pipeline.ExtractMedia`
            Output from :class:`plugins.extract.pipeline.Extractor` </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)
        self._post_process.do_actions(extract_media)
        extract_media.remove_image()
          """
          for face in faces["detected_faces"]:
              face.load_aligned(faces["image"], size=size)
  
        self._post_process.do_actions(extract_media)
        extract_media.remove_image()
  
          faces_count = len(faces["detected_faces"])
          if faces_count == 0:
              logger.verbose("No faces were detected in image: %s",
                             os.path.basename(faces["filename"]))
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