RileyLazarou / PokeGAN

GAN for generating pokemon sprites
MIT License
83 stars 21 forks source link

Colorspace Improvement #10

Open ANekhai opened 1 year ago

ANekhai commented 1 year ago

Hello! I want to preface by saying I found this work very inspirational. I really like the idea of transferring the style of real Pokemon to a latent variable. I have plans to explore some extensions to your technique soon with a larger dataset of roughly 5k Pokemon images.

I wanted to highlight an improvement to your colorspace idea. I think what you have implemented is a manual method of doing matrix multiplication. I have implemented a method that only depends on PyTorch's matmul function. With a transposition and a colorspace tensor of the form (b, 1, 16, 3) you can directly do intermediate_image @ color_tensor to do all three color transformation blocks in a single operation! Note: this requires your intermediate image tensor to be of the form (b, im_size, im_size, 16) so you transpose the image before and after the operation. The seventh cell of this notebook highlights the math.

Cheers and thank you for your detailed writeups both on Medium and Arxiv!

RileyLazarou commented 1 year ago

You're right, thanks for the tip, that's much more efficient! Good luck with your exploration, I'd love to see any exciting findings you have!

ANekhai commented 1 year ago

I'll keep you posted!