waifu2x icon indicating copy to clipboard operation
waifu2x copied to clipboard

Jpeg noise removal not working

Open eyetest42 opened this issue 2 years ago • 7 comments

or at least it doesn't appear to be...

eyetest42 avatar Nov 30 '22 12:11 eyetest42

It works. What's the trouble? Please hard refresh your browser (maybe CTRL+F5) and try again, as today I have updated the front-end scripts.

nagadomi avatar Nov 30 '22 13:11 nagadomi

I have the same issue sometimes. I like to use the site to clean up jpgs for a fan wiki I like to edit. But sometimes when I want to compare the Medium noise removal with the High, one or the other doesn't work! Here's a image of the settings I was using: Waifu Issue

I tried both the Convert button and Download but it makes no difference. Adding upscaling does fix it however, I would prefer to use the None option for wiki images.

horse14t avatar Dec 12 '22 19:12 horse14t

How does it not work? Server error? or it is not the expected conversion result?

nagadomi avatar Dec 12 '22 19:12 nagadomi

When I save the image after clicking either Convert or Download it is no different from the original file. There is no Server error or anything. Here's a comparison between the original artwork and the Waifu export with the High setting: Waifu Issue 2 Notice how there's no difference. Compare that to the Medium setting where there is a visible difference. Waifu Issue 3

horse14t avatar Dec 12 '22 19:12 horse14t

I think it is the same problem as below. It is not a bug in the program, but a performance issue with the machine learning model.

It is a known issue of CUNet model(defualt model). level0~2 overfits the JPEG quality(noise level) of the input image.

noise_level=0: Expected input image compressed with JPEG quality 85-95 noise_level=1: Expected input image compressed with JPEG quality 65-85 noise_level=2: Expected input image compressed twice with JPEG quality 27-70

If the input image is compressed once with JPEG quality 80, denoising result is better with level1 than with level2. level2 may not remove weaker noise than expected... level3 simply denoise strongly.

(level1=Medium, level2=High) related: https://github.com/nagadomi/waifu2x/issues/320#issuecomment-570095404

nagadomi avatar Dec 12 '22 20:12 nagadomi

I am currently reworking the training code and will probably be able to fix this issue in the next few months. The level2 should have included all noise patterns lower than level2.

nagadomi avatar Dec 12 '22 20:12 nagadomi

Sounds good! 👍Thank you!

horse14t avatar Dec 13 '22 00:12 horse14t