Image denoising autoencoder
A convolutional autoencoder trained to remove Gaussian noise from 256ร256 RGB images. The model learns the manifold of clean images and projects noisy inputs back onto this learned space.
Model description
This model removes Gaussian noise from corrupted images by learning to map noisy images back to their clean versions. During training, the autoencoder learns the distribution of clean images, enabling it to filter out noise while preserving image content.
Architecture:
- Encoder: Convolutional layers with downsampling (256ร256ร3 โ 1024)
- Decoder: Transposed convolutional layers with upsampling (1024 โ 256ร256ร3)
- Activation: LeakyReLU and Sigmoid
- Normalization: Batch normalization
Training noise level:
- ฯ=25 (on 0-255 scale) Gaussian noise
- Approximately 0.098 on [0,1] normalized scale
Performance:
- Target PSNR improvement: Noisy <25 dB โ Denoised >28 dB
- Target SSIM: >0.85
Intended use
This model is designed for educational purposes to demonstrate how autoencoders can learn to denoise images by understanding the structure of clean data.
Use cases:
- Understanding autoencoder denoising
- Learning about noise removal techniques
- Exploring how neural networks learn image manifolds
- Teaching AI/ML concepts in bootcamps
Training data
Trained on DF2K_OST, a combined dataset of high-quality images from:
- DIV2K (800 images)
- Flickr2K (2,650 images)
- OutdoorSceneTraining (10,424 images)
All images resized to 256ร256 pixels using Lanczos resampling. Gaussian noise (ฯ=25) added during training.
Training details
Hyperparameters:
- Optimizer: Adam (lr=1e-3)
- Loss function: Mean Squared Error (MSE)
- Batch size: 8
- Epochs: Up to 100 (with early stopping)
- Train/validation split: 90/10
- Noise level: ฯ=25
Callbacks:
- Early stopping (patience=5, monitoring validation loss)
- Learning rate reduction (factor=0.5, patience=3)
- Model checkpoint (best validation loss)
Hardware:
- Single NVIDIA GPU with memory growth enabled
How to use
import numpy as np
from tensorflow import keras
from huggingface_hub import hf_hub_download
# Download model
downloaded_model = hf_hub_download(
repo_id='gperdrizet/denoising_autoencoder',
filename='models/denoising_ae.keras',
repo_type='model'
)
# Load model
autoencoder = keras.models.load_model(downloaded_model)
# Denoise images
denoised = autoencoder.predict(noisy_images) # images shape: (N, 256, 256, 3)
For complete examples, see the training notebook.
Limitations
- Fixed input size (256ร256 RGB images)
- Trained on ฯ=25 noise level (may not generalize well to other noise levels)
- Not optimized for non-Gaussian noise
- Slower than traditional denoising filters
- Educational model, not production-ready
Generalization
The model was trained on ฯ=25 Gaussian noise but can handle different noise levels with varying effectiveness:
- Lower noise (ฯ<25): Excellent performance
- Similar noise (ฯโ25): Best performance
- Higher noise (ฯ>25): Reduced effectiveness
Project repository
Full code, training notebooks, and interactive demo: gperdrizet/autoencoders
Citation
If you use this model for educational purposes, please reference the project repository.