def scale_height_width(boxlist, y_scale, x_scale, scope=None):
  """Scale the height and width of boxes, leaving centers unchanged.

  Args:
    boxlist: BoxList holding N boxes
    y_scale: (float) scalar tensor
    x_scale: (float) scalar tensor
    scope: name scope.

  Returns:
    boxlist: BoxList holding N boxes
  """
  with tf.name_scope(scope, 'ScaleHeightWidth'):
    y_scale = tf.cast(y_scale, tf.float32)
    x_scale = tf.cast(x_scale, tf.float32)
    yc, xc, height_orig, width_orig = boxlist.get_center_coordinates_and_sizes()
    y_min = yc - 0.5 * y_scale * height_orig
    y_max = yc + 0.5 * y_scale * height_orig
    x_min = xc - 0.5 * x_scale * width_orig
    x_max = xc + 0.5 * x_scale * width_orig
    scaled_boxlist = box_list.BoxList(
        tf.stack([y_min, x_min, y_max, x_max], 1))
    return _copy_extra_fields(scaled_boxlist, boxlist)
Scale the height and width of boxes, leaving centers unchanged.

  Args:
    boxlist: BoxList holding N boxes
    y_scale: (float) scalar tensor
    x_scale: (float) scalar tensor
    scope: name scope.

  Returns:
    boxlist: BoxList holding N boxes
  
inference_api/src/main/object_detection/core/box_list_ops.py