# DeDuplication of Faces

**URL:** <https://forum.opencv.org/t/deduplication-of-faces/17661>\
**Category:** Python\
**Tags:** facerecognition, face, programming\
**Created:** [May 16, 2024, 10:06am UTC](https://forum.opencv.org/t/deduplication-of-faces/17661 "2024-05-16T10:06:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nvrcharan](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@Nvrcharan](https://forum.opencv.org/u/Nvrcharan)\
**Post date:** [May 16, 2024, 10:06am UTC](https://forum.opencv.org/t/deduplication-of-faces/17661/1 "2024-05-16T10:06:27Z")

</div>

I’m having the difficulty in extracting the unique faces from a folder. and save them in a seperate folder. Flow should go like this :  
At first, **uniquefaces** folder will be empty and xyz folder is full of faces with multiple people and each person’s face may or may not be repeated. now while processing the faces from xyz folder, we check the face from xyz folder and any faces in the **uniquefaces** folder, if there is a match we skip the face and move to next face and if it is not present [or recognised] then we have to add it to the **uniquefaces** folder. so we’ll have only unique faces in the **uniquefaces** folder.  
Now for the recognition task I’ve tried all most all open source face recognition libraries. But I got no good results. Here are the Libraries I have tried by manipulating and adjusting distance metrics and thresholds:  
[deepface](https://github.com/serengil/deepface)  
[face-recognition](https://github.com/ageitgey/face_recognition)  
insightface ai  
compreFace  
I haven’t tried TFace Got stuck at how to implement it. Probably will work it out that one too.  
And these libraries are either giving false positives {having duplicates} or removing the data[loss of some unique faces while comapring]. How can i solve this one. Thank you.
