Git Product home page Git Product logo

rnp6's Introduction

Code Repository for Recursive Neural Programs

This is the code corresponding to the publication Recursive neural programs: A differentiable framework for learning compositional part-whole hierarchies and image grammars

How do you perceive a coffee cup? Unlike a classifier, that will extract features and give you a label, or an autoencoder that gives you a latent space from which to reconstruct an image, we perceive things in a much more embodied way.

We therefore perceive something like a coffee cup in terms of how we might physically interact with it, our memories of related objects, emotions, etc. As all of these involve movement and synthesis, our perception is therefore grounded in some way in sensory-motor ways of engaging with the world. We might call these "sensory-motor programs".

A Recursive Neural Program is a novel generative architecture that models objects as recursive compositions of sensory-motor trajectories. This means that it perceives an image as a way to generate that image out of nested movement sequences.

RNP Tree

For an image, each sequence occurs at a different spatial scale, corresponding to parts of the object. For example, when drawing a face, a parts sequence might correspond to drawing an eye or a nose. A sub-parts sequence might be a line or a curve. The "top-level" sequence will be the composition of all the sub-sequences, resulting in a drawing of a face.

RNP recs

Run Analysis

You can run the analysis and generate figures by following the Setup instructions below

MNIST t-SNE visualization

Run scripts/analysis/mnist-tSNE.jl. The default number of clusters is 40

Refactoring TODO

All the analysis code is in the repo, but there is some refactoring to be done to make the code more user-friendly

  • MNIST t-SNE
  • Omniglot model clustering
  • ETH80-to-Fashion-MNIST transfer
  • Generate images (Figs 2, 3)
  • Comparison with vanilla VAE

Setup

The instructions generated by DrWatson.jl should make everything work out of the box:

This code base is using the Julia Language and DrWatson to make a reproducible scientific project named

RNP6

It is authored by FishAres.

To (locally) reproduce this project, do the following:

  1. Download this code base. Notice that raw data are typically not included in the git-history and may need to be downloaded independently.
  2. Open a Julia console and do:
    julia> using Pkg
    julia> Pkg.add("DrWatson") # install globally, for using `quickactivate`
    julia> Pkg.activate("path/to/this/project")
    julia> Pkg.instantiate()
    

This will install all necessary packages for you to be able to run the scripts and everything should work out of the box, including correctly finding local paths.

You may notice that most scripts start with the commands:

using DrWatson
@quickactivate "RNP6"

which auto-activate the project and enable local path handling from DrWatson.

rnp6's People

Contributors

fishares 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.