Giter Club home page Giter Club logo

capsules's Introduction

Inference and Learning for Generative Capsule Models

This code is the implementation of the algorithm described in the following paper: Inference and Learning for Generative Capsule Models .

This repo contains the code for the "face experiments". The original constellation experiments can be found at: anazabal/GenerativeCapsules.

TSNE embeddings of object-capsule presence probabilities on MNIST digits.

Figure 1: Reconstruction demo of randomly transformed faces in a given scene.

Instructions

1. Setup

a. Install manually the following dependecies:

  • opencv-python>=4.5.5.62
  • scikit-learn>=1.0.2
  • matplotlib>=3.5.1
  • pandas>=1.3.5
  • monty>=2022.1.19
  • numpy>=1.21.5

b. To generate the dataset run the following script:

./dataset/create_dataset.sh

NOTE: this step will take several hours since the code has to:

  • generate 100,842 synthetic face images,
  • train 5 PPCA models,
  • train the FA model,
  • generate 100,842 x 5 appearance labels.

2. Running Experiments

To run the algorithm, select the number of faces that will exist in the scene and execute the following command:

python -m main --num_faces=3

Results for our variational inference algorithm and the RANSAC-based approach will be saved in the ./results directory.

3. Citation

4. Notes

The code was tested on Ubuntu 20.04.4 with python 3.7.10. All the part-images were downloaded from the PhotoFitMe project page.

capsules's People

Contributors

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