ClearView: Image Deraining with UNet
Fast and practical deep learning model for removing rain streaks from images.
Model Description
ClearView is a UNet-based image deraining model trained on 12,600 synthetic rainy images. It removes rain streaks while preserving image structure and details.
Key Features
- ⚡ Fast inference: ~0.5-1s per image on a single NVIDIA RTX 500 Ada Generation Laptop GPU
- 🎯 Good performance: 30.9 PSNR / 0.914 SSIM on test set
- 🔧 Easy to use: Simple PyTorch model with minimal dependencies
Performance
| Metric | Value | Std Dev | Min | Max |
|---|---|---|---|---|
| PSNR | 30.91 | ±2.16 | 25.68 | 38.10 |
| SSIM | 0.914 | ±0.026 | 0.831 | 0.967 |
| MAE | 0.021 | ±0.006 | 0.009 | 0.040 |
Training Details:
- Architecture: UNet (vanilla conv blocks)
- Loss: L1 (pixel-wise)
- Dataset: Rain1400 (12,600 train / 1,400 test pairs)
- Optimizer: AdamW (lr=1e-4)
- Training time: ~6 hours on RTX 4070 Super 12GB VRAM
Use Cases
✅ Good for:
- Dashcam footage enhancement
- Surveillance video preprocessing
- Photo restoration
- Research baseline
⚠️ Limitations:
- Trained on synthetic rain (may not generalize to all real-world scenarios)
- Slight texture smoothing in heavily detailed areas
- No temporal consistency for video currently supported (processes frames independently)
Quick Start
Gradio Demo
Try the model instantly: Space Link
Python Inference
import torch
from PIL import Image
from clearview.models import UNet
# Load model
model = UNet()
checkpoint = torch.load('clearview-unet.pth')
model.load_state_dict(checkpoint['model_state_dict'])
model.eval()
# Load and preprocess image
image = Image.open('rainy_image.jpg')
# ... preprocessing code ...
# Inference
with torch.no_grad():
output = model(input_tensor)
# Save result
output_image.save('derained.jpg')
Training
Trained using the ClearView repository:
clearview-train \
--data-dir /path/to/Rain1400 \
--model unet \
--loss l1 \
--optimizer adamw \
--lr 1e-4 \
--epochs 200 \
--batch-size 24
Citation
@software{saksena2025clearview,
author = {Saksena, Saumya Kumaar},
title = {ClearView: Practical Image Deraining},
year = {2025},
url = {https://github.com/dronefreak/clearview}
}
Model Card Authors
Saumya Kumaar Saksena
Model Card Contact
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support