-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CNNx2UL quality measurement #14
Comments
Thanks for opening the issue! I was busy last week. I'm not sure how we should compare the pytorch model with the webgpu shaders, since they are both derived from the glsl shaders. I might recommend rendering a anime image in MPV with the stock glsl shaders and treat it as the baseline. I will look into how. Also, since there are more than one scripts method in the issue mentioned, which one did you use to generate the pytorch model? Would you mind sharing the notebook w/ model? We might be able to compare the weights, etc. |
I used these pytorch models folks contributed here: bloc97/Anime4K#220 |
To make sure the webGPU version reproduces the original glsl shaders, I first compared the upscaled results of MPV and webGPU, using this image and the upscale CNN 2x UL shader. The steps are:
These two images are compared using this script. They are visually indistinguishable, with SSIM > 0.9995 and MSE < 0.05. Considering the precision issues, the webGPU implementation should be largely aligned with the original GLSL shader. I also took a look at the PyTorch models here and they incorporates more processing stages like |
Interesting repo. I measured the SSIM of your CNNx2UL (downloaded the Canvas on web demo), and realized it is much lower (0.77) than that of the PyTorch-converted model (0.97) in bloc97/Anime4K#220 . I assume they should be very equivalent.
I actually measured the upscale-VL on PyTorch but I assume UL should even be higher quality score.
What could be the discrepency here? The SSIM difference is too large.
The text was updated successfully, but these errors were encountered: