Spaces:
Running
Running
File size: 400 Bytes
65efad1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
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."
|