This repository contains the code for the paper
Zhang, Yunping, Xihui Liu, and Edmund Y. Lam. "Single-shot inline holography using a physics-aware diffusion model." Optics Express 32.6 (2024): 10444-10460.
In this paper, we propose a novel unsupervised algorithm called physics-aware diffusion model (PadDH), specifically designed for snapshot digital holographic reconstruction. PadDH represents a pioneering adaptation of the diffusion model that seamlessly integrates the physical model into its generative process. Through comprehensive experiments using both synthetic and experimental data, we validate the remarkable capabilities of PadDH in effectively reducing twin-image contamination and generating high-quality reconstructions. Our work showcases significant advancements in holographic imaging by harnessing the powerful prior knowledge encoded in pre-trained diffusion models, leading to improved reconstruction quality and enhanced efficiency from single-shot measurements.
If you have any question on the code, please contact the author: yp000925@connect.hku.hk
configs/config.yaml
data/cells
and data/USAF
. The results will be saved in the folder ./results
by default.
python simulation.py --task_config configs/task_sim_USAF.yaml
to reproduce the simulation results of USAF target in the paper.python simulation.py --task_config configs/task_sim_cell.yaml
to reproduce the simulation results of cells target in the paper.ExpSample/USAF
and ExpSample/convallaria
. The results will be saved in the folder ./results
by default.
python experiment.py --task_config configs/task_exp.yaml --exp_name USAF
to reproduce the experimental results of USAF target in the paper.python experiment.py --task_config configs/task_exp.yaml --exp_name convallaria
to reproduce the experimental results of convallaria sample in the paper.The following is a simple process to try your own dataset.
configs/config.yaml
./data/YOUR_DATA
. The dataset should be saved in the format of .png
or .jpg
.configs/task_config.yaml
python main.py --task_config configs/task_exp.yaml --exp_name YOUR_EXP_NAME --save_dir YOUR_OUTPATH
to reconstruct your own data. The results will be saved in the folder ./YOUR_OUTPATH
.If you find this work useful, please consider citing the following paper:
@article{zhang2024single,
title={Single-shot inline holography using a physics-aware diffusion model},
author={Zhang, Yunping and Liu, Xihui and Lam, Edmund Y},
journal={Optics Express},
volume={32},
number={6},
pages={10444--10460},
year={2024},
publisher={Optica Publishing Group}
}
This implementation is based on / inspired by the open-source diffusion models DDPM, guided-diffusion, DPS