Skip to content

This repository accompanies the paper "Object-centric Denoising Diffusion Models for Physical Reasoning".

License

Notifications You must be signed in to change notification settings

wiskott-lab/diffusion4phyre

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Diffusion4Phyre

This code accompanies the paper "Object-centric Denoising Diffusion Models for Physical Reasoning".

Installation

The required conda environment can be installed by running

conda env create -f environment.yml

This repository then has to be installed as a package (called phyrediff) in your environment. You can do this by running the following command in the root folder of the repository

pip install -e .

Making this project a package was a design choice to avoid relative imports within scripts. Installing it in editable mode (the -e option) means changes in the code immediately take effect and you don't have to constantly reinstall it when changing code.

Generating a dataset for training

You can generate a training dataset from PHYRE with the script diffusion4phyre/data/scripts/generate_dataset_latents.py. Adapt the parameters in this file according to your requirements.

Running the generate_data_meta.py in the same folder is not necessary. It produces a metadata file for a given dataset which is required during training, but this metadata file will also be produced automatically when first training a model on a new dataset.

Training

To train a model, run diffusion4phyre/train/train.py.

You can change the training parameters in diffusion4phyre/utils/config.py. These parameters mainly affect functions in the files

  • diffusion4phyre/utils/training.py
  • diffusion4phyre/utils/diffusion.py
  • diffusion4phyre/utils/models.py

The codes assumes that training is logged via neptune, but this can be turned off.

Evaluation

There are different evaluation notebooks in diffusion4phyre/eval/. These offer different ways of analyzing the behaviour of trained models.

About

This repository accompanies the paper "Object-centric Denoising Diffusion Models for Physical Reasoning".

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published