class_docstr: Base class of Input processor.
class_docstr_tok: ["Base","class","of","Input","processor","."]
docstr: Set the parameters to resize input image to self._output_size.
docstr_tok: ["Set","the","parameters","to","resize","input","image","to","self._output_size","."]
code: def set_scale_factors_to_output_size(self):
      """Set the parameters to resize input image to self._output_size."""
      # Compute the scale_factor using rounded scaled image size.
      height = tf.cast(tf.shape(self._image)[0], tf.float32)
      width = tf.cast(tf.shape(self._image)[1], tf.float32)
      image_scale_y = tf.cast(self._output_size[0], tf.float32) / height
      image_scale_x = tf.cast(self._output_size[1], tf.float32) / width
      image_scale = tf.minimum(image_scale_x, image_scale_y)
      scaled_height = tf.cast(height * image_scale, tf.int32)
      scaled_width = tf.cast(width * image_scale, tf.int32)
      self._image_scale = image_scale
      self._scaled_height = scaled_height
      self._scaled_width = scaled_width
  
imports: from absl import logging
  import tensorflow
  import utils
  from pipeline import anchors
  from .None import preprocessor
  from .None import tf_example_decoder
label_desc: Use image node_id 4 for calling the InputProcessor obj's underlying member method code with example usage: obj.set_scale_factors_to_output_size() without return types