As I wanted to improve on my FFIX and X/X-2 HD Remake Texture Mods, I searched for a way to preserve alpha channels within an image using ESRGAN and asked Xinntao (from the original ESRGAN Team) in one of the bug reports if there's a way to do so.
He tweaked the test.py script so that now we can also upscale and preserves alpha channels:
https://pastebin.com/xUdTHff9 Sadly he never came back to the community on other questions, that's why I'm shouting help to you all.
Here goes my first two questions:
1. Would it be possible to tweak the alpha test.py so it can detect alpha in an image and preserve the alpha?
2. If no alpha is in the image then it should just skip the alpha scaling?
Right now if there's no alpha, the script will stop working and ask you to use the normal test.py that comes with ESRGAN which is a bit tedious to use.
On the other hand, I found a model that works wonder on dithered images which can be found quite a lot in PSX Games.
https://github.com/alsa64/AI-wiki/wiki/Model-DatabaseI made a quick comparison.
http://www.framecompare.com/image-compare/screenshotcomparison/21J1NNNUThe problem with this script is, that it sadly also eliminates alpha completely...
So here's my last question:
3. With a hopefully tweaked alpha py, I also would need to have this working with the dedither model
Every help is very much appreciated!