Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow transparent interpolation animation generation #82

Closed
NickAcPT opened this issue Jun 27, 2020 · 14 comments
Closed

Allow transparent interpolation animation generation #82

NickAcPT opened this issue Jun 27, 2020 · 14 comments

Comments

@NickAcPT
Copy link

Currently, when using the --generate-interpolation argument, the output GIF file will have a black background if the images have a transparent background.

@lucidrains
Copy link
Owner

ok done ad5d07a

@NickAcPT
Copy link
Author

NickAcPT commented Jun 27, 2020

That code just converts the transparent images back to normal RGB.

Won't that cause the generated GIF images to continue having the black background?

@lucidrains
Copy link
Owner

@NickAcPT i don't think GIFs support transparency, which is why you were getting the black background, so I'm converting each frame to an RGB (without the transparency) before the GIF conversion

@NickAcPT
Copy link
Author

NickAcPT commented Jun 27, 2020

GIFs do support transparency, but I feel like it isn't the best format to be used here.
Is there an easy way to allow users to specify the output format for the interpolation?

Proposed formats:

  • GIF (default)
  • Frame-By-Frame (exported directly, but outputs to a new folder instead of directly inside the results folder)
  • APNG (animated PNG)
  • WebP (webp is more modern than GIF and supports transparency)

In the case there is no way to implement the last two, I feel like the frame-by-frame should be implemented to make it so we can use external tools to make them.

@lucidrains
Copy link
Owner

@NickAcPT oh oops you are right

is your goal simply to have a white background? I think I can get it to work without having to reach for one of these less supported extensions

@NickAcPT
Copy link
Author

NickAcPT commented Jun 28, 2020

@lucidrains

is your goal simply to have a white background?

Not really. My goal is basically to have a way to deal with the transparency of the images myself.
We can probably scrap both APNG and WebP.
Maybe the idea would be to keep things as they are, revert ad5d07a, and just implement the feature where the individual images are exported to a folder frame by frame.

@lucidrains
Copy link
Owner

@NickAcPT ok, let's do the frame by frame approach

@lucidrains
Copy link
Owner

@NickAcPT whatcha training on? any cool results?

@NickAcPT
Copy link
Author

whatcha training on? any cool results?

Nothing special, really haha. Got bored of seeing the same skins people use in Minecraft (yes, that children game lmao). So, why not try this. Although my results haven't been that great because I've focused much on training the model.

ok, let's do the frame by frame approach

Thanks so much :D

@lucidrains
Copy link
Owner

@NickAcPT try the new augmentation feature! it should greatly improve results if you are working with a small dataset

@NickAcPT
Copy link
Author

try the new augmentation feature! it should greatly improve results if you are working with a small dataset

Well, my dataset has some repeated files (which I'll delete before retraining), but in total I got near to 400k files. It'll just take forever to train since I don't own any good hardware and am instead using Google Colab (yes, shame on me)

@lucidrains
Copy link
Owner

@NickAcPT ohhh 400k is more than enough lol

@lucidrains
Copy link
Owner

@NickAcPT ok done e40eb6f

@NickAcPT
Copy link
Author

Closing as it was implemented. Thanks again for your amazing work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants