Skip to content

safiyya-ona/lenslessImaging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Learned Diffusion Processes for Lensless Cameras

For my final year project for UCL Computer Science, I investigated the use of processes from diffusion models for image reconstruction of lensless cameras, using the DiffuserCam data set.

The dataset can be found through this link: DiffuserCam Dataset

For all commands, the path to the dataset will be "path_to_dataset"

Setup

Using the environment.yml file, you can run

conda env create -f environment.yml

Or manually install the necessary using the commands below

conda create -n lensless-diffusion pytorch torchvision pytorch-cuda=11.7 -c pytorch -c nvidia
conda activate lensless-diffusion
pip install tqdm einops piq odak

Commands for training and evaluation

Models for the saved_models directory can be found through this link: Pretrained Models

By default, all models are selected if the flag is ommitted. You can select one model by adding the flag --models and its name, e.g.

--models "residual_diffusion_model_x0"

Sampling Training Images

python main.py --dataset "path_to_dataset" --sample --models "residual_diffusion_model_x0"

Sampling In The Wild Images

python main.py --dataset "path_to_dataset" --itw --models "residual_diffusion_model_x0"

Training Images

python main.py --dataset "path_to_dataset" --train --models "residual_diffusion_model_x0"

Getting average image results

Note: This will only return results if reconstructed images exist in the relevant directory

python main.py --dataset "path_to_dataset" --results --models "residual_diffusion_model_x0"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages