def convert_strided_predictions_to_normalized_boxes(boxes, stride, true_image_shapes):
    "Converts predictions in the output space to normalized boxes.\n\n  Boxes falling outside the valid image boundary are clipped to be on the\n  boundary.\n\n  Args:\n    boxes: A tensor of shape [batch_size, num_boxes, 4] holding the raw\n     coordinates of boxes in the model's output space.\n    stride: The stride in the output space.\n    true_image_shapes: A tensor of shape [batch_size, 3] representing the true\n      shape of the input not considering padding.\n\n  Returns:\n    boxes: A tensor of shape [batch_size, num_boxes, 4] representing the\n      coordinates of the normalized boxes.\n  "

    def _normalize_boxlist(args):
        (boxes, height, width) = args
        boxes = box_list_ops.scale(boxes, stride, stride)
        boxes = box_list_ops.to_normalized_coordinates(boxes, height, width)
        boxes = box_list_ops.clip_to_window(boxes, [0.0, 0.0, 1.0, 1.0], filter_nonoverlapping=False)
        return boxes
    box_lists = [box_list.BoxList(boxes) for boxes in tf.unstack(boxes, axis=0)]
    (true_heights, true_widths, _) = tf.unstack(true_image_shapes, axis=1)
    true_heights_list = tf.unstack(true_heights, axis=0)
    true_widths_list = tf.unstack(true_widths, axis=0)
    box_lists = list(map(_normalize_boxlist, zip(box_lists, true_heights_list, true_widths_list)))
    boxes = tf.stack([box_list_instance.get() for box_list_instance in box_lists], axis=0)
    return boxes
Converts predictions in the output space to normalized boxes.

Boxes falling outside the valid image boundary are clipped to be on the
boundary.

Args:
  boxes: A tensor of shape [batch_size, num_boxes, 4] holding the raw
   coordinates of boxes in the model's output space.
  stride: The stride in the output space.
  true_image_shapes: A tensor of shape [batch_size, 3] representing the true
    shape of the input not considering padding.

Returns:
  boxes: A tensor of shape [batch_size, num_boxes, 4] representing the
    coordinates of the normalized boxes.
def convert_strided_predictions_to_normalized_boxes(boxes, stride, true_image_shapes):
    "Converts predictions in the output space to normalized boxes.\n\n  Boxes falling outside the valid image boundary are clipped to be on the\n  boundary.\n\n  Args:\n    boxes: A tensor of shape [batch_size, num_boxes, 4] holding the raw\n     coordinates of boxes in the model's output space.\n    stride: The stride in the output space.\n    true_image_shapes: A tensor of shape [batch_size, 3] representing the true\n      shape of the input not considering padding.\n\n  Returns:\n    boxes: A tensor of shape [batch_size, num_boxes, 4] representing the\n      coordinates of the normalized boxes.\n  "

    def _normalize_boxlist(args):
        (boxes, height, width) = args
        boxes = box_list_ops.scale(boxes, stride, stride)
        boxes = box_list_ops.to_normalized_coordinates(boxes, height, width)
        boxes = box_list_ops.clip_to_window(boxes, [0.0, 0.0, 1.0, 1.0], filter_nonoverlapping=False)
        return boxes
    box_lists = [box_list.BoxList(boxes) for boxes in tf.unstack(boxes, axis=0)]
    (true_heights, true_widths, _) = tf.unstack(true_image_shapes, axis=1)
    true_heights_list = tf.unstack(true_heights, axis=0)
    true_widths_list = tf.unstack(true_widths, axis=0)
    box_lists = list(map(_normalize_boxlist, zip(box_lists, true_heights_list, true_widths_list)))
    boxes = tf.stack([box_list_instance.get() for box_list_instance in box_lists], axis=0)
    return boxes