HyperSLIC is an adaptation of the simple linear iterative clustering (SLIC) algorithm widely used on remote sensing images for the clustering of high-dimensional microscopy datasets.
hyperSLIC is largely built upon pyxem and hyperspy, pip installing pyxem should provide both of these and all other requirements:
pip install pyxem
import hyperSLIC
Separate the 'wheat' from the 'chaff' given a certain threshold of the dynamic range or variance.
wheat = wheat_from_chaff(raveled,98,'range')
Make a hyperSLIC object
test = hyperSLIC.SLIC(wheat_hs,method,cluster_number,m_value,searchspace)
Run the clustering in a loop
test.find_closest_centeroid()
test.update_centeroids()
Please follow the demo.ipynb
jupyter notebook for detailed instructions on use, including expected runtime and outputs. An example scanning electron diffraction (SED) dataset found in hyperSLIC/data
Feel free to raise an issue if you experience problems or wish to see new functionality implemented.
- Y. Shi, W. Wang, Q. Gong and D. Li, The Journal of Engineering, 2019, 2019, 6675–6679. https://doi.org/10.1049/joe.2019.0240
- R. Achanta, A. Shaji, K. Smith, A. Lucchi, P. Fua and S. Süsstrunk, IEEE Trans Pattern Anal Mach Intell, 2012, 34, 2274–2282. https://doi.org/10.1109/TPAMI.2012.120