Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 1.14 KB

File metadata and controls

28 lines (20 loc) · 1.14 KB

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