{"id":20046737,"url":"https://github.com/harshit-saraswat/face-recognition-based-image-separator","last_synced_at":"2025-05-05T09:31:59.231Z","repository":{"id":228032183,"uuid":"258988510","full_name":"harshit-saraswat/Face-Recognition-based-Image-Separator","owner":"harshit-saraswat","description":"This is a small fun project which uses face recognition techniques to separate images from a large dataset into images of different people according to faces.","archived":false,"fork":false,"pushed_at":"2020-08-27T17:05:33.000Z","size":2750,"stargazers_count":17,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T20:51:43.611Z","etag":null,"topics":["ai","automation","beginner","blog","code","computer-vision","dl","dlib","dlib-face-recognition","face-recognition","medium","ml","project","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harshit-saraswat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-04-26T09:19:31.000Z","updated_at":"2025-04-08T09:01:08.000Z","dependencies_parsed_at":"2024-03-16T14:44:21.372Z","dependency_job_id":"997c23e4-85d0-4e19-8b33-33473fa88dd7","html_url":"https://github.com/harshit-saraswat/Face-Recognition-based-Image-Separator","commit_stats":null,"previous_names":["harshit-saraswat/face-recognition-based-image-separator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshit-saraswat%2FFace-Recognition-based-Image-Separator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshit-saraswat%2FFace-Recognition-based-Image-Separator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshit-saraswat%2FFace-Recognition-based-Image-Separator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshit-saraswat%2FFace-Recognition-based-Image-Separator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harshit-saraswat","download_url":"https://codeload.github.com/harshit-saraswat/Face-Recognition-based-Image-Separator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252471586,"owners_count":21753215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","automation","beginner","blog","code","computer-vision","dl","dlib","dlib-face-recognition","face-recognition","medium","ml","project","python"],"created_at":"2024-11-13T11:29:03.869Z","updated_at":"2025-05-05T09:31:58.325Z","avatar_url":"https://github.com/harshit-saraswat.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Face-Recognition-based-Image-Separator\nThis is a small fun project which uses face recognition techniques to separate images from a large dataset into images of different people according to faces.\n\nThis repo contains all the code for my blog post on [medium](https://medium.com/analytics-vidhya/face-recognition-based-image-separator-408681f2360d)\n\n# Contents\n  1. Getting Started\n  2. Requirements\n  3. Files Included\n  4. Running the code\n  5. Results\n  6. License\n  7. Acnowledgements\n  8. References\n \n## Getting Started:\nBefore getting started first create directory in your system for this project and then add the following directories to it.\n  1. Dataset (Contains a large image set which you want to separate)\n  \n  ![](images/dataset.PNG)\n  \n  2. People (Contains 1 image per person for whom you want to recognize images and separate)\n  \n  ![](images/people.PNG)\n  \n  3. output (Empty directory, the code will fill it with images of people once it has run successfully)\n  \nThe folder structure looks as follows:\n\n![](images/Untitled%20Diagram.png)\n  \n## Requirements:\nMake sure you have already installed the following packages along with python 3.7:\n  1. [opencv](https://pypi.org/project/opencv-python/) - Image processing library\n  2. [pickle](https://pypi.org/project/pickle5/) - To store encodings\n  3. [dlib](https://github.com/davisking/dlib) - ML toolkit for image based tasks\n  4. [face_recognition](https://github.com/ageitgey/face_recognition) - Face Recognition api built on dlib\n\n## Files Included:\nAll the neccessary code is inside [image_segmentation.py](image_segmentation.py) file.\n\n[known_encodings.pickle](known_encodings.pickle) is my people dataset encodings file, you can create your own when you run the code.\n\n## Running the code:\nTo run the code first add the neccessary images as stated in the getting started section.\nAfter that open command prompt or terminal in your root directory and run the following command:\n  ```\n  python image_segmentation.py\n  ```\nWait and once it's finished, check out the output folder.\n\n## Results:\nOnce the code is run the output folder looks something like this:\n\n![](images/output%20folder.PNG)\n\nHarshit Folder:\n\n![](images/harshit.PNG)\n\nShreya Folder:\n\n![](images/shreya.PNG)\n\nGroup Folder:\n\n![](images/group.PNG)\n\nUnknown Folder:\n\n![](images/unknown.PNG)\n\n\n## License\n\nThis project is licensed under the MIT License.\n\n\n## Acknowledgments\n\n* [Davisking](https://github.com/davisking) for an amazing github repo on dlib\n* [Ageitgey](https://github.com/ageitgey) for the face-recognition api package\n\n\n## References\n  \n  1. [Siamese Network Paper](https://www.cs.cmu.edu/~rsalakhu/papers/oneshot1.pdf)\n  \n  2. [Signature Verification using Siamese Networks](http://papers.nips.cc/paper/769-signature-verification-using-a-siamese-time-delay-neural-network.pdf)\n  \n  3. Images:\n      \n      * https://www.researchgate.net/figure/Siamese-network-for-embedding-the-feature-maps-into-a-constant-vector_fig2_328376369\n      * https://www.researchgate.net/figure/The-Triplet-loss-in-cosine-similarity_fig3_316736728\n      * https://omoindrot.github.io/triplet-loss\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshit-saraswat%2Fface-recognition-based-image-separator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharshit-saraswat%2Fface-recognition-based-image-separator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshit-saraswat%2Fface-recognition-based-image-separator/lists"}