File size: 673 Bytes
63f92e8 d3474be 63f92e8 a79cb95 63f92e8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
import os
import pytest
from test_config import *
from modules.live_portrait.live_portrait_inferencer import LivePortraitInferencer
@pytest.mark.parametrize(
"input_image",
[
TEST_IMAGE_PATH
]
)
def test_image_restoration(
input_image: str,
):
if not os.path.exists(TEST_IMAGE_PATH):
download_image(
TEST_IMAGE_URL,
TEST_IMAGE_PATH
)
inferencer = LivePortraitInferencer()
restored_output = inferencer.resrgan_inferencer.restore_image(
input_image,
overwrite=False
)
assert os.path.exists(restored_output)
assert are_images_different(input_image, restored_output)
|