{"id":19873426,"url":"https://github.com/asutoshpati/face-clustering-using-dbscan","last_synced_at":"2025-05-02T09:31:43.530Z","repository":{"id":45172667,"uuid":"376862104","full_name":"AsutoshPati/Face-Clustering-using-DBSCAN","owner":"AsutoshPati","description":"Demonstrates face clustering using DBSCAN (Density Based Spatial Clustering of Applications with Noise) algorithm.","archived":false,"fork":false,"pushed_at":"2023-04-16T09:49:57.000Z","size":102,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T00:51:16.555Z","etag":null,"topics":["dbscan","dbscan-algorithm","face-clustering","face-dataset","face-encodings","face-recognition","opencv","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AsutoshPati.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}},"created_at":"2021-06-14T14:58:21.000Z","updated_at":"2025-03-04T14:50:55.000Z","dependencies_parsed_at":"2022-07-13T18:21:44.742Z","dependency_job_id":null,"html_url":"https://github.com/AsutoshPati/Face-Clustering-using-DBSCAN","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsutoshPati%2FFace-Clustering-using-DBSCAN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsutoshPati%2FFace-Clustering-using-DBSCAN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsutoshPati%2FFace-Clustering-using-DBSCAN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsutoshPati%2FFace-Clustering-using-DBSCAN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AsutoshPati","download_url":"https://codeload.github.com/AsutoshPati/Face-Clustering-using-DBSCAN/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252015861,"owners_count":21680839,"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":["dbscan","dbscan-algorithm","face-clustering","face-dataset","face-encodings","face-recognition","opencv","python"],"created_at":"2024-11-12T16:18:36.688Z","updated_at":"2025-05-02T09:31:43.225Z","avatar_url":"https://github.com/AsutoshPati.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Face Clustering Algorithm\n\n---\n\nThis code shows face clustering using [DBSCAN](\nhttps://scikit-learn.org/stable/modules/generated/sklearn.cluster.DBSCAN.html) (Density Based Spatial Clustering of\nApplications with Noise) algorithm. Using this codes you can create face database of fine images (by removing blurred\nimages) and then you can easily apply face clustering on the newly created database.\n\nAfter clustering unique faces you can also find best pictures from each cluster.\n\nIf you find this code helpful please don't forget to give star and follow.\n\n---\n\n## Requirements\n\n\u003e pip install dlib@https://pypi.python.org/packages/da/06/bd3e241c4eb0a662914b3b4875fc52dd176a9db0d4a2c915ac2ad8800e9e/dlib-19.7.0-cp36-cp36m-win_amd64.whl#md5=b7330a5b2d46420343fbed5df69e6a3f\n\n\u003e pip install face-recognition==1.3.0\n\n\u003e pip install opencv-python==4.5.2.52\n\n\u003e pip install scikit-learn==0.24.2\n\n## How to use\n\n* Just put all the cropped face (as this code doesn't have crop face code) images into \"face_images\" directory.\n  (you can add the crop face code in \"create_face_database\" function at the marked place in \"get_encodings.py\")\n  \n* Then run the \"example.py\" file to stat the face database making procedure. If you want to use it in your code; then \n  you need to put \"get_encodings.py\" in your project directory and have to use the function \"create_face_database\".\n  ```python\n  import get_encodings as enc\n  root_path = 'face_images' # path to your\n  dir_name, data_len = enc.create_face_database(root_path)\n  ```\n\n* Once face database is created it will start doing face cluster immediately after completing the result directory where \n  clustered faces are stored will be displayed. If you want to add \"face_cluster.py\" to your project directory and have \n  to use \"do_cluster\" function.\n  ```python\n  import face_cluster as cluster\n  dir_name = '' # path to face database directory\n  unq_faces, res_dir = cluster.do_cluster(dir_name)\n  ```\n\n* You can find best picture from each class using \"get_best_pics\" function once clustering is completed, and you have \n  number of clusters and path to result directory.\n  ```python\n  import face_cluster as cluster\n  unq_faces = 0 # num of clusters after clustering\n  res_dir = '' # path to stored face cluster result\n  unq_fine_faces = cluster.get_best_pics(unq_faces, res_dir)\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasutoshpati%2Fface-clustering-using-dbscan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasutoshpati%2Fface-clustering-using-dbscan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasutoshpati%2Fface-clustering-using-dbscan/lists"}