<p>Clustering in the way i specified in question is not correct for facial images. It is best to use a convolutional neural network to train the features instead of manually computing distances from facial landmarks. </p>

<p>Later on these trained features, we can apply any of the popular clustering algorithm as shown here: <a href="https://arxiv.org/pdf/1604.00989.pdf" rel="nofollow noreferrer">https://arxiv.org/pdf/1604.00989.pdf</a>
or as @sascha suggested, Approximate Nearest Neighbour or as @Davis King suggested Chinese Whispers depending on your needs. </p>

<p>As @sascha suggested, there are many deep learning libraries like openface that does this on top of torche/tensorflow. </p>
How to cluster faces of persons based on facial landmarks?
<p>I am getting facial landmarks using dlib. I have dataset of more than 1000 faces. I want to make a comparison of these 1000 images with some unknown image. To decrease the database search time, i want to cluster these 1000images in to 10 different clusters based on the 68 facial landmark features of dlib. Currently, I am clustering based on chin to nose distance of different face images. </p>

<p>Problem: Each image of same person is generating different facial landmarks which is effecting the distance calculated from chin to nose tip. Please find the screenshot of csv  <a href="https://i.stack.imgur.com/4e2cn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4e2cn.png" alt="enter image description here"></a></p>

<ol>
<li>1st column - Face Image names (same person face with around 25
samples) </li>
<li>2nd,3rd columns - Kmeans clustered labels and centroids of column
4 </li>
<li>4th - Face chin to nose tip euclidean distances</li>
<li>5th - 68 long dlib facial landmarks seperated as chin, eye ....</li>
</ol>

<p>Questions:</p>

<ol>
<li>Is it a right way to cluster images based on facial landmarks ?  If not, what is the best way to cluster face images/face groupping to make databse searc more efficient for more images ?</li>
</ol>

<p>I tried with gender classification, but the accuracy is not good. Tried with face color/Ethnicity classification but this limiting my scope. For instance, only asian/european faces will again make me to search all the database</p>

<p>I am not able to identify which is the right factor to cluster. Any reference to articles or ideas are much appreciated. </p>