Skip to content

Python implementation of "The incremental online k-means clustering algorithm and its application to color quantization"

Notifications You must be signed in to change notification settings

brunobelloni/python-color-quantization

 
 

Repository files navigation

Slower implementation of "The incremental online k-means clustering algorithm and its application to color quantization"

  1. Batch K-Means (Forgy, 1965 and Lloyd, 1982)
  2. Incremental Batch K-Means (Linde et al., 1980)
  3. Online K-Means (MacQueen, 1967)
  4. Incremental Online K-Means (Abernathy & Celebi, 2022)

Color Quantization Visualization:

Original Image (24-bit) K=256 (8-bit) K=128 (7-bit) K=64 (6-bit) K=32 (5-bit) K=16 (4-bit) K=8 (3-bit)
24-bit Fish 8-bit MSE: 33.03 7-bit MSE: 52.85 6-bit MSE: 85.57 5-bit MSE: 141.75 4-bit MSE: 261.97 3-bit MSE: 523.64
24-bit Pills 8-bit MSE: 41.29 7-bit MSE: 66.26 6-bit MSE: 111.54 5-bit MSE: 200.18 4-bit MSE: 363.38 3-bit MSE: 710.83
24-bit Kodim23 8-bit MSE: 44.49 7-bit MSE: 75.15 6-bit MSE: 131.98 5-bit MSE: 241.26 4-bit MSE: 485.24 3-bit MSE: 1017.66
24-bit Kodim05 8-bit MSE: 38.18 7-bit MSE: 63.79 6-bit MSE: 110.80 5-bit MSE: 202.64 4-bit MSE: 389.18 3-bit MSE: 689.97

Cluster Visualization:

3d_clusters_okm.gif OKM on fish.ppm (3-bit)

3d_clusters_iokm.gif IOKM on fish.ppm (3-bit)

Releases

No releases published

Packages

No packages published

Languages

  • Python 52.0%
  • C++ 48.0%