Skip to content

Anil970198/U-Net-Denoising

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧽 U-Net Denoising: Scientific Image Restoration with Deep Learning

🧠 Project Overview

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.


📦 Dataset Usage

We used the BSDS500 grayscale dataset:

🔗 https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/bsds/

Dataset Prep:

  • All .jpg images from train/, val/, and test/ were flattened into data/raw/
  • Gaussian noise was added using add_noise.py
  • Noisy images were saved in data/noisy/

⚠️ Dataset files (data/raw/ and data/noisy/) are not included in the repository to keep it lightweight. Use the noise script to regenerate them.


🗂️ Project Structure

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

🧠 Model Architecture

  • 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

🏋️ Training Summary

Setting Value
Epochs 3
Batch Size 8
Final Loss ~0.0011
Device MacBook Air M3

📈 Evaluation Results

Metric Value
PSNR 29.52 dB
SSIM 0.8407

These results were computed over 500+ denoised samples and indicate strong recovery performance.


🖼️ Output Placeholders

Original Image Noisy Input Denoised Output
original noisy cleaned

Replace the placeholders with your manually noised and cleaned examples.


🚀 Run Instructions

  1. Install dependencies:
pip install -r requirements.txt
  1. Generate noisy images:
python U-Net\ Denoising/add_noise.py
  1. Train the model:
python train.py
  1. Evaluate performance:
python U-Net\ Denoising/evaluate.py

📌 Credits

Developed by [Your Name] as part of a deep learning portfolio project aligned with research interests at GOKUL Lab, IIT Hyderabad.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages