Git Product home page Git Product logo

replicating-neural-cellular-automata's Introduction

Replicating Neural Cellular Automata

Original work: https://distill.pub/2020/growing-ca/

This neural network learn to recreate the lizard emoji image. It's size is 64x64 pixels in the RGBA format. The main goal of this project is to learn more about Deep Learning and Tensorflow. This model is not original, only is my attempt to replicate an existing model.

The Model

Model Neural Cellular Automata

The input image has the shape of (64, 64, 4) with 3 channels for the RGB color and the forth is the alpha channel. First, I expand the third dimension to 16. Then, I create an edge detector filter (sobelX and sobelY) and a cell identity filter. Next, I send the increased image to a non trainable Depthwise Conv2D network (tf.nn.depthwise_conv2d) with strides = 1 and same padding. In this way, I have the perception vector for every single cell (or pixel). Now, I send the perception tensor through a Conv2D network with a relu activation and next through another Conv2D without activation. These are equivalent for a Dense network in any pixel. This provides an updating mask which will added to the input image following an stochastic variable. Finally, an "alive mask" does the cellular automata work for alpha cannel more than one. The loss is calculated with the mean squared error function.

The Result

The result obtained in 5,000 epochs with only one batch is the following. Input and Expected Output

Training the model

replicating-neural-cellular-automata's People

Contributors

jaldekoa avatar

Stargazers

 avatar  avatar Theodore Galanos avatar  avatar Miguel Benjamin Zubieta Rios avatar mathias avatar René Sanchez avatar Ulises Jeremias avatar Carlos Santana Vega avatar

Watchers

 avatar

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.