This is the implementation of the PI-DDPM network using a basic UNet architecture as backbone.
To prepare your environment please install dependencies using pip and the provided requirements.txt file:
pip install -r requirements.txt
Follow these instructions to install the project:
git clone https://github.com/casus/pi-ddpm.git
cd pi-ddpm
pip install -r requirements.txt
To run the project demo with simulated data, follow these instructions:
generate_synthetic_sample
with your desired parameters. Use the provided mode metaballs
for simple figure generation without the need to download additional data for demo purposes.python train_ddpm.py
or python train_unet.py
with paths to your generated datasets.test_diffusion
script.
python test_diffusion.py
./imgs_output/testing/reconstructions_confocal.npz
for the confocal teaser and ./imgs_output/testing/reconstructions_widefield.npz
for the widefield images. After training the model you should see the following reconstructed images.