This is the project to normalized cut the two different people,the dataset is the .mat format, it's also have .jpg to visulize. The datasets contain 20 people's faces. Calculating the euclidean distance between the images, then use the kernal function exp(-d/std) output the similarity matrix . You can run the .ipynb, it would be easy to read the function needed
This project contains three files
normcut.py
normcut.ipynb
python_ncut_lib.py
I provide two ways to run the code.
$jupyter notebook
and then run all, it's easy for you to understand all the media function you need.
another way is use python
$python normcut.py