Skip to content

Latest commit

 

History

History
33 lines (24 loc) · 1.11 KB

README.md

File metadata and controls

33 lines (24 loc) · 1.11 KB

Palette Compression


This script can compress the color palette of your image using ML algorithms (KMeans and DBSCAN).\

Installation requires you to have poetry installed via pip, to install you need to run poetry install in the folder, then poetry shell to get into the venv.

You can run this script like this:
python -m palette_compression <filename> [colors=2] [use DBSCAN=N/y]

For example:
python -m palette_compression armstrong.png 7

DBScan is broken

DBSCAN method is currently broken. Images have artifacts, if you can fix it - PLEASE drop a PR.
Here's a comparison of timings, also look in the imgs/ folder to see the results:
difference

More examples can be seen in samples.md