Skip to content

SamuelMorgan777/SVD-Image-Compression-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SVD for Image Compression

📌 Applied Math for Data Science & AI — Final Project

Author: Samuel Morgan
Topic: Singular Value Decomposition (SVD) and Image Compression


🔍 Project Overview

Modern datasets can be extremely large—images, video frames, satellite scans, and user-preference matrices can contain millions of values. Storing and processing these datasets efficiently is a major challenge in data science.

Singular Value Decomposition (SVD) is a powerful linear algebra technique that decomposes a matrix into its core components so we can:

  • Identify the most informative patterns in the data
  • Reconstruct datasets using fewer values
  • Reduce file size without losing meaningful structure
  • Remove noise and improve data quality

This repository demonstrates SVD applied to image compression, explaining the mathematics behind SVD and showcasing reconstruction results at various rank approximations using Python.


🧠 Key Concepts Covered

  • Matrix factorization: A = UΣVᵀ
  • Eigenvalues & singular values
  • Dimensionality reduction and low-rank approximation
  • Data compression vs. information loss trade-offs
  • Image reconstruction using truncated SVD
  • Storage reduction calculations
  • Extension into color images and satellite imagery
  • Strengths and limitations of SVD in real-world applications

📁 Repository Contents

File Description
Final_Paper.pdf Full technical write-up explaining SVD, image compression, mathematics, and real-world applications
SVD_Presentation.pptx Summary slides for project presentation
svd_image_compression.py (or .ipynb) Python implementation demonstrating SVD on grayscale and color images
README.md Project overview and documentation

(Supporting images and visual outputs are generated within the Python notebook and referenced in the paper.)


🧮 How SVD Enables Image Compression

  1. Images are represented as large matrices of pixel values.
  2. SVD decomposes the image matrix → U, Σ, and Vᵀ.
  3. Singular values (from Σ) are ranked by importance.
  4. Keeping only the top k singular values reconstructs the image while removing less meaningful details.
  5. This creates a low-rank approximation, dramatically reducing storage needs.

Compression Formula:

Storage ≈ k × (height + width)

Example Result:

Version Storage
Original Image 2.93 MB
Rank-150 Reconstruction 0.51 MB (17.41% of original size)

Despite the 82% reduction in size, visual quality remains nearly unchanged.


🖼 Applications Beyond Images

SVD supports many modern data science technologies, including:

  • Streaming recommendations (Netflix, Spotify, etc.)
  • Natural Language Processing
  • Voice & facial recognition
  • Denoising and signal processing
  • Satellite image compression and enhancement
  • Scientific and geospatial imaging

⚠ Limitations

  • SVD is computationally expensive on very large matrices
  • High compression can lead to loss of fine detail
  • Not always ideal alone for satellite imagery—often paired with methods like wavelet transforms

🚀 Technologies Used

  • Python
  • NumPy (numpy.linalg.svd)
  • Jupyter Notebook
  • Linear Algebra & Matrix Decomposition

📎 References

  • Kossek, W. COMP 3009 – SVD Example 3, 2025, canvas.du.edu
  • Pillow, J. Statistical Modeling and Analysis of Neural Data, Princeton, 2018
  • Serano Academy. SVD and Image Compression, YouTube, 2020
  • Wikipedia. Ritchie Center, 2025

✅ Summary

SVD makes it possible to compress massive datasets—especially images—while preserving structure and reducing storage demands. This project demonstrates both the mathematical foundation and the practical impact of SVD in data science, machine learning, and signal processing.


Thank you for reviewing this project!

About

SVD-based image compression and rank reduction with mathematical explanation and Python implementation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors