              face.hash, image = encode_image_with_hash(face.aligned_face, extension)
  
              saver.save(output_filename, image)
              final_faces.append(face.to_alignment())
          self._alignments.data[os.path.basename(faces["filename"])] = final_faces
 
</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         logger.trace("Outputting faces for %s", faces["filename"])
 </s> add         logger.trace("Outputting faces for %s", extract_media.filename) </s> remove             image = self.pad_image(roi, face.image)
 </s> add             image = self.pad_image(roi, image) </s> remove         faces: dict
            The output dictionary from :class:`plugins.extract.Pipeline.Extractor`
 </s> add         extract_media: :class:`~plugins.extract.pipeline.ExtractMedia`
            The output from :class:`~plugins.extract.Pipeline.Extractor` </s> remove         image_size = image.shape[:2]
        scale = self._set_scale(image_size)
        pad = self._set_padding(image_size, scale)
 </s> add         Parameters
        ----------
        item: :class:`plugins.extract.pipeline.ExtractMedia`
            The input item from the pipeline
        """
        image = item.get_image_copy(self.colorformat)
        scale = self._set_scale(item.image_size)
        pad = self._set_padding(item.image_size, scale)
        self._alignments.data[os.path.basename(extract_media.filename)] = final_faces
        del extract_media
              face.hash, image = encode_image_with_hash(face.aligned_face, extension)
  
              saver.save(output_filename, image)
              final_faces.append(face.to_alignment())
        self._alignments.data[os.path.basename(extract_media.filename)] = final_faces
        del extract_media
keep keep keep keep replace
 plugins.extract - Create ExtractMedia class for pipeline flow
Bugfix - Fix memory leak in extract 
scripts/extract.py