This project implements a lightweight U-Net model to denoise grayscale scientific images corrupted with synthetic Gaussian noise. It mimics real-world noise introduced by microscopes, satellite sensors, or medical scanners, and applies a deep learning surrogate to restore the original signal.
This work is aligned with surrogate modeling under uncertainty, a core research theme at the GOKUL Lab, IIT Hyderabad.
We used the BSDS500 grayscale dataset:
🔗 https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/bsds/
- All
.jpgimages fromtrain/,val/, andtest/were flattened intodata/raw/ - Gaussian noise was added using
add_noise.py - Noisy images were saved in
data/noisy/
⚠️ Dataset files (data/raw/anddata/noisy/) are not included in the repository to keep it lightweight. Use the noise script to regenerate them.
Gen AI Projects/
├── data/
│ ├── raw/ # Clean grayscale images (not pushed)
│ ├── noisy/ # Noisy versions of images (auto-generated)
├── images/
│ ├── train/
│ ├── val/
│ └── test/
├── models/
│ └── unet.py # U-Net architecture
├── outputs/
│ ├── model_last.pth # Trained model weights (ignored)
│ ├── loss_curve.png # Training loss plot (ignored)
│ └── sample_epoch3.png # Denoising output (ignored)
├── U-Net Denoising/
│ ├── add_noise.py # Adds Gaussian noise to raw images
│ └── evaluate.py # Computes PSNR and SSIM metrics
├── output.png # Manual visualization (ignored)
├── train.py # Main training script
├── requirements.txt # Dependencies
├── README.md # This file
└── .gitignore # Ignore rules
- Type: U-Net (3-level lightweight variant)
- Input/Output: Grayscale image (1 channel)
- Loss Function: MSE
- Optimizer: Adam (lr = 1e-3)
- Training Resolution: 256×256
| Setting | Value |
|---|---|
| Epochs | 3 |
| Batch Size | 8 |
| Final Loss | ~0.0011 |
| Device | MacBook Air M3 |
| Metric | Value |
|---|---|
| PSNR | 29.52 dB |
| SSIM | 0.8407 |
These results were computed over 500+ denoised samples and indicate strong recovery performance.
| Original Image | Noisy Input | Denoised Output |
|---|---|---|
![]() |
![]() |
![]() |
Replace the placeholders with your manually noised and cleaned examples.
- Install dependencies:
pip install -r requirements.txt- Generate noisy images:
python U-Net\ Denoising/add_noise.py- Train the model:
python train.py- Evaluate performance:
python U-Net\ Denoising/evaluate.pyDeveloped by [Your Name] as part of a deep learning portfolio project aligned with research interests at GOKUL Lab, IIT Hyderabad.


