This is a project implementing lossy image compression using the K Means Clustering Machine learning algorithm
Firstly clone the repo. Double-click install.sh to install all the required dependencies.
Usable for a .png image.
Follow the following steps:
- Rename your image to 'Compress.png'.
- Get your image directry path by right clicking->Properties->Location. Copy it.
- Run the Run.jar.
- Paste the path in the first field and press compress (Wait 10 seconds).
You should now have two new files alongside the image namely codebook.npy and compressed.png. These files are the compressed form of your image.
Follow the following steps:
- Get the directry path of your codebook.npy and compressed.png files as previously mentioned.
- Run the Run.jar.
- Paste the path in the second field and press decompress.
You should now have a new file in the directry as compressed1.png. This is the lossy decompressed version of your original image.