| Name | facial-recognition JSON |
| Version |
0.0.8
JSON |
| download |
| home_page | None |
| Summary | Most effective and easiest to install python library for recognising faces in images or videos |
| upload_time | 2025-11-08 23:31:34 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3 |
| license | None |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# facial_recognition
<b>facial_recognition</b> aims to be the most effective face recognition library for python that you can install with a single command
```
pip install facial_recognition
```
After that, you need to download and setup the model file used for recognition by running the following command (Even if you dont do this now, the model file will be downloaded the first time you run this library)
```
facial_recognition-setup
```
In case this results in an error, you need to manually download the model file to the path where facial_recognition is installed( Usually on Windows its in C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\facial_recognition) using wget on Linux and Invoke-WebRequest on Windows
```
Invoke-WebRequest https://huggingface.co/Rubarion/facial_recognition_model/resolve/main/arcface.onnx -OutFile arcface.onnx
```
# Adding Known faces to the database
Just copy a preferably high definition camera facing and face clearly visible single photo of each person you want recognized to a folder and rename it with the name of that person. Afte you have copied and renamed all known faces in this manner, Run the following command from inside the folder (open the folder and then right click shell/terminal)
```
facial_recognition add_faces
```
This creates a database of known faces to which the faces in the new image that you give will be compared for matching. As the accuracy of this library is solely dependednt on the quality of the single photo of each person that you store in databse, please make sure that you use a very clear photo where the face is looking straight at the camera and slightly zoomed in so that the entire face region is clearly visible.
Then inorder to recognise the faces in a image, lets say sample.jpg, Open terminal in the folder where this image is stored and simply run
```
facial_recognition recognize sample.jpg
```
This will create an output folder in that same folder and the corresponding output image with boxes drawn around faces and labels will be saved in that folder.
To remove all stored known faces and start again
```
facial_recognition remove_faces
```
# Testing and Accuracy
This package was tested on the **[Labelled Faces in the Wild (LFW Dataset)]("https://www.kaggle.com/datasets/jessicali9530/lfw-dataset?utm_source=chatgpt.com") and a very impressive 74.65% accuracy or 969 faces recognised correctly out of total 1298 was obtained.** (Screenshots of test running in terminal attached below)


Why accuarcy is not close to 100% is because the images in this dataset are very small cropped faces as shown in the output images below (where the facial_recognition package correctly recognised Angelina Jolie and Catherine Zeta Jones) and as we are very unlikely to encounter such small cropped close up shots of face images or frames in the real world, it was not worth the effort to tweak the code to obtain >90% accuracy just for this dataset. Basically this test proves that both fo normal images of persons as well as for very small images like this, the package does very very well in correctly identifying the faces.


**Please note in case of any bugs that this library will be updated frequently**
Raw data
{
"_id": null,
"home_page": null,
"name": "facial-recognition",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Sreehari P V <rubarion@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/26/8b/c314101173e4dd45dbdbb5f1679a33afdbdec5905f1d37ad47c783acac91/facial_recognition-0.0.8.tar.gz",
"platform": null,
"description": "# facial_recognition\n<b>facial_recognition</b> aims to be the most effective face recognition library for python that you can install with a single command\n```\npip install facial_recognition\n```\nAfter that, you need to download and setup the model file used for recognition by running the following command (Even if you dont do this now, the model file will be downloaded the first time you run this library)\n\n```\nfacial_recognition-setup\n```\nIn case this results in an error, you need to manually download the model file to the path where facial_recognition is installed( Usually on Windows its in C:\\Users\\user\\AppData\\Local\\Programs\\Python\\Python312\\Lib\\site-packages\\facial_recognition) using wget on Linux and Invoke-WebRequest on Windows\n\n```\nInvoke-WebRequest https://huggingface.co/Rubarion/facial_recognition_model/resolve/main/arcface.onnx -OutFile arcface.onnx\n```\n\n# Adding Known faces to the database\nJust copy a preferably high definition camera facing and face clearly visible single photo of each person you want recognized to a folder and rename it with the name of that person. Afte you have copied and renamed all known faces in this manner, Run the following command from inside the folder (open the folder and then right click shell/terminal)\n\n```\nfacial_recognition add_faces\n```\nThis creates a database of known faces to which the faces in the new image that you give will be compared for matching. As the accuracy of this library is solely dependednt on the quality of the single photo of each person that you store in databse, please make sure that you use a very clear photo where the face is looking straight at the camera and slightly zoomed in so that the entire face region is clearly visible.\nThen inorder to recognise the faces in a image, lets say sample.jpg, Open terminal in the folder where this image is stored and simply run\n\n```\nfacial_recognition recognize sample.jpg\n```\n\nThis will create an output folder in that same folder and the corresponding output image with boxes drawn around faces and labels will be saved in that folder.\n\n\nTo remove all stored known faces and start again\n\n```\nfacial_recognition remove_faces\n```\n\n# Testing and Accuracy\n\nThis package was tested on the **[Labelled Faces in the Wild (LFW Dataset)](\"https://www.kaggle.com/datasets/jessicali9530/lfw-dataset?utm_source=chatgpt.com\") and a very impressive 74.65% accuracy or 969 faces recognised correctly out of total 1298 was obtained.** (Screenshots of test running in terminal attached below)\n\n\n\n\n\nWhy accuarcy is not close to 100% is because the images in this dataset are very small cropped faces as shown in the output images below (where the facial_recognition package correctly recognised Angelina Jolie and Catherine Zeta Jones) and as we are very unlikely to encounter such small cropped close up shots of face images or frames in the real world, it was not worth the effort to tweak the code to obtain >90% accuracy just for this dataset. Basically this test proves that both fo normal images of persons as well as for very small images like this, the package does very very well in correctly identifying the faces.\n\n\n\n\n\n\n**Please note in case of any bugs that this library will be updated frequently**\n",
"bugtrack_url": null,
"license": null,
"summary": "Most effective and easiest to install python library for recognising faces in images or videos",
"version": "0.0.8",
"project_urls": {
"Homepage": "https://github.com/Rubarion/facial_recognition"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "613398f9a729bf603314ace571daa7c508a829df7706559948bf499dbb9ac747",
"md5": "682f3d07fd68587a918dd6b126f0699b",
"sha256": "d8d63e58e393b20e5d4c0bf4a06b55ad70fdc7c94798482f824589e0615c9e3a"
},
"downloads": -1,
"filename": "facial_recognition-0.0.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "682f3d07fd68587a918dd6b126f0699b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 10792,
"upload_time": "2025-11-08T23:31:32",
"upload_time_iso_8601": "2025-11-08T23:31:32.806554Z",
"url": "https://files.pythonhosted.org/packages/61/33/98f9a729bf603314ace571daa7c508a829df7706559948bf499dbb9ac747/facial_recognition-0.0.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "268bc314101173e4dd45dbdbb5f1679a33afdbdec5905f1d37ad47c783acac91",
"md5": "f67dbf7b6a56f9e7693f806ca9b5c845",
"sha256": "29f668a378e89063491d7382ea8be1daabb3b90667362ec3a2fd3351d9fe88b1"
},
"downloads": -1,
"filename": "facial_recognition-0.0.8.tar.gz",
"has_sig": false,
"md5_digest": "f67dbf7b6a56f9e7693f806ca9b5c845",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 258713,
"upload_time": "2025-11-08T23:31:34",
"upload_time_iso_8601": "2025-11-08T23:31:34.722020Z",
"url": "https://files.pythonhosted.org/packages/26/8b/c314101173e4dd45dbdbb5f1679a33afdbdec5905f1d37ad47c783acac91/facial_recognition-0.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-11-08 23:31:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Rubarion",
"github_project": "facial_recognition",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "facial-recognition"
}