          # the calculated batch size that the amount of available VRAM
          # will support. It is also used for holding the number of threads/
          # processes for parallel processing plugins
          self.batch_size = 1
  
          if rotation is not None:
              deprecation_warning("Rotation ('-r', '--rotation')",
                                  additional_info="It is not necessary for most detectors and will "
                                                  "be moved to plugin config for those detectors "
                                                  "that require it.")
          logger.debug("Initialized _base %s", self.__class__.__name__)
  
      # <<< OVERRIDE METHODS >>> #
      def initialize(self, *args, **kwargs):
          """ Inititalize the detector
 
</s> remove         image = self.scale_image(image, scale)
        return [image, scale]
 </s> add         image = self.scale_image(image, scale, pad_to)
        if pad_to is None:
            return [image, scale]
        pad_left = int(pad_to[0] - int(input_image.shape[1] * scale)) // 2
        pad_top = int(pad_to[1] - int(input_image.shape[0] * scale)) // 2
        return [image, scale, (pad_left, pad_top)] </s> remove     def scale_image(image, scale):
        """ Scale the image """
 </s> add     def scale_image(image, scale, pad_to=None):
        """ Scale the image and optional pad to given size """ </s> remove                                 is_square=False, scale_up=False, to_rgb=False, to_grayscale=False):
 </s> add                                 is_square=False, scale_up=False, to_rgb=False,
                                to_grayscale=False, pad_to=None): </s> remove                     predicted = self.predict(feed_faces)
 </s> add                     batch_size = None
                    if is_plaidml and feed_faces.shape[0] != self.batchsize:
                        logger.verbose("Fallback to BS=1")
                        batch_size = 1
                    predicted = self.predict(feed_faces, batch_size) </s> remove         dims = (int(width * scale), int(height * scale))

        if scale < 1.0:
            logger.trace("Resizing image from %sx%s to %s.",
                         width, height, "x".join(str(i) for i in dims))
 </s> add         if scale != 1.0:
            dims = (int(width * scale), int(height * scale))
            if scale < 1.0:
                logger.verbose("Resizing image from %sx%s to %s. Scale=%s",
                               width, height, "x".join(str(i) for i in dims), scale)
            image = cv2.resize(image, dims, interpolation=interpln)
        if pad_to:
            image = Detector.pad_image(image, pad_to)
        return image
          # the calculated batch size that the amount of available VRAM
          # will support. It is also used for holding the number of threads/
          # processes for parallel processing plugins
          self.batch_size = 1






          logger.debug("Initialized _base %s", self.__class__.__name__)
  
      # <<< OVERRIDE METHODS >>> #
      def initialize(self, *args, **kwargs):
          """ Inititalize the detector
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
 Added s3fd-amd + minor fixes (#837) 
plugins/extract/detect/_base.py