Skip to content

devarsh-mavani-19/principal-component-analysis-image-compression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

PCA Image Compression

A browser-based tool for compressing images using Principal Component Analysis (PCA). Upload an image, adjust the number of principal components, and see the compression in real time with detailed visual insights.

Demo

https://github.com/devarsh-mavani-19/principal-component-analysis-image-compression/raw/main/recording.mov

Features

  • Drag-and-drop or click-to-upload image input
  • Real-time PCA compression with adjustable component count
  • Side-by-side original vs compressed image comparison
  • Interactive insights dashboard:
    • Scree plot of eigenvalues
    • Cumulative variance explained chart
    • Top eigenvector visualization
    • Per-component variance share pie chart
  • Detailed stats: variance retained, compression ratio, top eigenvalue dominance
  • Step-by-step explanation of how PCA image compression works

Usage

Open index.html in a browser — no build step or server required. The app loads ml-pca from a CDN.

  1. Upload an image (PNG, JPG, BMP, WebP)
  2. Use the slider to adjust the number of principal components
  3. Observe the compressed result and PCA insights in real time

About

Image Compression Using Principal Component Analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages