Closed 123456klk1 closed 1 year ago
You can try apply some gaussain blurring to the input image. For very high-resolution images, bilinear downsampling will lead to too sharp low-resolution image, which will cause your artifacts.
Code as above:
kernel_size = (3, 3)
sigma = 1.5
y_hat[0] = transforms.GaussianBlur(kernel_size, sigma)(y_hat[0])
Looks like the picture is still a little blurry.
As in https://github.com/williamyang1991/VToonify/blob/35922e049acad7c87c058929b15cef44c9968b30/style_transfer.py#L124-L129 My blur kernel is 4*4, and will apply it to the image twice for very large input.
You can try pillow to resize pic, this works for me。
Ok, thanks
Hi, I'm interested in your work, Here are my inversion results, the inversion is a bit fuzzy (blocky pixels), Is this normal?