Deepface

Latest version: v0.0.93

Safety actively analyzes 714860 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 3

0.0.82

Bugs

🔄 **Normalization Layer Update** : The VGG-Face model's normalization layer, causing issues for some GPU users (e.g. https://github.com/serengil/deepface/issues/957, https://github.com/serengil/deepface/issues/966), has been revamped. In this pull request, the normalization layer's functionality has been seamlessly integrated into the embedding calculation using regular NumPy operations instead of the Keras backend. [PR-967](https://github.com/serengil/deepface/pull/967)

🚧 **DeepID Model Representation Fix**: Resolved an issue with the representation call of the DeepID model, ensuring smooth and error-free execution. [PR-964](https://github.com/serengil/deepface/pull/964)

🐛 **Ssd detector's alignment bug**: When face detection is done with Ssd, unexpectedly it returns zero dimensional image. This causes errors in the alignment stage. We terminated the aligment procedure now if one of the dimension's shape of coming image is 0. [PR-959](https://github.com/serengil/deepface/pull/959)

❗ **Improved Dependency Handling**: Meaningful exception messages are now thrown when importing uninstalled optional dependencies (e.g., Ssd, YuNet), providing clear guidance for resolving dependencies. [PR-959](https://github.com/serengil/deepface/pull/959)

📦 **Package Inclusion in Wheel Build**: The readme and dependencies are now included in the built wheel package. This inclusion mitigates potential errors when uploading to Conda and ensures a smoother installation process for users. [PR-950](https://github.com/serengil/deepface/pull/950)

Enhancements

🗄️ **Datastore Management Enhancement**: After running the find function, the created datastore is now expected to be updated rather than deleted if new instances are added in the database folder. This PR ensures that the pickle file is appropriately modified when instances are added, dropped, or if the content of existing images changes, improving overall data management. [PR-959](https://github.com/serengil/deepface/pull/959)

📂 **Modularized Functionality Logics**: With this PR, the functionality logics for various operations in the DeepFace interface, including verify, find, analyze, represent, stream, and extract faces, have been relocated to the modules folder. As a result, the DeepFace interface (DeepFace.py) now boasts a cleaner and more organized structure. [PR-953](https://github.com/serengil/deepface/pull/953)

🧬 **Abstract Classes for Models**: New abstract classes, namely FacialRecognition, Detector, and Demography, have been introduced. All facial recognition models, extended models (e.g., age, gender), and detectors now inherit from these abstract classes. [This architectural enhancement simplifies the process of adding new backends for these models. [PR-960](https://github.com/serengil/deepface/pull/960), [PR-962](https://github.com/serengil/deepface/pull/962)

📚 **Docstring Refinement**: Docstrings in the deepface interface have been re-arranged for improved readability and understanding, enhancing the overall documentation. [PR-965](https://github.com/serengil/deepface/pull/965)

🐳 **Dockerfile Optimization**: The Dockerfile has been updated to enhance the docker build cache layer, resulting in an optimized and more efficient build process. [PR-951](https://github.com/serengil/deepface/pull/951)

Package

- https://pypi.org/project/deepface/0.0.82/

0.0.81

Enhancements

🚀 **VGG-Face Model Structure Update**: A significant change has been made to the model structure of the VGG-Face model. The last layer, originally with 2622 output nodes for classifying identities, has been replaced. The model now utilizes its early layer, featuring 4096 output nodes. This modification is backed by experiments demonstrating an impressive accuracy [improvement](https://github.com/serengil/deepface/issues/944) of nearly 6%. [PR-948](https://github.com/serengil/deepface/pull/948)

💡**Type Hints Added**: Type hints have been introduced for both function arguments and return types in DeepFace functions. This enhancement provides improved clarity and documentation, making it easier for developers to understand and utilize the functions effectively. [PR-922](https://github.com/serengil/deepface/pull/922), [PR-934](https://github.com/serengil/deepface/pull/934)

🛠️**Unit Test Refactoring**: The unit testing structure has undergone significant improvements. Previously, there was a single long-running unit test, but now, the tests have been modularized into multiple units. This refactoring enhances test manageability and granularity, allowing for more focused and efficient testing of individual components. [PR-932](https://github.com/serengil/deepface/pull/932/files)

Bugs

🛠️ **YuNet Alignment Issue Resolved**: Addressed and resolved the alignment issue in YuNet. Users can now experience improved alignment functionality, ensuring a more accurate and reliable performance. [PR-921](https://github.com/serengil/deepface/pull/921)

🟰 **load_image Function Update**: The load_image function now returns a tuple containing the loaded image and its corresponding image name. An update has been made in DeepFace.py to accommodate this change. The outdated point where this function was called has been rectified, ensuring proper assignment of the result as a tuple for improved functionality. [PR-917](https://github.com/serengil/deepface/pull/917)

🚢**Docker Shell Script Typo Fix**: Resolved a typo in the shell script file used for Dockerizing. The discrepancy in image names during both build and run steps has been corrected, ensuring consistency and preventing potential errors. [PR-943](https://github.com/serengil/deepface/pull/943)

Package

- https://pypi.org/project/deepface/0.0.81/

weights-vggface2-2d-aligned
The [DeepFace](https://research.fb.com/publications/deepface-closing-the-gap-to-human-level-performance-in-face-verification/) model was trained on the [VGGFace2](http://www.robots.ox.ac.uk/~vgg/data/vgg_face2/) dataset. 2D face alignment operation using [Dlib](https://github.com/davisking/dlib)'s frontal face (HOG based) detector, [5 point facial landmarks](http://github.com/davisking/dlib-models) and get_face_chips function were performed on the images to normalise inputs into the network. The pre trained weights of the Keras CNN model are downloadable in the form of **.h5** files.

| Dataset | Identities | Images |
| --- | --- | --- |
| [VGGFace2-Train](http://www.robots.ox.ac.uk/~vgg/data/vgg_face2/data_infor.html) | 8631 | 3.3M |
| VGGFace2-Train<sup>*</sup> | 8631 | 2.3M |

<sup>*</sup>The VGGFace2 dataset (publicly available training set) was used for training such that 3 images from each of the classes were left for the hold-out dev-validation set. The aforementioned alignment technique accounted for removal of a lot of images contained in the original VGGFace2 dataset as HOG face detector could not detect faces that lacked frontal pose.

![train_val_split](https://user-images.githubusercontent.com/10649800/65716105-1b6b4880-e0bc-11e9-81cc-8a14f8431e0a.png)

weights-vggface2-2d-aligned
The [DeepFace](https://research.fb.com/publications/deepface-closing-the-gap-to-human-level-performance-in-face-verification/) model was trained on the [VGGFace2](http://www.robots.ox.ac.uk/~vgg/data/vgg_face2/) dataset. 2D face alignment operation using [Dlib](https://github.com/davisking/dlib)'s frontal face (HOG based) detector, [5 point facial landmarks](http://github.com/davisking/dlib-models) and get_face_chips function were performed on the images to normalise inputs into the network. The pre trained weights of the Keras CNN model are downloadable in the form of **.h5** files.

| Dataset | Identities | Images |
| --- | --- | --- |
| [VGGFace2-Train](http://www.robots.ox.ac.uk/~vgg/data/vgg_face2/data_infor.html) | 8631 | 3.3M |
| VGGFace2-Train<sup>*</sup> | 8631 | 2.3M |

<sup>*</sup>The VGGFace2 dataset (publicly available training set) was used for training such that 3 images from each of the classes were left for the hold-out dev-validation set. The aforementioned alignment technique accounted for removal of a lot of images contained in the original VGGFace2 dataset as HOG face detector could not detect faces that lacked frontal pose.

![train_val_split](https://user-images.githubusercontent.com/10649800/65716105-1b6b4880-e0bc-11e9-81cc-8a14f8431e0a.png)

Page 3 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.