Clustering¶
- notebooks/clustering/clustering_basics.ipynb
Runs five unsupervised clustering algorithms — methods that group similar pixels together without needing any labels — on a SEM microscopy image, using
spice.clustering.<method>(). Each one builds a newSPICEDataholding the integer label array (it doesn’t change the original image), records what it did inspice.history, and stores extra in-between results in the new object’sextradict — for examplews_spice.extra['watershed_binary']andws_spice.extra['watershed_distance']for watershed, orotsu_spice.extra['otsu_thresholds']for multi-Otsu. Covers: marker-based watershed, SLIC superpixels (shown with boundary outlines and average-color regions), Felzenszwalb graph-based segmentation, multi-Otsu brightness thresholding, and Quickshift. The watershed result is saved with full provenance tracking.