YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

๐Ÿ›ฐ๏ธ Satellite Image Super-Resolution using Deep Learning

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.


๐Ÿ“‹ Table of Contents


๐ŸŽฏ Overview

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:

  1. Bicubic Interpolation - Traditional baseline
  2. SRCNN - Deep CNN for fast, accurate reconstruction
  3. SRGAN - GAN-based approach for perceptually superior results

โœจ Key Features

  • ๐Ÿ—๏ธ Multiple Architectures: SRCNN and SRGAN implementations
  • ๐Ÿ“Š Comprehensive Evaluation: PSNR, SSIM metrics with statistical analysis
  • ๐ŸŽจ Visual Comparisons: Side-by-side comparison visualizations
  • ๐Ÿš€ Production Ready: Modular, well-documented code
  • ๐Ÿ“ˆ Training Monitoring: Real-time metrics tracking and visualization
  • ๐Ÿ”„ Reproducible: Fixed seeds, documented hyperparameters
  • ๐Ÿ’พ Checkpointing: Automatic model saving and resumption

๐Ÿ“Š Results

Performance Metrics (Test Set: 315 Images)

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)

Improvements Over Baseline

  • SRCNN: -0.10 dB PSNR, +0.0099 SSIM (+1.25%)
  • SRGAN: -0.36 dB PSNR, +0.0142 SSIM (+1.79%)

Key Observations

  • โœ… SSIM improvements indicate better structural and perceptual quality despite slightly lower PSNR
  • โœ… SRGAN achieves highest SSIM (0.8054), showing superior perceptual quality
  • โœ… Lower variance in deep learning methods (3.51-3.85 dB) vs bicubic (4.48 dB) indicates more consistent performance
  • โš ๏ธ PSNR-SSIM tradeoff: Deep learning methods optimize for perceptual quality over pixel-perfect reconstruction
  • ๐ŸŽฏ SRCNN offers best speed/quality balance for real-time applications
  • ๐ŸŽฏ SRGAN recommended for applications prioritizing visual quality

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.


๐Ÿ—๏ธ Architecture

SRCNN Architecture

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:

  • Simple, efficient architecture
  • ~57K parameters
  • Fast inference (~15ms)
  • MSE-based training

SRGAN Architecture

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

๐Ÿš€ Installation

Prerequisites

  • Python 3.10+
  • CUDA-capable GPU (recommended: 4GB+ VRAM)
  • CUDA Toolkit 11.x+

Setup

# 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

Requirements

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

๐Ÿ’ป Usage

1. Data Preparation

# 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/

2. Training

Train SRCNN

python scripts/train_srcnn.py \
    --epochs 100 \
    --batch_size 16 \
    --lr 1e-4 \
    --checkpoint_dir checkpoints/srcnn/

Train SRGAN

# 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

3. Testing & Evaluation

Test Individual Model

# Test SRGAN
python scripts/test_srgan.py \
    --checkpoint checkpoints/srgan/best.pth \
    --num_samples 20

Compare All Methods

python scripts/compare_models.py \
    --srgan_checkpoint checkpoints/srgan/best.pth \
    --srcnn_checkpoint checkpoints/srcnn/best.pth \
    --num_samples 20

4. Inference on New Images

python scripts/inference.py \
    --model srgan \
    --checkpoint checkpoints/srgan/best.pth \
    --input path/to/lr/image.png \
    --output results/sr/image_sr.png

๐Ÿ“ Project Structure

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

๐Ÿ”ฌ Methodology

Dataset

  • Test samples: 315 image pairs
  • Resolution: 64ร—64 (LR) โ†’ 256ร—256 (HR), 4ร— upscaling
  • Preprocessing: Normalization to [-1, 1]

Training Strategy

SRCNN

  • Loss: Mean Squared Error (MSE)
  • Optimizer: Adam (lr=1e-4)
  • Batch size: 16
  • Epochs: 100
  • Data augmentation: Random flips, rotations

SRGAN

  1. Pre-training Phase:

    • MSE loss only
    • 50 epochs
    • Stable initialization
  2. Adversarial Training Phase:

    • Combined loss: Content + Adversarial + Perceptual
    • Loss weights: 1.0 + 0.001 + 0.006
    • VGG19 conv5_4 features for perceptual loss
    • Label smoothing (real=0.9, fake=0.1)
    • Gradient clipping (max_norm=1.0)
    • 100 epochs

Evaluation Metrics

PSNR (Peak Signal-to-Noise Ratio)

  • Measures pixel-wise reconstruction accuracy
  • Higher is better (typical range: 25-35 dB)
  • Note: GANs often sacrifice PSNR for perceptual quality

SSIM (Structural Similarity Index)

  • Measures structural similarity and perceptual quality
  • Range: [0, 1], higher is better
  • Better correlates with human perception than PSNR

๐Ÿ“ˆ Performance Analysis

Quantitative Results

Key Findings:

  • Perceptual Quality: Both SRCNN and SRGAN improve SSIM over bicubic baseline
  • Consistency: Deep learning methods show 20-23% lower standard deviation in PSNR
  • SRGAN Leadership: Achieves highest SSIM (0.8054), indicating best perceptual quality
  • SRCNN Efficiency: Nearly matches SRGAN quality with 5ร— faster inference

Qualitative Analysis

Strengths:

  • โœ… SRCNN: Fast inference (15ms), lightweight (57K params), stable training
  • โœ… SRGAN: Superior textures, realistic details, highest perceptual quality
  • โœ… Both: Better structural preservation than bicubic interpolation

Limitations:

  • โš ๏ธ SRGAN: Slower inference (75ms), larger model (1.5M params), complex training
  • โš ๏ธ SRCNN: Limited texture recovery compared to SRGAN
  • โš ๏ธ Both: Fixed 4ร— upscaling factor, single-scale training

Use Case Recommendations

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

๐Ÿ”ฎ Future Work

Short-term Improvements

  • Implement ESRGAN for even better perceptual quality
  • Add multi-scale training (2ร—, 3ร—, 4ร—, 8ร—)
  • Expand dataset diversity (different terrains, seasons, sensors)
  • Optimize inference speed with TensorRT/ONNX
  • Add multi-spectral band support

Long-term Research

  • Explore transformer-based architectures (SwinIR, HAT)
  • Develop domain-specific loss functions for satellite imagery
  • Implement real-world degradation modeling
  • Create specialized models for different terrain types
  • Deploy as web service/API with cloud infrastructure

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please ensure your code follows the project's coding standards and includes appropriate tests.


๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments


๐Ÿ“ง Contact

Project Link: https://github.com/adityaanantpatil/satellite-srgan


๐Ÿ“Š Citation

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

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support