          image_size = image.shape[:2]
          scale = self._set_scale(image_size)
          pad = self._set_padding(image_size, scale)
  
          image = self._scale_image(image, image_size, scale)
          image = self._pad_image(image)
          logger.trace("compiled: (images shape: %s, scale: %s, pad: %s)", image.shape, scale, pad)
          return image, scale, pad
  
      def _set_scale(self, image_size):
 
</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) </s> remove     def _compile_detection_image(self, input_image):
        """ Compile the detection image for feeding into the model"""
        image = self._convert_color(input_image)
 </s> add     def _compile_detection_image(self, item):
        """ Compile the detection image for feeding into the model </s> remove             for key, val in item.items():
                batch.setdefault(key, []).append(val)
            scaled_image, scale, pad = self._compile_detection_image(item["image"])
            batch.setdefault("scaled_image", []).append(scaled_image)
 </s> add             batch.setdefault("filename", []).append(item.filename)
            image, scale, pad = self._compile_detection_image(item)
            batch.setdefault("image", []).append(image) </s> remove             logger.trace("Yielding: (filename: '%s', image: %s, detected_faces: %s)",
                         retval["filename"], retval["image"].shape, len(retval["detected_faces"]))
            yield retval
 </s> add             logger.trace("Final Output: (filename: '%s', image shape: %s, detected_faces: %s, "
                         "item: %s)",
                         output.filename, output.image_shape, output.detected_faces, output)
            yield output
        image = self._scale_image(image, item.image_size, scale)
          image_size = image.shape[:2]
          scale = self._set_scale(image_size)
          pad = self._set_padding(image_size, scale)
  
        image = self._scale_image(image, item.image_size, scale)
          image = self._pad_image(image)
          logger.trace("compiled: (images shape: %s, scale: %s, pad: %s)", image.shape, scale, pad)
          return image, scale, pad
  
      def _set_scale(self, image_size):
keep keep keep keep replace keep keep keep keep keep
 plugins.extract - Create ExtractMedia class for pipeline flow
Bugfix - Fix memory leak in extract 
plugins/extract/detect/_base.py