(image, target_size)
return resized_image
Resize image to target size

    Args:
        image (numpy.ndarray): Image of shape (C x H x W).
        target_size (tuple): Target size (H, W).

    Returns:
        numpy.ndarray: Resized image of shape (C x H x W).
Resize image to target size
Resize image to target size
def resize_emptiness_predictions(image, target_size):
    """Resize image to target size

    Args:
        image (numpy.ndarray): Image of shape (C x H x W).
        target_size (tuple): Target size (H, W).

    Returns:
        numpy.ndarray: Resized image of shape (C x H x W).

    """
    n_channels = image.shape[0]
    resized_image = np.zeros((n_channels, target_size[0], target_size[1]))
    resized_image[0, :, :] = image[0]
    resized_image[1, :, :] = image[1]
    return resized_image
def resize_emptiness_predictions ( image , target_size ) : n_channels = image . shape [ 0 ] resized_image = np . zeros ( ( n_channels , target_size [ 0 ] , target_size [ 1 ] ) ) resized_image [ 0 , : , : ] = image [ 0 ] resized_image [ 1 , : , : ] = image [ 1 ] return resized_image