This project was done as a course project for CS-852, Fall-2024, UNH to better understand diffusion policy.
In the first step for sanity checking I let the diffusion model to generate some simple data. Then I use the same model to generate actions as a diffusion policy.
my_swissroll.ipynb
Diffusion policy reimplementation for the course project of the Neural Network course.
Based on the paper: Visuomotor Policy Learning via Action Diffusion
- For pushT environment install the original diffusion policy codebase from here
- download the pusht data and put it inside the data folder
wget https://diffusion-policy.cs.columbia.edu/data/training/pusht.zip
- convert to hdf5 format: Use the zarr2hdf5.ipynb notebook
- Option 1: jupyter notebook
train_example.ipynb jupyter
- Option 2: train.py script
python train.py --hdf5_file data/pusht/pusht_v7_zarr_206.hdf5
File name | Description |
---|---|
my_swissroll.ipynb | Sanity check for the diffusion model |
train.py | Main script to train the model |
train_example.ipynb | Jupyter notebook with the training example |
myddpm.py | DDPM scheduler and sampler |
noise_predictor_model.py | UNet model |
pos_encoding.py | Sinusoidal positional encoding |
film.py | Fiture wise Linear Modulation (FiLM) |
vision_model.py | Vision encoder |
pusht_data_utils.py | Utility functions from original diffusion policy codebase |
data/pusht/pusht_v7_zarr_206.hdf5 | pusht data in hdf5 format |
zarr2hdf5.ipynb | Convert zarr to hdf5 format |