(bbox, in_size, out_size)
return bbox
Resize bounding boxes according to image resize.

    Args:
        bbox (~numpy.ndarray): See the table below.
        in_size (tuple): A tuple of length 2. The height and the width
            of the image before resized.
        out_size (tuple): A tuple of length 2. The height and the width
            of the image after resized.

    .. csv-table::
        :header: name, shape, dtype, format

        :obj:`bbox`, ":math:`(R, 4)`", :obj:`float32`, \
        ":math:`(y_{min}, x_{min}, y_{max}, x_{max})`"

    Returns:
        ~numpy.ndarray:
        Bounding boxes rescaled according to the given image shapes.
Resize bounding boxes according to image resize.
Resize bounding boxes according to image resize .
def resize_bbox(bbox, in_size, out_size):
    """Resize bounding boxes according to image resize.

    Args:
        bbox (~numpy.ndarray): See the table below.
        in_size (tuple): A tuple of length 2. The height and the width
            of the image before resized.
        out_size (tuple): A tuple of length 2. The height and the width
            of the image after resized.

    .. csv-table::
        :header: name, shape, dtype, format

        :obj:`bbox`, ":math:`(R, 4)`", :obj:`float32`, \
        ":math:`(y_{min}, x_{min}, y_{max}, x_{max})`"

    Returns:
        ~numpy.ndarray:
        Bounding boxes rescaled according to the given image shapes.

    """
    bbox = bbox.copy()
    y_scale = float(out_size[0]) / in_size[0]
    x_scale = float(out_size[1]) / in_size[1]
    bbox[:, 0] = y_scale * bbox[:, 0]
    bbox[:, 2] = y_scale * bbox[:, 2]
    bbox[:, 1] = x_scale * bbox[:, 1]
    bbox[:, 3] = x_scale * bbox[:, 3]
    return bbox
def resize_bbox ( bbox , in_size , out_size ) : bbox = bbox . copy ( ) y_scale = float ( out_size [ 0 ] ) / in_size [ 0 ] x_scale = float ( out_size [ 1 ] ) / in_size [ 1 ] bbox [ : , 0 ] = y_scale * bbox [ : , 0 ] bbox [ : , 2 ] = y_scale * bbox [ : , 2 ] bbox [ : , 1 ] = x_scale * bbox [ : , 1 ] bbox [ : , 3 ] = x_scale * bbox [ : , 3 ] return bbox