Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 1.01 KB

README.md

File metadata and controls

24 lines (15 loc) · 1.01 KB

Image Compression Tool

I have used K-Means Clustering algorithm, an unsupervised machine learning algorithm, to build a tool for image compression. The size of the compressed image depends on the number of clusters chosen. Decreasing the number of clusters will reduce the size of the image but will affect the quality of the image. Choose the number of clusters according to your personal requirements.

Requirements

  • Python
  • NumPy
  • scikit-learn
  • scikit-image

Instructions

  • Download tool.py and move it to the directory containing the required images.
  • Open terminal and type python tool.py image.png and run it.
  • You will be asked to enter the number of clusters. Enter the desired number and run it.

Illustration

Screenshot 2024-06-06 130259


Screenshot 2024-06-06 130329