Dr. Tsui-Wei Weng
Nov 28, 2023
DSC 210 FA’23 Numerical Linear Algebra
- Dinesh Karthikeyan PID: A59026248 Halıcıoğlu Data Science Institute
- Nandita Sanjivi PID: A69027955 Halıcıoğlu Data Science Institute
- Prathish Murugan PID: A69027919 Halıcıoğlu Data Science Institute
Image Compression is the process of reducing the size of the image without significantly compromising its visual quality. This is essential for various applications, including storage, transmission and efficient utilization of resources.
In this project, we explore the conventional linear algebra-based approach as well as the state-of-the-art approach for image compression. The comparison of Singular Value Decomposition (SVD) with the SOTA approach of using High Fidelity Generative Compression.
Running on local:
- Please ensure that the following libraries are installed in your environment.
imageio==2.31.5
ipynb==0.5.1
ipython==8.17.2
ipywidgets==8.1.1
matplotlib==3.8.1
numpy==1.26.2
Pillow==10.1.0
Pillow==10.1.0
skimage==0.0
tensorflow==2.15.0
tensorflow_macos==2.15.0
-
Open
Image_SVD.ipynb
and run all the cells.
Change the path to read the downloaded images to your local machine's current path. After that, you can just sequentially run all the cells and get the results. -
Open
HiFiC.ipynb
and run all the cells.
But I would strongly suggest running their Colab notebook as it has fewer dependencies.to run the SOTA code.
Singular Value Decomposition (SVD) serves as a robust mathematical tool for image compression. By decomposing an image matrix into three constituent matrices—U, Σ (Sigma), and V^T—SVD enables a more concise representation of the original image.
The key to compression lies in selectively retaining the first k singular values and their associated columns in U and V. The truncated singular values are then utilized to reconstruct the compressed image matrix. This process, while introducing some loss, allows for a substantial reduction in data size, making it an efficient method for optimizing storage, transmission, and computational resources.
Here is a GIF made from our implementation of SVD
This study extensively explores the integration of Generative Adversarial Networks (GANs) and learned compression techniques to create a state-of-the-art generative lossy compression system. The investigation covers normalization layers, generator and discriminator architectures, training strategies, and perceptual losses. Notably, the outcomes include visually pleasing reconstructions with perceptual similarity to the input, operation across a broad range of bitrates, and applicability to high-resolution images. In bridging the gap between rate-distortion-perception theory and practical implementation, the approach is assessed quantitatively using various perceptual metrics and through a user study.
Compare results from the earlier approach and SOTA implementation.
The visual quality of the images becomes unacceptable when the number of singular values is decreased. Optimizing a neural compression scheme with a GAN yields reconstructions with high perceptual fidelity that are visually close to the input. Users of the HiFiC method can benefit from better reconstructions at lower bitrates, reducing the amount of storage needed to save pictures and the bandwidth required to transmit pictures.
Image compression using SVD and HiFiC techniques are evaluated based on their performance using perceptual metrics. Since we are computing the SVD, SSIM and multiplying the U, S and V matrices together on each round of the algorithm, its performance is poorer than the generally accepted compression techniques today. In conclusion, the SVD approach proved robust, simple, easy to implement, and efficient in a constrained environment
Report can be found at Notion
Presentation can be found at Canva
Extra thanks to SVD Visualized, Singular Value Decomposition explained Video