Harshith Bachimanchi, Giovanni Volpe
Journal of Physics: Photonics 7, 013001 (2025)
doi: 10.1088/2515-7647/ada101
arXiv: 2409.16488
Diffusion models have emerged as a prominent technique in generative modeling with neural networks, making their mark in tasks like text-to-image translation and super-resolution. In this tutorial, we provide a comprehensive guide to build denoising diffusion probabilistic models from scratch, with a specific focus on transforming low-resolution microscopy images into their corresponding high-resolution versions in the context of super-resolution microscopy. We provide the necessary theoretical background, the essential mathematical derivations, and a detailed Python code implementation using PyTorch. We discuss the metrics to quantitatively evaluate the model, illustrate the model performance at different noise levels of the input low-resolution images, and briefly discuss how to adapt the tutorial for other applications. The code provided in this tutorial is also available as a Python notebook in the supplementary information.