This repository provides a simple python script for image segmentation with spectral clustering.
Install the dependencies with
python -m pip install -r requirements.txt
In order to segment a given image, simply execute
python segment.py <inputFilename> <outputFilename> <numSegments>
If you find this useful in your work, please cite the following paper.
A Tighter Analysis of Spectral Clustering, and Beyond, Peter Macgregor and He Sun, ICML 2022.
@InProceedings{pmlr-v162-macgregor22a,
title = {A Tighter Analysis of Spectral Clustering, and Beyond},
author = {Macgregor, Peter and Sun, He},
booktitle = {Proceedings of the 39th International Conference on Machine Learning},
pages = {14717--14742},
year = {2022},
volume = {162},
publisher = {PMLR},
}