Rensor / engine /upscaler.py
ehristoforu's picture
Upload folder using huggingface_hub
65efad1 verified
raw
history blame contribute delete
400 Bytes
import cv2
import numpy as np
import time
def upscale_image(input_image):
start_time = time.time()
upscale_factor = 2
output_image = cv2.resize(input_image, None, fx = upscale_factor, fy = upscale_factor, interpolation = cv2.INTER_CUBIC)
end_time = time.time()
execution_time = end_time - start_time
return [output_image], f"Time taken: {execution_time} sec."