Code Monkey home page Code Monkey logo

Comments (8)

RileyLazarou avatar RileyLazarou commented on September 6, 2024

Hey André, thanks for your interest. If you're looking to stop then resume training you should save the weights for the generator, the encoder, the image discriminator, and the latent vector discriminator (although the AEGAN recovers pretty well when resuming with a brand new encoder and discriminators; this may be a useful regularization technique to look into).

As for changing the architecture, you'll have to tweak the generator, encoder, and discriminator classes. GANs are a lot of trial and error, and I tuned this one to work with 96x96 images so you'll have to experiment with different layer shapes to see what works for you.

from pokegan.

Gummygamer avatar Gummygamer commented on September 6, 2024

Thanks a lot for the answers, I'll keep on the path of saving all weights and maybe exploring different hyperparameters. I'm training it currently on what seems to be a slightly more complete sprite dataset than what you used to generate pokémon.

from pokegan.

Gummygamer avatar Gummygamer commented on September 6, 2024

Just a little thing for you: https://www.youtube.com/watch?v=JpTDWyAQTiA
I've had moderate success in training. One little trick that seemed to help was training for around 1000 epochs, loading only the generator and after that keep loading the 4 networks. One problem that seems to be remaining is data preprocessing. I believe you preprocessed the original dataset that you have linked on your article at Towards Data Science, a dataset which by the way was recently increased. Did you just batch paint the backgrounds to white? Did you exclude images? Did you include females and shinies (those don't look useful)? I've read you mentioning 600 unique images and expanding to 1600. I'm well aware that making the exact same model is kind of pointless, but I'm aiming to understand the details of the process so that I can apply the methods to other image generation tasks in the future. As I've mentioned, the linked sprite source was expanded so I might train it with a bigger dataset than you used though quite similar. In my attempts, I've observed the G loss slowly increasing and Dx decreasing to near zero, which made me fear a maxed out or even degrading training.

from pokegan.

RileyLazarou avatar RileyLazarou commented on September 6, 2024

First of all, love the video 😄

It's been a while, but as best as I can recall, these are the steps I took in data prepossessing (not in any particular order):

  • Only include the front sprites (including the backs and making it a conditional GAN may help generalization though?)
  • Remove the transparent layer but first use it to turn all transparent pixels white (but leaving it in may help the GAN learn to differentiate between white pixels that are part of the pokemon and white pixels that are background)
  • I did include the shinnies. They're hand-crafted palette swaps, not hue rotations (as I did in data augmentation), so I figured there was value in keeping them.
  • I did include the females. There probably wasn't much value in this though, since they're so similar to the male sprites.
  • I discarded any sprite that didn't originally have 4 channels. I think this was only a handful of greyscale sprites like the question mark sprite.

Actually, I just realized I still have the formatted sprites. Here you go!

I've observed the G loss slowly increasing and Dx decreasing to near zero, which made me fear a maxed out or even degrading training.

Yeah, that'll happen. Exploring alternative losses might be a good path forward, and adjusting your learning rate might help too.

Happy hunting!

gen 3474

from pokegan.

Gummygamer avatar Gummygamer commented on September 6, 2024

Thanks for seeing my video and for the clarification. I will have a look at the files, I believe that the transparent layer was detrimental to my experiments as the images were sometimes read as having black backgrounds and sometimes white backgrounds, which was reflected on the reconstructed and generated images. I didn't include shinies nor back sprites nor females, in part of the experiments I removed eggs, the question mark and images that gave CRC warnings from imagemagick. One idea for a conditional GAN is dividing by body shapes:

https://bulbapedia.bulbagarden.net/wiki/List_of_Pokémon_by_shape

Right now I'm training it on the bigger newer version of the dataset with females and shinies, but with the white background preprocessing and removing the eggs and the question mark.

Do you have any more philosophical thoughts about the limits of AI? The most striking thing about this instance of AEGAN to me is that it signs that we have at least a very rough version of what would be a mathematical description of visual artistic creation. Do you believe that this field can (and should) go much further or will we hit a wall as Moore's Law dies out, we fail to get feasible bigger quantum computers and hurt ourselves on environment and health issues?

from pokegan.

RileyLazarou avatar RileyLazarou commented on September 6, 2024

I appreciate the enthusiasm but I don't think I'm qualified to talk much on those topics. But I wouldn't call GANs a mathematical description of artistic creation; rather, they're just effective tools at approximating probability distributions in pixel space.

from pokegan.

Gummygamer avatar Gummygamer commented on September 6, 2024

Just updating, I've quite succeeded in training it on that updated version of the dataset. In the middle of the process, I discarded the 3D model pictures and ended up with 2583 sprites.

cre 0001

As in your experiments, it seems good in creating unown variants. Besides that, in more than one training, I've witnessed great reconstruction of Arceus.

from pokegan.

RileyLazarou avatar RileyLazarou commented on September 6, 2024

Looks great, I'm glad it's working for you! Unknowns and Arceus are are overrepresented in the dataset; unknowns because they all look similar, and arceus because he has a different palette for each type. To avoid biasing the GAN, it might be worthwhile to remove most of the Arceus sprites.

from pokegan.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.