Image Clustering

JuSPICE provides a suite of unsupervised image clustering algorithms that partition an image into spatially coherent regions based on intensity, texture, or graph-theoretic criteria. These are distinct from the deep-learning and foundation-model pipelines described in Image Segmentation, which JuSPICE exposes through the separate spice.segmentation accessor. Pick an algorithm below.

All six algorithms are accessible through ClusteringAccessor (spice.clustering.*).

Core API

See juspice.clustering_module for full API details and Clustering for a module-level explanation.

Notebook example

A complete workflow example is available in:

The notebook loads a SEM image via load_data(), applies all five algorithms, and saves the watershed label array through save_data() so that the result includes a provenance JSON sidecar and a reproducible history script.

For K-means clustering over multi-channel per-pixel feature vectors, see:

References

Libraries

  • scikit-image — provides five segmentation algorithms (watershed, SLIC, Felzenszwalb, Otsu multi-threshold, Quickshift)

  • scikit-learn — provides K-means clustering

  • NumPy — label array storage and statistical post-processing

See Bibliography for the publications behind the methods on this page.