Face Clustering using Python

Face Clustering using Python

PROBLEM STATEMENT

We have given a dataset of face images and we have to separate similar face images into their respective directories.

Usually dataset of images contains thousands of images and labeling them manually can be a time consuming task.

Dataset

We have a dataset of unlabeled Face images extracted from video file using opencv.

Dataset of Face Images

Algorithm

K-means Clustering (Unsupervised Learning)

Code Snippets

So below are the code snippets for the whole python program.

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image
No alt text provided for this image


Result

So after after running the above code a new directory will be created called "cluster".This directory contains the respective label's directory (label0 and label1).

No alt text provided for this image
No alt text provided for this image

So below are the final images separated in their respective label directories .

label0 directory
label1 directory

Conclusion

So this is how we can reduce the manual task of separating similar images into groups and label them respectively.

Shubham Chhimpa

SDE @ Happay(MakeMyTrip)| 28K+ LinkedIn | Python | Flutter | Docker | AWS

5 年

PS : Do share your suggestions and Connect to me : Shubham Chhimpa

回复

要查看或添加评论,请登录

社区洞察

其他会员也浏览了