thekevinscott / UpscalerJS

Enhance Images with Javascript and AI. Increase resolution, retouch, denoise, and more. Open Source, Browser & Node Compatible, MIT License.
https://upscalerjs.com
MIT License
788 stars 74 forks source link

Support for transparent images #1271

Closed adityapatadia closed 10 months ago

adityapatadia commented 10 months ago

Currently, only 3 channel images are supported. Is there any plan to add support for transparent images like PNG?

thekevinscott commented 10 months ago

There is not. See this earlier question for a more in-depth discussion.

To enable transparent support you'd need to train an implementation of ESRGAN on a dataset of transparent images. The linked question thread should have some pointers on how you would do that. The biggest challenge (imo) is finding a dataset of transparent images comparable in breadth to the div2k dataset.

If you do end up training a model, I'd love to invite you to add it to this repo, as I'm sure other would love to leverage it as well.