def bbox_resize(bbox, scale_factor):
    """
    Resize the bbox according to the `scale_factor` saved for
    resizing the image.

    Args:
        bbox (ndarray): All gt boxes in an image, and the shape of `bbox`
            is `K x 4`
        scale_factor (float or int): The `scale_factor` used in resizing
            the image.

    Returns:
        resized_bbox (ndarray): The resized bbox by `scale_factor`
    """
    assert isinstance(scale_factor, (int, float))
    resized_bbox = bbox * scale_factor
    return resized_bbox