script.py is a minimal, self-contained implementation of a conditional diffusion model. It learns to generate LIDC samples, conditioned on a benign/malignant labels. The neural network architecture is a small U-Net. This code is modified from this excellent repo which does unconditional generation. The diffusion model is a Denoising Diffusion Probabilistic Model (DDPM).
Generated samples, two top rows show original samples and the lower ones synthesized samples.