nagadomi / waifu2x

Image Super-Resolution for Anime-Style Art
http://waifu2x.udp.jp/
MIT License
27.6k stars 2.71k forks source link

Running only the denoise in real time #208

Open Mickevincent opened 7 years ago

Mickevincent commented 7 years ago

Hello Nagadomi. I am wondering what your thoughts is on running Waifu2x denoise only on 320×240 images is with a high end gpu like gtx 1080 Ti. Or pherhaps at least next generation of Nvidia gpu's. And then upscale the image with another fast algorithm. Do you think this could be possible?

zh9c418 commented 7 years ago

I'm # AMD radeon!!!(i wanna cry......)

nagadomi commented 7 years ago

Basically I only think about images, not for video/video game. What is your purpose? video encoding noise and rendering noise may be different from jpeg noise. and what does real time mean? 60 fps?

Mickevincent commented 7 years ago

My purpose is for psx emulation. Waifu2x makes games with pre- rendered backgrounds look awesome if they are running in native res (320×240) and then upscaled with Waifu2x. I think most of these games run in in 20- 30 fps wich would be considered real time.

leilei- commented 7 years ago

Denoising won't mean much to Playstation games when there's not much compression noise to begin with (and with a strict RGB555 pixel buffer such as on the PSX's video, denoising lossless backgrounds won't get you anywhere)

The only real application denoising would have with a video game is if a video game shipped with JPEG textures, which there's not many of (namely some 1999-2001 PC games that either had to fit on a CD desperately or fit for a small dial-up comfortable download, in this short timeframe where DDS support wasn't widespread)

Mickevincent commented 7 years ago

leilei - Here is a picture. The top one is 6xbrz only over the game. The bottom one is a screenshot without any shaders that has first been downsized to 320x240 and then denoised with Waifu2x. Then upscaled with 6xbrz. https://i.imgur.com/MZhk31U.jpg

And here is Tales of Destiny 2, using the same as the above. Another shader on these two, but waifu2x denoise over the bottom one first.

https://i.imgur.com/KpHg0P0.jpg

nagadomi commented 7 years ago

Maybe you need anti-aliasing? Have you tried postprocess anti-aliasing filter like FXAA?

leilei- commented 7 years ago

So you want a generic sobel edge-detect blur effect applied broadly then upscaled? That's all i'm getting at with your desired pictures.

Mickevincent commented 7 years ago

Well, I don't know. I just think it looks good and I have not been able to reproduce it with only Retroarch shaders.

nagadomi - Yes I have tried many different effects. None give the same result. Well, some are close.

Here is my own preset. Again the first on the game and the second one on a waifu- denoised image. https://i.imgur.com/KOxaNs8.jpg

I cant add that much denoise in retroarch because then it removes important details. I know Waifu2x "knows" what should be removed hence why it doesnt really remove the most important stuff.

bloc97 commented 7 years ago

@zh9c418 There's an OpenCL/AVX/FMA version of waifu2x out there that works on both AMD/nVidia GPUs.