This is hungarian algorithm applied on k-means clustering (or you can replace with other clustering algorithms) for Poggies :P.
The image for Poggies is taken here site.
To run the file, simply
python hungarian_algorithm.py
We refer mostly to this site (hungarian algorithm written in R) for implementation details.
hungarian_algorithm.ipynb
is a jupyter notebook with the same content as hungarian_algorithm.py
, hungarian_algorithm_relaxed.ipynb
is a jupyter notebook which allows for varying number of clusters for the two segmentations, i.e. relaxed constaints.
-
Hungarian algorithm for R: https://things-about-r.tumblr.com/post/36087795708/matching-clustering-solutions-using-the-hungarian
-
K-Means Clustering: https://www.kdnuggets.com/2019/08/introduction-image-segmentation-k-means-clustering.html