This project addresses an inverse problem in computational imaging: reconstructing high-quality images from degraded observations affected by motion blur and noise.
We compare classical, deep learning, and generative approaches under the same experimental conditions, with the goal of analyzing their strengths and limitations.
Given a clean image ( x ), we generate a degraded observation ( y ):
[ y = Kx + n ]
where:
- ( K ): motion blur operator
- ( n ): additive Gaussian noise
- Kernel size: 9
- Motion angle: (chosen experimentally)
- Noise levels: 0.005, 0.01, 0.05, 0.1
All methods are evaluated on the same degraded inputs.
Dataset used: FFHQ 256x256
🔗 https://huggingface.co/datasets/bitmind/ffhq-256
- Resize to 256×256
- Normalize pixel values to [0,1]
- Train / Validation / Test split
- Synthetic degradation generation
All preprocessing choices are documented and reproducible.
We implement and compare four methodological families:
- Total p-Variation (TpV)
- ( p \in (0.1, 0.5) )
- Optimization-based reconstruction
- Architecture: (e.g. UNet / NAFNet / ViT)
- Supervised training on degraded → clean pairs
- Loss functions: L1 / L2 / perceptual (optional)
- Diffusion Posterior Sampling (DPS)
- Adapted for inverse problems
- Combines diffusion priors with data consistency
- Plug-and-Play (PnP) with HQS
- Iterative reconstruction:
- Data fidelity step
- Denoising step using pretrained model
We compare all methods using:
- PSNR
- SSIM
- Visual comparison of reconstructed images
- Artifact inspection
- Robustness to noise levels
- Comparative plots across all methods
- Performance vs noise level
- Trade-offs:
- accuracy
- speed
- stability
├── data/ # dataset and preprocessing
├── degradation/ # blur + noise simulation
├── variational/ # TpV implementation
├── models/ # deep learning architectures
├── diffusion/ # DPS implementation
├── pnp/ # Plug-and-Play HQS
├── evaluation/ # PSNR, SSIM, plots
├── notebooks/ # experiments and visualization
├── utils/ # helper functions
└── main.py
git clone https://github.com/your-username/your-repo-name.git
cd your-repo-namepip install -r requirements.txt
Follow instructions from: https://huggingface.co/datasets/bitmind/ffhq-256
python main.py --method unet python main.py --method tpv python main.py --method dps python main.py --method pnp
Parameters are chosen heuristically, including:
Regularization weight (TpV) Network architecture and training setup Number of diffusion steps (DPS) HQS iteration parameters
A detailed discussion is provided in the report and presentation.