Skip to content

Clustering face images for unsupervised facial recognition

License

Notifications You must be signed in to change notification settings

eldinsahbaz/FaceImageClustering

Repository files navigation

FaceImageClustering

Clustering face images for unsupervised facial recognition

Note:

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

Instructions

To run the FaceClustering Python Code:

  1. install the following on your computer:
    python
    networkx
    numpy
    scipy
    matplotlib
    scikit-learn
    Pillow
    OpenCV

  2. 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

  3. Run the python script in terminal by typing:
    python FaceClustering.py

  4. 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.