Giter Club home page Giter Club logo

bettersetrepresentations's Introduction

[NeurIPS 2020] Better Set Representations For Relational Reasoning

main figure

Software Requirements

This codebase requires Python 3, PyTorch 1.0+, Torchvision 0.2+. In principle, this code can be run on CPU but we assume GPU utilization throughout the codebase.

Usage

The files run_reconstruct_circles.py, run_reconstruct_clevr.py correspond with the explanatory experiments in the paper. We implemented the three other experiments by simply plugging our module into existing repos linked in supplementary materials, where we specify more details.

Full usages:

usage: run_reconstruct_circles.py [-h] [--model_type MODEL_TYPE]
                                  [--batch_size BATCH_SIZE] [--lr LR]
                                  [--inner_lr INNER_LR]

optional arguments:
  -h, --help            show this help message and exit
  --model_type MODEL_TYPE
                        model type: srn | mlp
  --batch_size BATCH_SIZE
                        batch size
  --lr LR               lr
  --inner_lr INNER_LR   inner lr
usage: run_reconstruct_clevr.py [-h] [--model_type MODEL_TYPE]
                                [--batch_size BATCH_SIZE] [--lr LR]
                                [--inner_lr INNER_LR]

optional arguments:
  -h, --help            show this help message and exit
  --model_type MODEL_TYPE
                        model type: srn | mlp
  --batch_size BATCH_SIZE
                        batch size
  --lr LR               lr
  --inner_lr INNER_LR   inner lr
  --save SAVE           path to save checkpoint
  --resume RESUME       path to resume a saved checkpoint

Data Generation

The data for CLEVR with masks was generated using https://github.com/facebookresearch/clevr-dataset-gen and adding the following line: render_shadeless(blender_objects, path=output_image[:-4]+'_mask.png') on file image_generation/render_images.py ~line 311 (after the function add_random_objects is called).

Results

Circles reconstruction samples (From left to right, column-wise: original images, SRN reconstruction, SRN decomposition, baseline reconstruction, baseline decomposition.):

CLEVR reconstruction samples:

bettersetrepresentations's People

Contributors

as2626 avatar chillee avatar q-hwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

mmlab-iie q-hwang

bettersetrepresentations's Issues

Can't reproduce explanatory experiments results

I run your code for Circles reconstruction. After 40 epochs, I visualize the reconstruction and decomposition results. I don't see a big difference between the SRN and baseline, sometimes baseline is even better than SRN.

In the 5*4 grid below, the image in upper left corner is the input image and the second image is the reconstruction image. And the following 16 images are the result of decomposition.

Baseline decomposition

baseline image1

baseline image2

SRN decomposition

srn image1

srn image2

SRN does not decompose the circles properly.

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.