Downloads · 30 days
0
adityapatil205/srgan
srgan is a machine learning model from adityapatil205. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Enhancing satellite imagery resolution using SRCNN and SRGAN architectures
Downloads · 30 days
0
Access
Public
Updated Feb 12, 2026
Repo size
84.9 MB
Likes
0
Public
Click a slice to open those files.
.pth81.4 MB · 96%
From the Hugging Face model README
Enhancing satellite imagery resolution using SRCNN and SRGAN architectures
A comprehensive deep learning project implementing and comparing three super-resolution methods for satellite imagery: Bicubic Interpolation (baseline), SRCNN, and SRGAN. This project demonstrates the effectiveness of adversarial training for perceptual quality improvement in remote sensing applications.
Satellite imagery often suffers from limited spatial resolution due to hardware constraints and atmospheric conditions. This project addresses this challenge by implementing state-of-the-art deep learning approaches to enhance image resolution by 4×.
Problem Statement: Given a low-resolution satellite image (64×64), generate a high-resolution reconstruction (256×256) that preserves detail and texture.
Approach: Three methods are compared:
| Method | PSNR (dB) ↑ | SSIM ↑ | Inference Time | Parameters |
|---|---|---|---|---|
| Bicubic | 31.28 ± 4.48 | 0.7912 ± 0.1146 | <1ms | - |
| SRCNN | 31.18 ± 3.85 | 0.8011 ± 0.1075 | ~15ms | 57K |
| SRGAN | 30.92 ± 3.51 | 0.8054 ± 0.1054 | ~75ms | 1.5M (G) |
Important Note: The PSNR decrease is expected behavior for GAN-based methods, which prioritize perceptual quality (captured by SSIM) over pixel-wise accuracy (captured by PSNR). This is a well-documented tradeoff in super-resolution research.
Input (64×64×3)
↓ Bicubic Upsampling
(256×256×3)
↓ Conv 9×9, 64 filters + ReLU
↓ Conv 5×5, 32 filters + ReLU
↓ Conv 5×5, 3 filters
Output (256×256×3)
Key Features:
Generator (SRResNet-based):
Input (64×64×3)
↓ Conv 9×9, 64
↓ 16× Residual Blocks
↓ Skip Connection
↓ 2× PixelShuffle Upsampling
↓ 2× PixelShuffle Upsampling
↓ Conv 9×9, 3
Output (256×256×3)
Discriminator:
Input (256×256×3)
↓ 8× Conv Blocks (64→512 filters)
↓ Dense 1024
↓ Dense 1 + Sigmoid
Output (Real/Fake probability)
Loss Function:
L_total = L_content + 0.001·L_adversarial + 0.006·L_perceptual
# Clone the repository
git clone https://github.com/yourusername/satellite-srgan.git
cd satellite-srgan
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
torch>=2.0.0
torchvision>=0.15.0
numpy>=1.24.0
pillow>=9.5.0
opencv-python>=4.8.0
scikit-image>=0.21.0
matplotlib>=3.7.0
tqdm>=4.65.0
# Organize your satellite images
python scripts/prepare_data.py --input_dir raw_images/ --output_dir data/processed/
Expected structure:
data/
├── processed/
│ ├── train/
│ │ ├── hr/ # High-resolution images
│ │ └── lr/ # Low-resolution images
│ ├── val/
│ └── test/
python scripts/train_srcnn.py \
--epochs 100 \
--batch_size 16 \
--lr 1e-4 \
--checkpoint_dir checkpoints/srcnn/
# Pre-training phase (MSE only)
python scripts/train_srgan.py \
--mode pretrain \
--epochs 50 \
--batch_size 8
# Adversarial training phase
python scripts/train_srgan.py \
--mode train \
--pretrain_checkpoint checkpoints/srgan/pretrain.pth \
--epochs 100 \
--batch_size 8
# Test SRGAN
python scripts/test_srgan.py \
--checkpoint checkpoints/srgan/best.pth \
--num_samples 20
python scripts/compare_models.py \
--srgan_checkpoint checkpoints/srgan/best.pth \
--srcnn_checkpoint checkpoints/srcnn/best.pth \
--num_samples 20
python scripts/inference.py \
--model srgan \
--checkpoint checkpoints/srgan/best.pth \
--input path/to/lr/image.png \
--output results/sr/image_sr.png
satellite-srgan/
├── config.py # Configuration and hyperparameters
├── requirements.txt # Python dependencies
├── README.md # This file
│
├── models/ # Model architectures
│ ├── srcnn.py # SRCNN implementation
│ ├── generator.py # SRGAN generator
│ ├── discriminator.py # SRGAN discriminator
│ └── saved_models/ # Trained model checkpoints
│
├── utils/ # Utility functions
│ ├── data_loader.py # Dataset and dataloaders
│ ├── metrics.py # PSNR, SSIM calculations
│ └── visualization.py # Plotting utilities
│
├── scripts/ # Training and evaluation scripts
│ ├── prepare_data.py # Data preprocessing
│ ├── train_srcnn.py # SRCNN training
│ ├── train_srgan.py # SRGAN training
│ ├── test_srgan.py # Model testing
│ ├── compare_models.py # Multi-model comparison
│ └── inference.py # Single image inference
│
├── data/ # Dataset directory
│ └── processed/
│ ├── train/
│ ├── val/
│ └── test/
│
├── checkpoints/ # Model checkpoints
│ ├── srcnn/
│ └── srgan/
│
└── results/ # Output results
├── model_comparisons/ # Comparison visualizations
├── metrics/ # Performance metrics
└── training_history/ # Training logs
Pre-training Phase:
Adversarial Training Phase:
PSNR (Peak Signal-to-Noise Ratio)
SSIM (Structural Similarity Index)
Key Findings:
Strengths:
Limitations:
| Scenario | Best Method | Reasoning |
|---|---|---|
| Real-time processing | SRCNN | 5× faster than SRGAN |
| Visual analysis | SRGAN | Highest SSIM score |
| Measurement tasks | SRCNN | More stable, predictable output |
| Edge devices | SRCNN | 26× fewer parameters |
| High-quality visualization | SRGAN | Superior perceptual quality |
| Batch processing | SRGAN | Best quality when time permits |
Contributions are welcome! Please follow these steps:
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)Please ensure your code follows the project's coding standards and includes appropriate tests.
This project is licensed under the MIT License - see the LICENSE file for details.
Project Link: https://github.com/adityaanantpatil/satellite-srgan
If you use this code in your research, please cite:
@software{satellite_srgan_2025,
author = {Aditya Anant Patil},
title = {Satellite Image Super-Resolution using Deep Learning},
year = {2025},
url = {https://github.com/adityaanantpatil/satellite-srgan}
}
⭐ If you find this project useful, please consider giving it a star!
Last updated: November 2025