Team Ai
Apppublic

VivekReddy-4/satellite-image-compression

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
App README

Welcome to Streamlit!

Semantic-Aware Deep Learning Based Compression of High-Resolution Satellite Images

Project Overview

High-resolution satellite images are extremely large and require efficient compression for storage and transmission. Traditional compression techniques such as JPEG and JPEG2000 often fail to preserve important spatial structures in satellite imagery.

This project proposes a deep learning based compression system using a Convolutional Autoencoder combined with semantic-aware preprocessing. Important regions in the image are preserved while less important regions are smoothed to improve compression efficiency.

The system processes Sentinel-2 satellite bands and reconstructs compressed images while maintaining visual and structural quality.


Key Idea

The system detects important regions in the image using edge detection and applies semantic-aware preprocessing before compressing the image patches using a CNN Autoencoder.

This allows the model to:

  • —Preserve important structures such as roads, coastlines, and buildings
  • —Smooth less important background regions
  • —Achieve better compression while maintaining image quality

Dataset

The project uses Sentinel-2 satellite imagery.

Bands used:

  • —B02 – Blue
  • —B03 – Green
  • —B04 – Red

These spectral bands are combined to generate RGB satellite images.

Note: Due to the large size of satellite imagery, the dataset is not included in this repository.


Methodology

Pipeline of the proposed system:

  1. 1.Satellite Image Acquisition
  2. 2.RGB Image Generation from Sentinel-2 Bands
  3. 3.Important Region Identification using Edge Detection
  4. 4.Semantic-Aware Preprocessing
  5. 5.Patch Extraction (128 × 128)
  6. 6.CNN Autoencoder Compression
  7. 7.Patch Reconstruction
  8. 8.Full Image Reconstruction
  9. 9.Performance Evaluation

Model Architecture

The compression model is a Convolutional Autoencoder.

Encoder

Conv2D → MaxPooling Conv2D → MaxPooling Conv2D → MaxPooling

Latent Representation

16 × 16 × 32

Decoder

Conv2D → UpSampling Conv2D → UpSampling Conv2D → UpSampling


Compression Details

Original Patch Size: 128 × 128 × 3

Encoded Representation: 16 × 16 × 32

Original Size: 49152 values

Compressed Size: 8192 values

Compression Ratio: ≈ 6×


Performance Metrics

The model performance is evaluated using:

  • —PSNR (Peak Signal-to-Noise Ratio)
  • —SSIM (Structural Similarity Index)

Average results obtained:

PSNR ≈ 32–37 SSIM ≈ 0.90–0.92

These results show that the system preserves important visual information while achieving compression.


Technologies Used

Python TensorFlow / Keras Streamlit OpenCV Rasterio NumPy Scikit-image


Web Application

The project includes a Streamlit web application that allows users to:

  1. 1.Upload Sentinel-2 spectral bands (B02, B03, B04)
  2. 2.Generate RGB satellite images
  3. 3.Apply semantic-aware compression
  4. 4.View original vs reconstructed images
  5. 5.Download the compressed result

How to Run the Application

Clone the repository

git clone https://github.com/VivekReddy-4/satellite-image-compression

cd satellite-image-compression

Install dependencies

pip install -r requirements.txt

Run the Streamlit app

streamlit run streamlit_app.py


Deployment

The project is deployed using HuggingFace Spaces.

Live application: https://huggingface.co/spaces/VivekReddy-4/satellite-image-compression


Author

Vivek Reddy BTech Computer Science


Future Improvements

  • —Support for multi-spectral satellite compression
  • —Improved compression ratio using advanced architectures
  • —Integration with cloud-based satellite datasets