mirror of
https://github.com/k4yt3x/video2x.git
synced 2024-12-28 23:19:11 +00:00
fixed upscaler test
This commit is contained in:
parent
155a144a93
commit
d66b7fa144
@ -29,16 +29,11 @@ def test_upscaling():
|
|||||||
|
|
||||||
|
|
||||||
def test_upscale_image():
|
def test_upscale_image():
|
||||||
|
|
||||||
# initialize upscaler instance
|
# initialize upscaler instance
|
||||||
processing_queue = multiprocessing.Queue(maxsize=30)
|
upscaler = Upscaler()
|
||||||
processed_frames = multiprocessing.Manager().list([None])
|
|
||||||
pause = multiprocessing.Value(ctypes.c_bool, False)
|
|
||||||
upscaler = Upscaler(processing_queue, processed_frames, pause)
|
|
||||||
|
|
||||||
image = Image.open("data/test_image.png")
|
image = Image.open("data/test_image.png")
|
||||||
upscaled_image = upscaler.upscale_image(image, 1680, 960, "waifu2x", 3)
|
upscaled_image = upscaler.upscale_image(image, 1680, 960, "waifu2x", 3)
|
||||||
|
|
||||||
reference_image = Image.open("data/test_image_ref.png")
|
reference_image = Image.open("data/test_image_ref.png")
|
||||||
assert utils.get_image_diff(upscaled_image, reference_image) < 0.5
|
assert utils.get_image_diff(upscaled_image, reference_image) < 0.5
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user