Code Monkey home page Code Monkey logo

pallets's Introduction

Pallets

Pallets is a project to explore pixel art generation in neural networks using toy model building blocks.

Abstract

We explore the application of convolutional autoencoders to generate pixel art. Our approach is twofold: first, we implement a standard RGB-based autoencoder model to understand baseline performance and highlight issues with current approaches - including those using very large generative models. Second, we introduce a novel one-hot encoded color mapping autoencoder designed to adhere strictly to predefined color palettes, a critical aspect of pixel art.

We demonstrate a dimensionality reduction of the problem alongside order of magnitude performance improvement relative to the aesthetic of pixel art. We then suggest that this can be more broadly applied on larger images, more complex model architectures and ambitious generative pieces.

Notebooks

The Dataset

Autoencoders

  • AE: A basic autoencoder for images with 4 color channels for RGBA
  • ConvAE: A convolutionary form of AE
  • AEOneHot: A basic autoencoder for images with a one-hot encoded representation of each unique color in the dataset
  • ConvAEOneHot: A convolutionary form of AEOneHot

Variational Autoencoders

  • VAE: A basic variational autoencoder for one-hot encoded images
  • ConvVAE: A convolutionary form of VAE
  • LabeledVAE: A labeled form of VAE
  • LabeledConvVae: A combination convolutionary & labeled form of VAE

Conditional Variational Autoencoders

  • CVAE: A basic conditional variational autoencoder for one-hot encoded images
  • ConvCVAE: A convolutionary form of VAE
  • LabeledCVAE: A labeled form of VAE
  • LabeledConvCVae: A combination convolutionary & labeled form of VAE

Gumbel Softmax

  • GSVAE: A basic variational autoencoder with gumbel softmax reparameterization
  • LabeledGSVAE: A labeled form of GSVAE

Math Visualizations

  • Visualizing Convolutions: Applies different types of convolutions to graphical representations of an X and an O, and displays an image for every layer of math applied.
  • Notes On The Simplex: A visual representation of a simplex, the structure that underlines Gumbel Softmax.
  • Using Gumbel Softmax: An implementation of Eric Jang's gumbel softax (one of the original authors of Gumbel Softmax) is compared with the implementation packaged with PyTorch.

Setup

Get both the cpunks-10k repo and this one

git clone https://github.com/tnn1t1s/cpunks-10k
git clone https://github.com/jmsdnns/pallets

Then setup a venv for pallets and install it

cd pallets
python -mvenv venv
source venv/bin/activate
pip install -r requirements.txt

Credits

A huge shoutout to @tnn1t1s for starting this project and for mentoring me as I study machine learning.

pallets's People

Contributors

jmsdnns avatar tnn1t1s avatar

Watchers

 avatar  avatar

pallets's Issues

convautoencoder with traits

In this model:

The image_encoder encodes the input images into a flattened representation.
The trait_encoder encodes the trait information, producing a tensor of the same size as the flattened image representation.
The encoded image and trait data are combined using element-wise addition.
The decoder reconstructs the image from this combined representation.

In cpunks - see https://github.com/tnn1t1s/cpunks-10k/blob/main/cpunks/tutorial/Simple%20Neural%20Net%20Classifier.ipynb

you can get labels here using the .pkl file into a dataframe or the json. we should probably find a better way to do this.

Debug SimpleConvAutoencoder(nn.Module)

while this technically works - the training score is high but the output images do not look anything like valid punks. there's something wrong here that needs to be debugged.

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.