Spaces:
Running
Running
File size: 287 Bytes
1374a6d |
1 2 3 4 5 6 7 8 |
from PIL import Image
from torchvision import transforms
def NearestNeighbor_for_deployment(lr_image):
w, h = lr_image.size
sr_image = transforms.functional.resize(lr_image, size=(h*4, w*4),interpolation=transforms.InterpolationMode.NEAREST,antialias=False)
return sr_image
|