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
800 stars 74 forks source link

Support for transparent images #1271

Closed adityapatadia closed 1 year ago

adityapatadia commented 1 year ago

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

thekevinscott commented 1 year 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.