Clustering face images for unsupervised facial recognition
The FaceImage.py script and testing images need to be in the same directory. All image files in the directory will be used, so it's best to remove any other image files from that directory
To run the FaceClustering Python Code:
-
install the following on your computer:
python
networkx
numpy
scipy
matplotlib
scikit-learn
Pillow
OpenCV -
Extract all the images from the DataSet zip file into the same directory as the python script. Make sure that the Haar xml files are in the same directory as the python script
-
Run the python script in terminal by typing:
python FaceClustering.py -
output
The code will plot display the graphs of all the points, as well as the graphs of the subclusters. The faces will also be displayed and its corresponding cluster number will be printed in the terminal window. The images clustered images will be saved into the current directory. Make sure to remove these before running the script again.