These instructions will give you a copy of the project up and running on your local machine for development and testing purposes.
Before you can run this project, ensure that you have the following installed:
- Anaconda or Miniconda:
Download and install either Anaconda or Miniconda, which provides the
condapackage and environment management system.
Once Conda is installed, you can set up the environment for this project by following these steps:
- Clone the repository:
git clone https://github.com/uoh-rislab/fv_event-based_diffusion_modeling_image_reconstruction.git
- Create the Conda environment from the environment.yml file:
conda env create -f environment.yml
- Activate the newly created environment:
conda activate EVDiff
- Verify that the environment is activated and the dependencies are installed:
conda list
The following code provides the training for the base Unet Model needed to get the weights given unconditional image inputs.
- Go to MNIST_Model folder:
cd your_route/MNIST_Model - Run Train file:
python3 Train.py --config 'your_route/default.yaml'
You must remember to configure the yaml file.
The following code provides the training for the Conditional Unet Model needed to get the weights given unconditional image inputs.
- Go to MNIST_Model folder:
cd your_route/MNIST_Model - Run Conditional Train file:
python3 Conditional_Train.py --config 'your_route/default.yaml'
You must remember to configure the yaml file.
The following code provides the use for the sampling process.
- Go to MNIST_Model folder:
cd your_route/MNIST_Model - Run sample ddpm file:
python3 sample_ddpm.py --config 'your_route/default.yaml'
You must remember to configure the yaml file.
The following code provides the use for the sampling process with an event condition input.
- Go to MNIST_Model folder:
cd your_route/MNIST_Model - Run DualSample file:
python3 DualSample.py --config 'your_route/default.yaml'
You must remember to configure the yaml file and save the .pth files in default folder.
- Fabian I. Valderrama Linkedin
This project is licensed under the MIT License