{"id":18839544,"url":"https://github.com/12345k/multi-face-comparison","last_synced_at":"2025-04-14T06:51:39.392Z","repository":{"id":106775976,"uuid":"146292796","full_name":"12345k/Multi-Face-Comparison","owner":"12345k","description":"This repo is meant for backend API for face comparision and computer vision. It is built on python flask framework","archived":false,"fork":false,"pushed_at":"2020-05-23T18:45:33.000Z","size":486,"stargazers_count":25,"open_issues_count":3,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T20:40:26.560Z","etag":null,"topics":["bac","comparison","deeplearning","distance","face","face-detection","face-recognition","flask","machine-learning","postman","python","python3"],"latest_commit_sha":null,"homepage":"","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/12345k.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,"publiccode":null,"codemeta":null}},"created_at":"2018-08-27T12:13:00.000Z","updated_at":"2024-10-31T14:22:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"4bd8b631-83fb-4d36-8a54-5d4c71a02836","html_url":"https://github.com/12345k/Multi-Face-Comparison","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/12345k%2FMulti-Face-Comparison","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/12345k%2FMulti-Face-Comparison/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/12345k%2FMulti-Face-Comparison/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/12345k%2FMulti-Face-Comparison/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/12345k","download_url":"https://codeload.github.com/12345k/Multi-Face-Comparison/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837274,"owners_count":21169373,"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":["bac","comparison","deeplearning","distance","face","face-detection","face-recognition","flask","machine-learning","postman","python","python3"],"created_at":"2024-11-08T02:43:21.777Z","updated_at":"2025-04-14T06:51:39.379Z","avatar_url":"https://github.com/12345k.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multi-Face-Comparison\n\nCompare two images and it will return True or False. This is the main focus of this repo. I have attached two py file.\nOne is compare_image.py this can be run in the terminal with two images name like\n\n\u003e karthick_aravindan@ml-machine:~/Documents/Two-Face-Comparison$ python compare_image.py image_1.jpg image_2.jpg \n\nAnother File is app.py. This file is api which can be attached to website or other apps. In this we compare multiple faces with one target image.\n\n## Requirment\n\n```\npip install face_recognition\npip install flask\npip install scipy\n```\n# Run\n```\n\u003e karthick_aravindan@ml-machine:~/Two-Face-Comparison$ python app.py\n```\nFlask api will be hosted 8000 port\n### Endpoints\n- /api/v1/compare_faces \n- /api/v1/detect_faces\n\n\n## Output for compare_image.py \n\nDistance and Boolean value. Distance is higher means it is false and lower is True\n\n###### command line output \n```\n\u003e karthick_aravindan@ml-machine:~/Two-Face-Comparison$ python compare_image.py  ami.jpg AMI.jpg  \n\u003e 0.5439451765528829\n\u003e True\n```\n## Output for compare face API \n\nOutput will be in  json format. Addition I have calculate time take to predict\n\n###### Example\n\n```\n[\n    {\n        \"result\": \"True\",\n        \"distance\": 0.0,\n        \"time_taken\": 0.29,\n        \"target\": \"rajini.jpeg\",\n        \"face\": \"rajini.jpeg\"\n    },\n    {\n        \"result\": \"False\",\n        \"distance\": 0.77,\n        \"time_taken\": 0.339,\n        \"target\": \"rajini.jpeg\",\n        \"face\": \"kamal.jpg\"\n    }\n]    \n```\nI have used postman to check the api. The url mostly will be like http://localhost:8000/compare_faces in POST format.\n#### form-data key name will be target and faces in Postman\n\n![request](https://github.com/12345k/Multi-Face-Comparison/blob/master/screenshot/compare_faces.png)\n\n\n\n## Detect Faces API\n\nIt will returns list of face coordinates for the images. \n\n#### Example\n\n```\n[\n    {\n        \"coordinates\": [\n            {\n                \"ymin\": 46,\n                \"xmin\": 175,\n                \"ymax\": 136,\n                \"xmax\": 86\n            }\n        ],\n        \"time_taken\": 0.046,\n        \"image_name\": \"kamal.jpg\"\n    },\n    {\n        \"coordinates\": [\n            {\n                \"ymin\": 32,\n                \"xmin\": 101,\n                \"ymax\": 84,\n                \"xmax\": 49\n            }\n        ],\n        \"time_taken\": 0.016,\n        \"image_name\": \"harry.jpg\"\n    }\n]\n```\n![request](https://github.com/12345k/Multi-Face-Comparison/blob/master/screenshot/detect_faces.png)\n\n\n###### command line output \n```\n\u003e karthick_aravindan@ml-machine:~/Two-Face-Comparison$ python detect_face.py image_path/ami.jpg\n\u003e Coordinates:  [(53, 114, 115, 52)]\n```\n\nLinks for other resources\n\nhttps://face-recognition.readthedocs.io/en/latest/installation.html\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F12345k%2Fmulti-face-comparison","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F12345k%2Fmulti-face-comparison","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F12345k%2Fmulti-face-comparison/lists"}