Facenet: cluster random images into folders

Created on 12 Jul 2017  路  7Comments  路  Source: davidsandberg/facenet

Hi

I have set of random images in a folder. how can i cluster similar images into specific folder. I tried using LBP approach but it was not solving the problem. Using facenet pls suggest how can i achieve the same.

Thanks
vij

Most helpful comment

The "chinese whispers" algorithm works very well.

https://github.com/zhly0/facenet-face-cluster-chinese-whispers-

0.97733 value as threshold (https://github.com/davidsandberg/facenet/wiki/Validate-on-LFW)

All 7 comments

The "chinese whispers" algorithm works very well.

https://github.com/zhly0/facenet-face-cluster-chinese-whispers-

0.97733 value as threshold (https://github.com/davidsandberg/facenet/wiki/Validate-on-LFW)

I gone thru the link. it seems the prerequisite for chinese whispers is images which should be available in folders where every folder name will be taken as class. In my case i have all unorganized images in root folder only. i do not have sub folders. pls suggest

@namghiwook great solution!

currently i am using LBP approach where all similar images will be grouped into specific folder but the accuracy is hardly 70%

@vijaysagi
You can put all images in "album/all/" folder, and set "album" folder as --input value.

change code like below in facenet_face_cluster.py

// cluster_dir = dest_dir
cluster_dir = dest_dir + "_" + str(idx)

Try it! Good luck!

Thats awesome solution. thank you so much

@namghiwook the threshold(0.9733) you mentioned is cosion similarity or euclidean similarity? thx.

Was this page helpful?
0 / 5 - 0 ratings