def get_image_size(img: Tensor) -> List[int]:
    """Returns the size of an image as [width, height].
    Args:
        img (PIL Image or Tensor): The image to be checked.
    Returns:
        List[int]: The image size.
    """
    if isinstance(img, torch.Tensor):
        return get_image_size_tensor(img)

    return get_image_size_pil(img)
Returns the size of an image as [width, height].
    Args:
        img (PIL Image or Tensor): The image to be checked.
    Returns:
        List[int]: The image size.
    
test/external/mlperf_retinanet/transforms.py