class_docstr: Input processor for object detection.
class_docstr_tok: ["Input","processor","for","object","detection","."]
docstr: Clip boxes to fit in an image.
docstr_tok: ["Clip","boxes","to","fit","in","an","image","."]
code: def clip_boxes(self, boxes):
      """Clip boxes to fit in an image."""
      ymin, xmin, ymax, xmax = tf.unstack(boxes, axis=1)
      ymin = tf.clip_by_value(ymin, 0, self._output_size[0] - 1)
      xmin = tf.clip_by_value(xmin, 0, self._output_size[1] - 1)
      ymax = tf.clip_by_value(ymax, 0, self._output_size[0] - 1)
      xmax = tf.clip_by_value(xmax, 0, self._output_size[1] - 1)
      boxes = tf.stack([ymin, xmin, ymax, xmax], axis=1)
      return boxes
  
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 3 for calling the DetectionInputProcessor obj's underlying member method code with example usage: obj.clip_boxes(boxes) and returns: boxes