def resize_bbox(bbox, in_size, out_size):

    """
    Resizes Bounding Boxes

    Arguments:
        bbox            :- The GT bounding boxes of the image
        in_size         :- A tuple with height and the width of the image before resized.
        out_size        :- A tuple with height and the width of the image after resized.
    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