Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skekre98/picture-compressor
A tool for compressing images using unsupervised machine learning
https://github.com/skekre98/picture-compressor
kmeans-clustering scikit-learn
Last synced: 1 day ago
JSON representation
A tool for compressing images using unsupervised machine learning
- Host: GitHub
- URL: https://github.com/skekre98/picture-compressor
- Owner: skekre98
- License: mit
- Created: 2019-05-15T22:38:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-19T00:33:50.000Z (about 4 years ago)
- Last Synced: 2024-11-21T17:37:30.833Z (2 months ago)
- Topics: kmeans-clustering, scikit-learn
- Language: Python
- Size: 569 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Picture-Compressor
A tool for compressing images using unsupervised machine learning## K-means Clustering
K-means is an unsupervised algorithm that makes inferences from datasets using only input vectors without referring to known, or labelled, outcomes. K-means algorithm identifies k number of centroids, and then allocates every data point to the nearest cluster, while keeping the centroids as small as possible. In reference to this tool, your k centroids are the number of colors that are selected are majority colors. For example, if k were to be 5, then the five most prominent colors would show up in your compressed image.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
## Dependencies
Runs on Python 3.6+
* [NumPy](https://www.numpy.org) - package for scientific computing with Python
* [Pillow](https://pillow.readthedocs.io/en/stable/) - Python Imaging Library
* [scikit-learn](https://scikit-learn.org/stable/) - machine learning library for implementing KMeans## Usage
```
python compress.py [image file]
```