class_docstr: Input processor for object detection.
class_docstr_tok: ["Input","processor","for","object","detection","."]
docstr: Resize boxes and crop it to the self._output dimension.
docstr_tok: ["Resize","boxes","and","crop","it","to","the","self._output","dimension","."]
code: def resize_and_crop_boxes(self):
      """Resize boxes and crop it to the self._output dimension."""
      boxlist = preprocessor.box_list.BoxList(self._boxes)
      # boxlist is in range of [0, 1], so here we pass the scale_height/width
      # instead of just scale.
      boxes = preprocessor.box_list_scale(
          boxlist, self._scaled_height, self._scaled_width
      ).get()
      # Adjust box coordinates based on the offset.
      box_offset = tf.stack(
          [
              self._crop_offset_y,
              self._crop_offset_x,
              self._crop_offset_y,
              self._crop_offset_x,
          ]
      )
      boxes -= tf.cast(tf.reshape(box_offset, [1, 4]), tf.float32)
      # Clip the boxes.
      boxes = self.clip_boxes(boxes)
      # Filter out ground truth boxes that are illegal.
      indices = tf.where(
          tf.not_equal(
              (boxes[:, 2] - boxes[:, 0]) * (boxes[:, 3] - boxes[:, 1]),
              0,
          )
      )
      boxes = tf.gather_nd(boxes, indices)
      classes = tf.gather_nd(self._classes, indices)
      return boxes, classes
  
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 DetectionInputProcessor obj's underlying member method code with example usage: obj.resize_and_crop_boxes() and returns: boxes,  classes