Showing preview only (3,789K chars total). Download the full file or copy to clipboard to get everything.
Repository: serengil/deepface
Branch: master
Commit: bcf1c509d9f9
Files: 150
Total size: 3.6 MB
Directory structure:
gitextract_icnp_eu4/
├── .codeboarding/
│ ├── External_Integration_Layer.md
│ ├── Facial_Analysis_Engine.md
│ ├── Model_Management_System.md
│ ├── Utility_Infrastructure_Layer.md
│ └── on_boarding.md
├── .gitattributes
├── .github/
│ ├── CODE_OF_CONDUCT.md
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── 01-report-bug.yaml
│ │ ├── 02-request-feature.yaml
│ │ ├── 03-documentation.yaml
│ │ └── config.yml
│ ├── pull_request_template.md
│ └── workflows/
│ └── tests.yml
├── .gitignore
├── .pylintrc
├── .vscode/
│ └── settings.json
├── CITATION.cff
├── Dockerfile
├── LICENSE
├── Makefile
├── README.md
├── benchmarks/
│ ├── Evaluate-Results.ipynb
│ ├── Perform-Experiments.ipynb
│ └── README.md
├── boosted/
│ ├── Perform-Boosting-Experiments-LightGBM.ipynb
│ ├── Perform-Boosting-Experiments-XGBoost.ipynb
│ └── models/
│ └── boosted_lightface_7.txt
├── deepface/
│ ├── DeepFace.py
│ ├── __init__.py
│ ├── api/
│ │ ├── __init__.py
│ │ ├── postman/
│ │ │ └── deepface-api.postman_collection.json
│ │ └── src/
│ │ ├── __init__.py
│ │ ├── app.py
│ │ ├── dependencies/
│ │ │ ├── __init__.py
│ │ │ ├── container.py
│ │ │ └── variables.py
│ │ └── modules/
│ │ ├── __init__.py
│ │ ├── auth/
│ │ │ ├── __init__.py
│ │ │ └── service.py
│ │ └── core/
│ │ ├── __init__.py
│ │ ├── routes.py
│ │ └── service.py
│ ├── commons/
│ │ ├── __init__.py
│ │ ├── constant.py
│ │ ├── embed_utils.py
│ │ ├── folder_utils.py
│ │ ├── image_utils.py
│ │ ├── logger.py
│ │ ├── package_utils.py
│ │ └── weight_utils.py
│ ├── config/
│ │ ├── __init__.py
│ │ ├── confidence.py
│ │ ├── minmax.py
│ │ └── threshold.py
│ ├── models/
│ │ ├── Demography.py
│ │ ├── Detector.py
│ │ ├── FacialRecognition.py
│ │ ├── __init__.py
│ │ ├── demography/
│ │ │ ├── Age.py
│ │ │ ├── Emotion.py
│ │ │ ├── Gender.py
│ │ │ ├── Race.py
│ │ │ └── __init__.py
│ │ ├── face_detection/
│ │ │ ├── CenterFace.py
│ │ │ ├── Dlib.py
│ │ │ ├── FastMtCnn.py
│ │ │ ├── MediaPipe.py
│ │ │ ├── MtCnn.py
│ │ │ ├── OpenCv.py
│ │ │ ├── RetinaFace.py
│ │ │ ├── Ssd.py
│ │ │ ├── Yolo.py
│ │ │ ├── YuNet.py
│ │ │ └── __init__.py
│ │ ├── facial_recognition/
│ │ │ ├── ArcFace.py
│ │ │ ├── Buffalo_L.py
│ │ │ ├── DeepID.py
│ │ │ ├── Dlib.py
│ │ │ ├── Facenet.py
│ │ │ ├── FbDeepFace.py
│ │ │ ├── GhostFaceNet.py
│ │ │ ├── OpenFace.py
│ │ │ ├── SFace.py
│ │ │ ├── VGGFace.py
│ │ │ └── __init__.py
│ │ └── spoofing/
│ │ ├── FasNet.py
│ │ ├── FasNetBackbone.py
│ │ └── __init__.py
│ └── modules/
│ ├── __init__.py
│ ├── database/
│ │ ├── __init__.py
│ │ ├── inventory.py
│ │ ├── mongo.py
│ │ ├── neo4j.py
│ │ ├── pgvector.py
│ │ ├── pinecone.py
│ │ ├── postgres.py
│ │ ├── types.py
│ │ └── weaviate.py
│ ├── datastore.py
│ ├── demography.py
│ ├── detection.py
│ ├── encryption.py
│ ├── exceptions.py
│ ├── modeling.py
│ ├── normalization.py
│ ├── preprocessing.py
│ ├── recognition.py
│ ├── representation.py
│ ├── streaming.py
│ └── verification.py
├── docker/
│ ├── docker-compose.yml
│ ├── integration.sh
│ ├── pgvector-init/
│ │ └── 01_pgvector.sql
│ └── postgres-init/
│ └── 001_create_table.sql
├── entrypoint.sh
├── experiments/
│ └── distance-to-confidence.ipynb
├── mypy.ini
├── package_info.json
├── requirements-dev.txt
├── requirements.txt
├── requirements_additional.txt
├── requirements_local
├── scripts/
│ ├── dockerize.sh
│ ├── push-release.sh
│ └── service.sh
├── setup.py
└── tests/
├── integration/
│ ├── test_postgres_register.py
│ └── test_postgres_search.py
└── unit/
├── dataset/
│ ├── face-recognition-pivot.csv
│ └── master.csv
├── face-recognition-how.py
├── overlay.py
├── stream.py
├── test_analyze.py
├── test_api.py
├── test_commons.py
├── test_encrypt.py
├── test_enforce_detection.py
├── test_extract_faces.py
├── test_find.py
├── test_find_batched.py
├── test_landmark_sanitization.py
├── test_output_normalization.py
├── test_represent.py
├── test_signature.py
├── test_singleton.py
├── test_verify.py
├── test_version.py
└── visual-test.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .codeboarding/External_Integration_Layer.md
================================================
```mermaid
graph LR
API_Core["API Core"]
Streaming_Module["Streaming Module"]
DeepFace_Facade["DeepFace Facade"]
Common_Utilities["Common Utilities"]
Models["Models"]
API_Core -- "delegates requests to" --> DeepFace_Facade
Streaming_Module -- "delegates requests to" --> DeepFace_Facade
API_Core -- "uses" --> Common_Utilities
Streaming_Module -- "uses" --> Common_Utilities
DeepFace_Facade -- "interacts with to manage and utilize" --> Models
DeepFace_Facade -- "uses for logging and image processing" --> Common_Utilities
Common_Utilities -- "provides services to" --> API_Core
Common_Utilities -- "provides services to" --> DeepFace_Facade
Common_Utilities -- "provides services to" --> Streaming_Module
Models -- "are used by" --> DeepFace_Facade
```
[](https://github.com/CodeBoarding/GeneratedOnBoardings)[](https://www.codeboarding.org/demo)[](mailto:contact@codeboarding.org)
## Component Details
The `External Integration Layer` is a crucial component that acts as the primary interface between the DeepFace library and external applications or systems. It is designed to expose DeepFace's powerful facial analysis capabilities through well-defined interaction patterns, specifically a RESTful API and a real-time streaming module. This layer is fundamental because it enables DeepFace to be integrated into a wide array of applications, such as web services, mobile applications, or live video surveillance systems, without requiring direct Python code interaction from the external system.
### API Core
This component is responsible for handling all REST API interactions. It defines the various endpoints that external systems can call to access DeepFace functionalities (e.g., face verification, analysis, detection). It manages the parsing of incoming HTTP requests, validates the input data, orchestrates the calls to the underlying DeepFace functionalities, and formats the responses before sending them back to the client. It essentially translates HTTP requests into DeepFace operations and vice-versa.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/api/src/api.py#L1-L1" target="_blank" rel="noopener noreferrer">`deepface.api.src.api` (1:1)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/api/src/app.py#L1-L1" target="_blank" rel="noopener noreferrer">`deepface.api.src.app` (1:1)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/api/src/modules/core/routes.py#L1-L1" target="_blank" rel="noopener noreferrer">`deepface.api.src.modules.core.routes` (1:1)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/api/src/modules/core/service.py#L1-L1" target="_blank" rel="noopener noreferrer">`deepface.api.src.modules.core.service` (1:1)</a>
### Streaming Module
This component specializes in processing real-time video streams for continuous facial analysis. It handles the ingestion of video frames, applies DeepFace's face detection, recognition, and demography analysis algorithms to each frame, and can output the results in a continuous manner. This is essential for applications requiring live monitoring or interactive facial analysis.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/modules/streaming.py#L1-L1" target="_blank" rel="noopener noreferrer">`deepface.modules.streaming` (1:1)</a>
### DeepFace Facade
This component serves as the central entry point and a simplified interface to the core DeepFace functionalities. It orchestrates calls to various internal DeepFace modules (e.g., for facial representation, verification, analysis, detection, and model management). It abstracts away the complexity of the underlying deep learning models and their specific implementations, providing a clean and consistent API for higher-level components like the `API Core` and `Streaming Module`.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/DeepFace.py#L1-L1" target="_blank" rel="noopener noreferrer">`deepface.DeepFace` (1:1)</a>
### Common Utilities
This component provides a collection of shared utility functions and helper modules that are utilized across various parts of the DeepFace project, including the `External Integration Layer`. Key functionalities include robust logging for debugging and monitoring, and efficient image handling (loading, preprocessing, manipulation) which is critical for any image-based deep learning application.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/logger.py#L1-L1" target="_blank" rel="noopener noreferrer">`deepface.commons.logger` (1:1)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/image_utils.py#L1-L1" target="_blank" rel="noopener noreferrer">`deepface.commons.image_utils` (1:1)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/package_utils.py#L1-L1" target="_blank" rel="noopener noreferrer">`deepface.commons.package_utils` (1:1)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/folder_utils.py#L1-L1" target="_blank" rel="noopener noreferrer">`deepface.commons.folder_utils` (1:1)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/weight_utils.py#L1-L1" target="_blank" rel="noopener noreferrer">`deepface.commons.weight_utils` (1:1)</a>
### Models
This component is responsible for defining, loading, and managing the various deep learning models used by DeepFace for its core tasks, such as facial recognition, face detection, and demography analysis (age, gender, emotion, race). It handles the instantiation and potentially caching of these models to optimize performance.
**Related Classes/Methods**:
- `deepface.models.demography` (1:1)
- `deepface.models.face_detection` (1:1)
- `deepface.models.facial_recognition` (1:1)
- `deepface.models.spoofing` (1:1)
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)
================================================
FILE: .codeboarding/Facial_Analysis_Engine.md
================================================
```mermaid
graph LR
FaceDetection["FaceDetection"]
```
[](https://github.com/CodeBoarding/GeneratedOnBoardings)[](https://www.codeboarding.org/demo)[](mailto:contact@codeboarding.org)
## Component Details
Initial analysis of the deepface library, focusing on the detection module. Further analysis is needed to identify more components and their relationships across other modules like demography, modeling, and recognition. The current focus is on understanding the core functionalities within detection.py and how they contribute to the overall face analysis process. Future steps will involve analyzing other modules and establishing relationships between them to build a comprehensive understanding of the library's architecture and data flow. The 'referenced_source_code' for 'detect_faces' and 'extract_faces' is a placeholder as the exact line numbers are not yet known without the file content.
### FaceDetection
Handles face detection functionalities.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/modules/detection.py#L191-L267" target="_blank" rel="noopener noreferrer">`deepface.modules.detection.detect_faces` (191:267)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/modules/detection.py#L20-L188" target="_blank" rel="noopener noreferrer">`deepface.modules.detection.extract_faces` (20:188)</a>
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)
================================================
FILE: .codeboarding/Model_Management_System.md
================================================
```mermaid
graph LR
deepface_modules_modeling["deepface.modules.modeling"]
deepface_commons_weight_utils["deepface.commons.weight_utils"]
deepface_models_Demography["deepface.models.Demography"]
deepface_models_Detector["deepface.models.Detector"]
deepface_models_FacialRecognition["deepface.models.FacialRecognition"]
deepface_models_spoofing_FasNet["deepface.models.spoofing.FasNet"]
deepface_models_spoofing_FasNetBackbone["deepface.models.spoofing.FasNetBackbone"]
deepface_modules_modeling -- "loads" --> deepface_models_Demography
deepface_modules_modeling -- "loads" --> deepface_models_Detector
deepface_modules_modeling -- "loads" --> deepface_models_FacialRecognition
deepface_modules_modeling -- "loads" --> deepface_models_spoofing_FasNet
deepface_models_spoofing_FasNet -- "downloads weights via" --> deepface_commons_weight_utils
deepface_models_spoofing_FasNet -- "builds upon" --> deepface_models_spoofing_FasNetBackbone
```
[](https://github.com/CodeBoarding/GeneratedOnBoardings)[](https://www.codeboarding.org/demo)[](mailto:contact@codeboarding.org)
## Component Details
The Model Management System in DeepFace is crucial for handling the diverse range of deep learning models used for facial recognition, detection, demography, and anti-spoofing. It provides a unified and efficient way to load, manage, and utilize these models, abstracting away the underlying complexities of different backends and ensuring pre-trained weights are readily available.
### deepface.modules.modeling
This module acts as the central orchestrator for the Model Management System. Its primary function, `build_model`, is responsible for dynamically loading and caching various deep learning models (facial recognition, detection, demography, anti-spoofing) based on the requested task and model name. It ensures that models are loaded efficiently, often employing a singleton pattern to reuse already initialized models, thereby providing a unified interface for the rest of the DeepFace system to access pre-trained models.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/modules/modeling.py#L32-L104" target="_blank" rel="noopener noreferrer">`deepface.modules.modeling:build_model` (32:104)</a>
### deepface.commons.weight_utils
This utility module is vital for managing pre-trained model weights. Its core function, `download_weights_if_necessary`, handles the downloading, caching, and verification of model weights from external URLs. It supports various compression types and ensures that the necessary model files are available locally before models are loaded, directly addressing the system's need for efficient weight management and utilization.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/weight_utils.py#L27-L76" target="_blank" rel="noopener noreferrer">`deepface.commons.weight_utils:download_weights_if_necessary` (27:76)</a>
### deepface.models.Demography
This is an abstract base class that defines the common interface and structure for all demography-related models (e.g., age, gender, emotion, race prediction) within DeepFace. It specifies methods like `predict` and internal preprocessing utilities, ensuring a consistent API for demography models.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/models/Demography.py#L20-L21" target="_blank" rel="noopener noreferrer">`deepface.models.Demography:predict` (20:21)</a>
### deepface.models.Detector
This abstract base class defines the common interface and structure for all face detection models (e.g., OpenCV, MTCNN, RetinaFace) within DeepFace. It specifies the `detect_faces` method, which is crucial for locating facial areas in images before further analysis.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/models/Detector.py#L11-L27" target="_blank" rel="noopener noreferrer">`deepface.models.Detector:detect_faces` (11:27)</a>
### deepface.models.FacialRecognition
This abstract base class defines the common interface and structure for all facial recognition models (e.g., VGG-Face, FaceNet, ArcFace) within DeepFace. It specifies the `forward` method for generating facial embeddings, which are central to identity verification and recognition tasks.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/models/FacialRecognition.py#L21-L47" target="_blank" rel="noopener noreferrer">`deepface.models.FacialRecognition:forward` (21:47)</a>
### deepface.models.spoofing.FasNet
This class represents a concrete implementation of an anti-spoofing model, specifically the Mini Face Anti Spoofing Net. It demonstrates how specific deep learning models are structured, initialized, and integrated into the DeepFace system, including the loading of its specific pre-trained weights and performing anti-spoofing analysis.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/models/spoofing/FasNet.py#L1-L1" target="_blank" rel="noopener noreferrer">`deepface.models.spoofing.FasNet` (1:1)</a>
### deepface.models.spoofing.FasNetBackbone
This module defines the core neural network architectures, such as `MiniFASNet`, that serve as the backbone for anti-spoofing models like `FasNet`. It encapsulates the complex convolutional layers, depth-wise separable convolutions, and residual blocks that form the deep learning model's structure.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/models/spoofing/FasNetBackbone.py#L356-L465" target="_blank" rel="noopener noreferrer">`deepface.models.spoofing.FasNetBackbone:MiniFASNet` (356:465)</a>
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)
================================================
FILE: .codeboarding/Utility_Infrastructure_Layer.md
================================================
```mermaid
graph LR
Utility_Infrastructure_Layer["Utility & Infrastructure Layer"]
API_Core -- "uses" --> Utility_Infrastructure_Layer
DeepFace_Facade -- "uses" --> Utility_Infrastructure_Layer
Streaming_Module -- "uses" --> Utility_Infrastructure_Layer
Models -- "uses" --> Utility_Infrastructure_Layer
click Utility_Infrastructure_Layer href "https://github.com/serengil/deepface/blob/main/.codeboarding//Utility_Infrastructure_Layer.md" "Details"
```
[](https://github.com/CodeBoarding/GeneratedOnBoardings)[](https://www.codeboarding.org/demo)[](mailto:contact@codeboarding.org)
## Component Details
Analysis of the Utility & Infrastructure Layer within the DeepFace library, detailing its components, purpose, and relationships with other key modules. This layer provides foundational services like image handling, logging, file system operations, and model weight management, which are crucial for the entire DeepFace library's functionality and efficiency. It serves as a bedrock for components such as API Core, DeepFace Facade, Streaming Module, and Models, ensuring reusability and consistency across the application by centralizing common, non-domain-specific functionalities.
### Utility & Infrastructure Layer
This foundational component provides essential helper functions and cross-cutting concerns used throughout the entire DeepFace library. It includes utilities for image loading and manipulation, centralized logging, file system operations, package-related utilities, constants, and crucially, utilities for managing and loading model weights. It ensures consistency and efficiency for common, non-domain-specific tasks.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/constant.py#L0-L0" target="_blank" rel="noopener noreferrer">`constant` (0:0)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/folder_utils.py#L0-L0" target="_blank" rel="noopener noreferrer">`folder_utils` (0:0)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/image_utils.py#L0-L0" target="_blank" rel="noopener noreferrer">`image_utils` (0:0)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/logger.py#L0-L0" target="_blank" rel="noopener noreferrer">`logger` (0:0)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/package_utils.py#L0-L0" target="_blank" rel="noopener noreferrer">`package_utils` (0:0)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/weight_utils.py#L0-L0" target="_blank" rel="noopener noreferrer">`weight_utils` (0:0)</a>
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)
================================================
FILE: .codeboarding/on_boarding.md
================================================
```mermaid
graph LR
DeepFace_Public_API["DeepFace Public API"]
Model_Management_System["Model Management System"]
Facial_Analysis_Engine["Facial Analysis Engine"]
Utility_Infrastructure_Layer["Utility & Infrastructure Layer"]
External_Integration_Layer["External Integration Layer"]
DeepFace_Public_API -- "Delegates to" --> Facial_Analysis_Engine
DeepFace_Public_API -- "Delegates to" --> Model_Management_System
Model_Management_System -- "Provides models to" --> Facial_Analysis_Engine
Model_Management_System -- "Uses" --> Utility_Infrastructure_Layer
Facial_Analysis_Engine -- "Requests models from" --> Model_Management_System
Facial_Analysis_Engine -- "Uses" --> Utility_Infrastructure_Layer
Utility_Infrastructure_Layer -- "Supports" --> DeepFace_Public_API
Utility_Infrastructure_Layer -- "Supports" --> Model_Management_System
Utility_Infrastructure_Layer -- "Supports" --> Facial_Analysis_Engine
Utility_Infrastructure_Layer -- "Supports" --> External_Integration_Layer
External_Integration_Layer -- "Invokes" --> DeepFace_Public_API
External_Integration_Layer -- "Uses" --> Utility_Infrastructure_Layer
click Model_Management_System href "https://github.com/serengil/deepface/blob/main/.codeboarding//Model_Management_System.md" "Details"
click Facial_Analysis_Engine href "https://github.com/serengil/deepface/blob/main/.codeboarding//Facial_Analysis_Engine.md" "Details"
click Utility_Infrastructure_Layer href "https://github.com/serengil/deepface/blob/main/.codeboarding//Utility_Infrastructure_Layer.md" "Details"
click External_Integration_Layer href "https://github.com/serengil/deepface/blob/main/.codeboarding//External_Integration_Layer.md" "Details"
```
[](https://github.com/CodeBoarding/GeneratedOnBoardings)[](https://www.codeboarding.org/demo)[](mailto:contact@codeboarding.org)
## Component Details
Final Architecture Analysis for `deepface`
Based on the Control Flow Graph (CFG) and Source Code analysis, the `deepface` project's architecture can be effectively summarized into five fundamental components. These components are chosen for their distinct responsibilities, high cohesion, and critical roles in the overall system's operation.
Why these components are fundamental:
These five components represent a clear and logical separation of concerns within the `deepface` project, making the architecture modular, maintainable, and scalable.
1. **DeepFace Public API**: This is fundamental because it defines the user experience and the primary interaction model with the library. It abstracts internal complexities, providing a clean and stable interface for developers.
2. **Model Management System**: DeepFace is built upon deep learning models. This component is absolutely critical for handling the acquisition, loading, and efficient management of these models, which are the core intellectual property and functional backbone of the library. Without it, every analysis task would need to manage its own model lifecycle.
3. **Facial Analysis Engine**: This is the "brain" of DeepFace, where all the specialized algorithms for face detection, recognition, and attribute analysis reside. It's fundamental because it encapsulates the core domain logic and the complex computational tasks that define the library's purpose.
4. **Utility & Infrastructure Layer**: This component provides essential cross-cutting services that are required by almost every other part of the system (e.g., logging, image handling). It's fundamental for ensuring consistency, reducing code duplication, and providing a robust foundation for the entire application.
5. **External Integration Layer**: This component is crucial for the broader applicability and deployability of DeepFace. By providing a REST API and streaming capabilities, it allows the library to be consumed by various applications and systems beyond direct Python scripting, making it a versatile and production-ready solution.
Together, these components form a cohesive and well-structured architecture that effectively manages the complexities of deep learning-based facial analysis, from model management to user interaction and external integration.
### DeepFace Public API
This component serves as the primary public interface and orchestration layer for the entire DeepFace library. It provides high-level, user-friendly functions (`verify`, `analyze`, `represent`, `find`, `stream`, `extract_faces`, `build_model`) that abstract the underlying complexities of facial analysis. It acts as a facade, delegating tasks to specialized internal modules and ensuring a clean, consistent API for consumers.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/DeepFace.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.DeepFace` (1:1000)</a>
### Model Management System
This component is responsible for the lifecycle management of all deep learning models used by DeepFace. This includes dynamic loading, building, caching, and ensuring that pre-trained model weights are correctly downloaded and utilized. It abstracts the complexities of various model backends (e.g., TensorFlow, Keras) and provides a unified interface for accessing different types of models (facial recognition, detection, demography, anti-spoofing).
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/modules/modeling.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.modules.modeling` (1:1000)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/weight_utils.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.commons.weight_utils` (1:1000)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/models/Demography.py#L15-L67" target="_blank" rel="noopener noreferrer">`deepface.models.Demography` (15:67)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/models/Detector.py#L9-L27" target="_blank" rel="noopener noreferrer">`deepface.models.Detector` (9:27)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/models/FacialRecognition.py#L15-L47" target="_blank" rel="noopener noreferrer">`deepface.models.FacialRecognition` (15:47)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/models/spoofing/FasNet.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.models.spoofing.FasNet` (1:1000)</a>
### Facial Analysis Engine
This is the algorithmic core of DeepFace, containing the specialized modules that perform the actual facial analysis tasks. Each module within this component handles a specific aspect: face detection, facial representation (embedding generation), identity verification, identity recognition, demographic attribute prediction (age, gender, emotion, race), and image preprocessing (alignment, normalization). It encapsulates the complex machine learning logic.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/modules/detection.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.modules.detection` (1:1000)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/modules/representation.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.modules.representation` (1:1000)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/modules/verification.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.modules.verification` (1:1000)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/modules/recognition.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.modules.recognition` (1:1000)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/modules/demography.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.modules.demography` (1:1000)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/modules/preprocessing.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.modules.preprocessing` (1:1000)</a>
### Utility & Infrastructure Layer
This foundational component provides essential helper functions and cross-cutting concerns used throughout the entire DeepFace library. It includes utilities for image loading and manipulation, centralized logging, file system operations, package-related utilities, and constants. It ensures consistency and efficiency for common, non-domain-specific tasks.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/image_utils.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.commons.image_utils` (1:1000)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/logger.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.commons.logger` (1:1000)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/folder_utils.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.commons.folder_utils` (1:1000)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/package_utils.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.commons.package_utils` (1:1000)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/commons/constant.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.commons.constant` (1:1000)</a>
### External Integration Layer
This component is responsible for exposing DeepFace functionalities to external systems and handling specific interaction patterns beyond direct Python function calls. It primarily includes the REST API, which defines endpoints, parses incoming HTTP requests, and formats responses, and the streaming module, which manages real-time facial analysis from video feeds. It acts as the bridge for integrating DeepFace into web applications or live video processing pipelines.
**Related Classes/Methods**:
- <a href="https://github.com/serengil/deepface/blob/master/deepface/api/src/api.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.api.src.api` (1:1000)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/api/src/app.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.api.src.app` (1:1000)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/api/src/modules/core/routes.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.api.src.modules.core.routes` (1:1000)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/api/src/modules/core/service.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.api.src.modules.core.service` (1:1000)</a>
- <a href="https://github.com/serengil/deepface/blob/master/deepface/modules/streaming.py#L1-L1000" target="_blank" rel="noopener noreferrer">`deepface.modules.streaming` (1:1000)</a>
### [FAQ](https://github.com/CodeBoarding/GeneratedOnBoardings/tree/main?tab=readme-ov-file#faq)
================================================
FILE: .gitattributes
================================================
*.ipynb linguist-vendored
================================================
FILE: .github/CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at serengil@gmail.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
================================================
FILE: .github/FUNDING.yml
================================================
github: serengil
patreon: serengil
buy_me_a_coffee: serengil
================================================
FILE: .github/ISSUE_TEMPLATE/01-report-bug.yaml
================================================
name: '🐛 Report a bug'
description: 'Use this template to report DeepFace related issues'
title: '[BUG]: <short description of the issue>'
labels:
- bug
body:
- type: checkboxes
id: preliminary-checks
attributes:
label: Before You Report a Bug, Please Confirm You Have Done The Following...
description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!
options:
- label: I have updated to the latest version of the packages.
required: true
- label: I have searched for both [existing issues](https://github.com/serengil/deepface/issues) and [closed issues](https://github.com/serengil/deepface/issues?q=is%3Aissue+is%3Aclosed) and found none that matched my issue.
required: true
- type: input
id: deepface-version
attributes:
label: DeepFace's version
description: |
Please provide your deepface version with calling the command `python -c "import deepface; print(deepface.__version__)"` in your terminal
placeholder: e.g. v0.0.90
validations:
required: true
- type: input
id: python-version
attributes:
label: Python version
description: |
Please provide your python programming language's version with calling `python --version` in your terminal
placeholder: e.g. 3.8.5
validations:
required: true
- type: input
id: os
attributes:
label: Operating System
description: |
Please provide your operation system's details
placeholder: e.g. Windows 10 or Ubuntu 20.04
validations:
required: false
- type: textarea
id: dependencies
attributes:
label: Dependencies
description: |
Please provide python dependencies with calling `pip freeze` in your terminal, in particular tensorflow's and keras' versions
validations:
required: true
- type: textarea
id: repro-code
attributes:
label: Reproducible example
description: A ***minimal*** code sample which reproduces the issue
render: Python
validations:
required: true
- type: textarea
id: exception-message
attributes:
label: Relevant Log Output
description: Please share the exception message from your terminal if your program is failing
validations:
required: false
- type: textarea
id: expected
attributes:
label: Expected Result
description: What did you expect to happen?
validations:
required: false
- type: textarea
id: actual
attributes:
label: What happened instead?
description: What actually happened?
validations:
required: false
- type: textarea
id: additional
attributes:
label: Additional Info
description: |
Any additional info you'd like to provide.
================================================
FILE: .github/ISSUE_TEMPLATE/02-request-feature.yaml
================================================
name: '✨ Request a New Feature'
description: 'Use this template to propose a new feature'
title: '[FEATURE]: <a short description of my proposal>'
labels:
- 'enhancement'
body:
- type: textarea
id: description
attributes:
label: Description
description: Explain what your proposed feature would do and why this is useful.
validations:
required: true
- type: textarea
id: additional
attributes:
label: Additional Info
description: Any additional info you'd like to provide.
================================================
FILE: .github/ISSUE_TEMPLATE/03-documentation.yaml
================================================
name: '📝 Documentation'
description: 'Use this template to add or improve docs'
title: '[DOC]: <a short description of my proposal>'
labels:
- documentation
body:
- type: textarea
attributes:
label: Suggested Changes
description: What would you like to see happen in the docs?
validations:
required: true
- type: textarea
id: additional
attributes:
label: Additional Info
description: |
Any additional info you'd like to provide.
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: Ask a question on StackOverflow
about: If you just want to ask a question, consider asking it on StackOverflow!
url: https://stackoverflow.com/search?tab=newest&q=deepface
================================================
FILE: .github/pull_request_template.md
================================================
## Tickets
Resolves https://github.com/serengil/deepface/issues/XXX
### What has been done
With this PR, ...
## How to test
```shell
make lint && make test
```
================================================
FILE: .github/workflows/tests.yml
================================================
name: Tests
on:
push:
paths:
- '.github/workflows/tests.yml'
- 'deepface/**'
- 'tests/**'
- 'api/**'
- 'requirements.txt'
- '.gitignore'
- 'setup.py'
pull_request:
paths:
- '.github/workflows/tests.yml'
- 'deepface/**'
- 'tests/**'
- 'api/**'
- 'requirements.txt'
- '.gitignore'
- 'setup.py'
jobs:
linting:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint==2.15.10
pip install black
pip install .
- name: Lint with pylint
run: |
pylint --fail-under=10 deepface/
type-check:
needs: linting
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mypy==1.14.1
pip install .
- name: Type checking with MyPy
run: |
mypy deepface/
unit-tests:
needs: type-check
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
# sending files in form data throwing error in flask 3 while running tests
pip install Werkzeug==2.0.2 flask==2.0.2
pip install .
- name: Test with pytest
run: |
cd tests/unit
python -m pytest . -s --disable-warnings
================================================
FILE: .gitignore
================================================
**/__pycache__
**/.DS_Store
build/
dist/
Pipfile
Pipfile.lock
.mypy_cache/
.idea/
deepface.egg-info/
tests/unit/dataset/*.pkl
tests/unit/*.ipynb
tests/unit/*.csv
*.pyc
**/.coverage
**/.coverage.*
benchmarks/results
benchmarks/outputs
benchmarks/dataset
benchmarks/lfwe
venv
**/.env
docker/weaviate_data
================================================
FILE: .pylintrc
================================================
[MAIN]
# Analyse import fallback blocks. This can be used to support both Python 2 and
# 3 compatible code, which means that the block might have code that exists
# only in one or another interpreter, leading to false positives when analysed.
analyse-fallback-blocks=no
# Load and enable all available extensions. Use --list-extensions to see a list
# all available extensions.
#enable-all-extensions=
# In error mode, messages with a category besides ERROR or FATAL are
# suppressed, and no reports are done by default. Error mode is compatible with
# disabling specific errors.
#errors-only=
# Always return a 0 (non-error) status code, even if lint errors are found.
# This is primarily useful in continuous integration scripts.
#exit-zero=
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code.
extension-pkg-allow-list=
# A comma-separated list of package or module names from where C extensions may
# be loaded. Extensions are loading into the active Python interpreter and may
# run arbitrary code. (This is an alternative name to extension-pkg-allow-list
# for backward compatibility.)
extension-pkg-whitelist=
# Return non-zero exit code if any of these messages/categories are detected,
# even if score is above --fail-under value. Syntax same as enable. Messages
# specified are enabled, while categories only check already-enabled messages.
fail-on=
# Specify a score threshold under which the program will exit with error.
fail-under=10
# Interpret the stdin as a python script, whose filename needs to be passed as
# the module_or_package argument.
#from-stdin=
# Files or directories to be skipped. They should be base names, not paths.
ignore=CVS
# Add files or directories matching the regular expressions patterns to the
# ignore-list. The regex matches against paths and can be in Posix or Windows
# format. Because '\' represents the directory delimiter on Windows systems, it
# can't be used as an escape character.
ignore-paths=
# Files or directories matching the regular expression patterns are skipped.
# The regex matches against base names, not paths. The default value ignores
# Emacs file locks
ignore-patterns=^\.#
# List of module names for which member attributes should not be checked
# (useful for modules/projects where namespaces are manipulated during runtime
# and thus existing member attributes cannot be deduced by static analysis). It
# supports qualified module names, as well as Unix pattern matching.
ignored-modules=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
# number of processors available to use, and will cap the count on Windows to
# avoid hangs.
jobs=1
# Control the amount of potential inferred values when inferring a single
# object. This can help the performance when dealing with large functions or
# complex, nested conditions.
limit-inference-results=100
# List of plugins (as comma separated values of python module names) to load,
# usually to register additional checkers.
load-plugins=
# Pickle collected data for later comparisons.
persistent=yes
# Minimum Python version to use for version dependent checks. Will default to
# the version used to run pylint.
py-version=3.9
# Discover python modules and packages in the file system subtree.
recursive=no
# When enabled, pylint would attempt to guess common misconfiguration and emit
# user-friendly hints instead of false-positive error messages.
suggestion-mode=yes
# Allow loading of arbitrary C extensions. Extensions are imported into the
# active Python interpreter and may run arbitrary code.
unsafe-load-any-extension=no
# In verbose mode, extra non-checker-related info will be displayed.
#verbose=
[BASIC]
# Naming style matching correct argument names.
argument-naming-style=snake_case
# Regular expression matching correct argument names. Overrides argument-
# naming-style. If left empty, argument names will be checked with the set
# naming style.
#argument-rgx=
# Naming style matching correct attribute names.
attr-naming-style=snake_case
# Regular expression matching correct attribute names. Overrides attr-naming-
# style. If left empty, attribute names will be checked with the set naming
# style.
#attr-rgx=
# Bad variable names which should always be refused, separated by a comma.
bad-names=foo,
bar,
baz,
toto,
tutu,
tata
# Bad variable names regexes, separated by a comma. If names match any regex,
# they will always be refused
bad-names-rgxs=
# Naming style matching correct class attribute names.
class-attribute-naming-style=any
# Regular expression matching correct class attribute names. Overrides class-
# attribute-naming-style. If left empty, class attribute names will be checked
# with the set naming style.
#class-attribute-rgx=
# Naming style matching correct class constant names.
class-const-naming-style=UPPER_CASE
# Regular expression matching correct class constant names. Overrides class-
# const-naming-style. If left empty, class constant names will be checked with
# the set naming style.
#class-const-rgx=
# Naming style matching correct class names.
class-naming-style=PascalCase
# Regular expression matching correct class names. Overrides class-naming-
# style. If left empty, class names will be checked with the set naming style.
#class-rgx=
# Naming style matching correct constant names.
const-naming-style=UPPER_CASE
# Regular expression matching correct constant names. Overrides const-naming-
# style. If left empty, constant names will be checked with the set naming
# style.
#const-rgx=
# Minimum line length for functions/classes that require docstrings, shorter
# ones are exempt.
docstring-min-length=-1
# Naming style matching correct function names.
function-naming-style=snake_case
# Regular expression matching correct function names. Overrides function-
# naming-style. If left empty, function names will be checked with the set
# naming style.
#function-rgx=
# Good variable names which should always be accepted, separated by a comma.
good-names=i,
j,
k,
ex,
Run,
_
# Good variable names regexes, separated by a comma. If names match any regex,
# they will always be accepted
good-names-rgxs=
# Include a hint for the correct naming format with invalid-name.
include-naming-hint=no
# Naming style matching correct inline iteration names.
inlinevar-naming-style=any
# Regular expression matching correct inline iteration names. Overrides
# inlinevar-naming-style. If left empty, inline iteration names will be checked
# with the set naming style.
#inlinevar-rgx=
# Naming style matching correct method names.
method-naming-style=snake_case
# Regular expression matching correct method names. Overrides method-naming-
# style. If left empty, method names will be checked with the set naming style.
#method-rgx=
# Naming style matching correct module names.
module-naming-style=snake_case
# Regular expression matching correct module names. Overrides module-naming-
# style. If left empty, module names will be checked with the set naming style.
#module-rgx=
# Colon-delimited sets of names that determine each other's naming style when
# the name regexes allow several styles.
name-group=
# Regular expression which should only match function or class names that do
# not require a docstring.
no-docstring-rgx=^_
# List of decorators that produce properties, such as abc.abstractproperty. Add
# to this list to register other decorators that produce valid properties.
# These decorators are taken in consideration only for invalid-name.
property-classes=abc.abstractproperty
# Regular expression matching correct type variable names. If left empty, type
# variable names will be checked with the set naming style.
#typevar-rgx=
# Naming style matching correct variable names.
variable-naming-style=snake_case
# Regular expression matching correct variable names. Overrides variable-
# naming-style. If left empty, variable names will be checked with the set
# naming style.
#variable-rgx=
[CLASSES]
# Warn about protected attribute access inside special methods
check-protected-access-in-special-methods=no
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,
__new__,
setUp,
__post_init__
# List of member names, which should be excluded from the protected access
# warning.
exclude-protected=_asdict,
_fields,
_replace,
_source,
_make
# List of valid names for the first argument in a class method.
valid-classmethod-first-arg=cls
# List of valid names for the first argument in a metaclass class method.
valid-metaclass-classmethod-first-arg=cls
[DESIGN]
# List of regular expressions of class ancestor names to ignore when counting
# public methods (see R0903)
exclude-too-few-public-methods=
# List of qualified class names to ignore when counting class parents (see
# R0901)
ignored-parents=
# Maximum number of arguments for function / method.
max-args=5
# Maximum number of attributes for a class (see R0902).
max-attributes=7
# Maximum number of boolean expressions in an if statement (see R0916).
max-bool-expr=5
# Maximum number of branch for function / method body.
max-branches=12
# Maximum number of locals for function / method body.
max-locals=15
# Maximum number of parents for a class (see R0901).
max-parents=7
# Maximum number of public methods for a class (see R0904).
max-public-methods=20
# Maximum number of return / yield for function / method body.
max-returns=6
# Maximum number of statements in function / method body.
max-statements=50
# Minimum number of public methods for a class (see R0903).
min-public-methods=2
[EXCEPTIONS]
# Exceptions that will emit a warning when caught.
overgeneral-exceptions=BaseException,
Exception
[FORMAT]
# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
expected-line-ending-format=
# Regexp for a line that is allowed to be longer than the limit.
ignore-long-lines=^\s*(# )?<?https?://\S+>?$
# Number of spaces of indent required inside a hanging or continued line.
indent-after-paren=4
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
# tab).
indent-string=' '
# Maximum number of characters on a single line.
max-line-length=100
# Maximum number of lines in a module.
max-module-lines=1000
# Allow the body of a class to be on the same line as the declaration if body
# contains single statement.
single-line-class-stmt=no
# Allow the body of an if to be on the same line as the test if there is no
# else.
single-line-if-stmt=no
[IMPORTS]
# List of modules that can be imported at any level, not just the top level
# one.
allow-any-import-level=
# Allow wildcard imports from modules that define __all__.
allow-wildcard-with-all=no
# Deprecated modules which should not be used, separated by a comma.
deprecated-modules=
# Output a graph (.gv or any supported image format) of external dependencies
# to the given file (report RP0402 must not be disabled).
ext-import-graph=
# Output a graph (.gv or any supported image format) of all (i.e. internal and
# external) dependencies to the given file (report RP0402 must not be
# disabled).
import-graph=
# Output a graph (.gv or any supported image format) of internal dependencies
# to the given file (report RP0402 must not be disabled).
int-import-graph=
# Force import order to recognize a module as part of the standard
# compatibility libraries.
known-standard-library=
# Force import order to recognize a module as part of a third party library.
known-third-party=enchant
# Couples of modules and preferred modules, separated by a comma.
preferred-modules=
[LOGGING]
# The type of string formatting that logging methods do. `old` means using %
# formatting, `new` is for `{}` formatting.
logging-format-style=old
# Logging modules to check that the string format arguments are in logging
# function parameter format.
logging-modules=logging
[MESSAGES CONTROL]
# Only show warnings with the listed confidence levels. Leave empty to show
# all. Valid levels: HIGH, CONTROL_FLOW, INFERENCE, INFERENCE_FAILURE,
# UNDEFINED.
confidence=HIGH,
CONTROL_FLOW,
INFERENCE,
INFERENCE_FAILURE,
UNDEFINED
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifiers separated by comma (,) or put this
# option multiple times (only on the command line, not in the configuration
# file where it should appear only once). You can also use "--disable=all" to
# disable everything first and then re-enable specific checks. For example, if
# you want to run only the similarities checker, you can use "--disable=all
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use "--disable=all --enable=classes
# --disable=W".
disable=raw-checker-failed,
bad-inline-option,
locally-disabled,
file-ignored,
suppressed-message,
useless-suppression,
deprecated-pragma,
use-symbolic-message-instead,
import-error,
invalid-name,
missing-module-docstring,
missing-function-docstring,
missing-class-docstring,
too-many-arguments,
too-many-locals,
too-many-branches,
too-many-statements,
global-variable-undefined,
import-outside-toplevel,
singleton-comparison,
too-many-lines,
duplicate-code,
bare-except,
cyclic-import,
global-statement,
no-member,
no-name-in-module,
unrecognized-option,
consider-using-dict-items,
consider-iterating-dictionary,
unexpected-keyword-arg,
unknown-option-value
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once). See also the "--disable" option for examples.
enable=c-extension-no-member
[METHOD_ARGS]
# List of qualified names (i.e., library.method) which require a timeout
# parameter e.g. 'requests.api.get,requests.api.post'
timeout-methods=requests.api.delete,requests.api.get,requests.api.head,requests.api.options,requests.api.patch,requests.api.post,requests.api.put,requests.api.request
[MISCELLANEOUS]
# List of note tags to take in consideration, separated by a comma.
notes=FIXME,
XXX,
TODO
# Regular expression of note tags to take in consideration.
notes-rgx=
[REFACTORING]
# Maximum number of nested blocks for function / method body
max-nested-blocks=5
# Complete name of functions that never returns. When checking for
# inconsistent-return-statements if a never returning function is called then
# it will be considered as an explicit return statement and no message will be
# printed.
never-returning-functions=sys.exit,argparse.parse_error
[REPORTS]
# Python expression which should return a score less than or equal to 10. You
# have access to the variables 'fatal', 'error', 'warning', 'refactor',
# 'convention', and 'info' which contain the number of messages in each
# category, as well as 'statement' which is the total number of statements
# analyzed. This score is used by the global evaluation report (RP0004).
evaluation=max(0, 0 if fatal else 10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10))
# Template used to display messages. This is a python new-style format string
# used to format the message information. See doc for all details.
msg-template=
# Set the output format. Available formats are text, parseable, colorized, json
# and msvs (visual studio). You can also give a reporter class, e.g.
# mypackage.mymodule.MyReporterClass.
#output-format=
# Tells whether to display a full report or only the messages.
reports=no
# Activate the evaluation score.
score=yes
[SIMILARITIES]
# Comments are removed from the similarity computation
ignore-comments=yes
# Docstrings are removed from the similarity computation
ignore-docstrings=yes
# Imports are removed from the similarity computation
ignore-imports=yes
# Signatures are removed from the similarity computation
ignore-signatures=yes
# Minimum lines number of a similarity.
min-similarity-lines=4
[SPELLING]
# Limits count of emitted suggestions for spelling mistakes.
max-spelling-suggestions=4
# Spelling dictionary name. Available dictionaries: none. To make it work,
# install the 'python-enchant' package.
spelling-dict=
# List of comma separated words that should be considered directives if they
# appear at the beginning of a comment and should not be checked.
spelling-ignore-comment-directives=fmt: on,fmt: off,noqa:,noqa,nosec,isort:skip,mypy:
# List of comma separated words that should not be checked.
spelling-ignore-words=
# A path to a file that contains the private dictionary; one word per line.
spelling-private-dict-file=
# Tells whether to store unknown words to the private dictionary (see the
# --spelling-private-dict-file option) instead of raising a message.
spelling-store-unknown-words=no
[STRING]
# This flag controls whether inconsistent-quotes generates a warning when the
# character used as a quote delimiter is used inconsistently within a module.
check-quote-consistency=no
# This flag controls whether the implicit-str-concat should generate a warning
# on implicit string concatenation in sequences defined over several lines.
check-str-concat-over-line-jumps=no
[TYPECHECK]
disable=unsubscriptable-object
# List of decorators that produce context managers, such as
# contextlib.contextmanager. Add to this list to register other decorators that
# produce valid context managers.
contextmanager-decorators=contextlib.contextmanager
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=
# Tells whether to warn about missing members when the owner of the attribute
# is inferred to be None.
ignore-none=yes
# This flag controls whether pylint should warn about no-member and similar
# checks whenever an opaque object is returned when inferring. The inference
# can return multiple potential results while evaluating a Python object, but
# some branches might not be evaluated, which results in partial inference. In
# that case, it might be useful to still emit no-member and other checks for
# the rest of the inferred objects.
ignore-on-opaque-inference=yes
# List of symbolic message names to ignore for Mixin members.
ignored-checks-for-mixins=no-member,
not-async-context-manager,
not-context-manager,
attribute-defined-outside-init
# List of class names for which member attributes should not be checked (useful
# for classes with dynamically set attributes). This supports the use of
# qualified names.
ignored-classes=optparse.Values,thread._local,_thread._local,argparse.Namespace
# Show a hint with possible names when a member name was not found. The aspect
# of finding the hint is based on edit distance.
missing-member-hint=yes
# The minimum edit distance a name should have in order to be considered a
# similar match for a missing member name.
missing-member-hint-distance=1
# The total number of similar names that should be taken in consideration when
# showing a hint for a missing member.
missing-member-max-choices=1
# Regex pattern to define which classes are considered mixins.
mixin-class-rgx=.*[Mm]ixin
# List of decorators that change the signature of a decorated function.
signature-mutators=
[VARIABLES]
# List of additional names supposed to be defined in builtins. Remember that
# you should avoid defining new builtins when possible.
additional-builtins=
# Tells whether unused global variables should be treated as a violation.
allow-global-unused-variables=yes
# List of names allowed to shadow builtins
allowed-redefined-builtins=
# List of strings which can identify a callback function by name. A callback
# name must start or end with one of those strings.
callbacks=cb_,
_cb
# A regular expression matching the name of dummy variables (i.e. expected to
# not be used).
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_
# Argument names that match this expression will be ignored.
ignored-argument-names=_.*|^ignored_|^unused_
# Tells whether we should check for unused import in __init__ files.
init-import=no
# List of qualified module names which can have objects that can redefine
# builtins.
redefining-builtins-modules=six.moves,past.builtins,future.builtins,builtins,io
================================================
FILE: .vscode/settings.json
================================================
{
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.linting.pylintUseMinimalCheckers": false,
"editor.formatOnSave": true,
"editor.renderWhitespace": "all",
"files.autoSave": "afterDelay",
"python.analysis.typeCheckingMode": "basic",
"python.formatting.provider": "black",
"python.formatting.blackArgs": ["--line-length=100"],
"editor.fontWeight": "normal",
"python.analysis.extraPaths": [
"./deepface"
],
"black-formatter.args": [
"--line-length=100"
]
}
================================================
FILE: CITATION.cff
================================================
cff-version: 1.2.0
message: "Please cite the following publication if DeepFace helps your research."
title: "DeepFace: A Lightweight Face Recognition Framework for Python"
authors:
- family-names: Serengil
given-names: Sefik
version: 1.0.0
date-released: 2020-02-09
doi: 10.35378/gujs.1794891
url: https://github.com/serengil/deepface
type: software
preferred-citation:
type: article
title: "Boosted LightFace: A Hybrid DNN and GBM Model for Boosted Facial Recognition"
authors:
- family-names: Serengil
given-names: Sefik Ilkin
- family-names: Ozpinar
given-names: Alper
year: 2026
doi: 10.35378/gujs.1794891
url: https://dergipark.org.tr/en/pub/gujs/article/1794891
journal: "Gazi University Journal of Science"
volume: "39"
issue: "1"
start: "452"
end: "466"
publisher: "Gazi University"
================================================
FILE: Dockerfile
================================================
# base image
FROM python:3.8.12
LABEL org.opencontainers.image.source https://github.com/serengil/deepface
# -----------------------------------
# create required folder
RUN mkdir -p /app && chown -R 1001:0 /app
RUN mkdir /app/deepface
# -----------------------------------
# switch to application directory
WORKDIR /app
# -----------------------------------
# update image os
# Install system dependencies
RUN apt-get update && apt-get install -y \
ffmpeg \
libsm6 \
libxext6 \
libhdf5-dev \
&& rm -rf /var/lib/apt/lists/*
# -----------------------------------
# Copy required files from repo into image
COPY ./deepface /app/deepface
# even though we will use local requirements, this one is required to perform install deepface from source code
COPY ./requirements.txt /app/requirements.txt
COPY ./requirements_local /app/requirements_local.txt
COPY ./package_info.json /app/
COPY ./setup.py /app/
COPY ./README.md /app/
COPY ./entrypoint.sh /app/deepface/api/src/entrypoint.sh
# -----------------------------------
# if you plan to use a GPU, you should install the 'tensorflow-gpu' package
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org tensorflow-gpu
# if you plan to use face anti-spoofing, then activate this line
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org torch==2.1.2
# -----------------------------------
# install deepface from pypi release (might be out-of-date)
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org deepface
# -----------------------------------
# install dependencies - deepface with these dependency versions is working
RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org -r /app/requirements_local.txt
# install deepface from source code (always up-to-date)
RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org -e . --no-deps
# -----------------------------------
# some packages are optional in deepface. activate if your task depends on one.
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org cmake==3.24.1.1
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org dlib==19.20.0
# RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host=files.pythonhosted.org lightgbm==2.3.1
# -----------------------------------
# environment variables
ENV PYTHONUNBUFFERED=1
# -----------------------------------
# run the app (re-configure port if necessary)
WORKDIR /app/deepface/api/src
EXPOSE 5000
# CMD ["gunicorn", "--workers=1", "--timeout=3600", "--bind=0.0.0.0:5000", "app:create_app()"]
ENTRYPOINT [ "sh", "entrypoint.sh" ]
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2019 Sefik Ilkin Serengil
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: Makefile
================================================
test:
cd tests/unit && python -m pytest . -s --disable-warnings
integration-test:
cd tests/integration && python -m pytest . -s --disable-warnings
lint:
python -m pylint deepface/ --fail-under=10 && mypy deepface/
coverage:
pip install pytest-cov && cd tests/unit && python -m pytest --cov=deepface
================================================
FILE: README.md
================================================
# deepface
<div align="center">
[](https://pepy.tech/project/deepface)
[](https://github.com/serengil/deepface/stargazers)
[](https://hub.docker.com/r/serengil/deepface)
[](https://github.com/serengil/deepface/blob/master/LICENSE)
[](https://github.com/serengil/deepface/actions/workflows/tests.yml)
[](https://doi.org/10.35378/gujs.1794891)
[](https://sefiks.com)
[](https://www.youtube.com/@sefiks?sub_confirmation=1)
[](https://twitter.com/intent/user?screen_name=serengil)
[](https://www.patreon.com/serengil?repo=deepface)
[](https://github.com/sponsors/serengil)
[](https://buymeacoffee.com/serengil)
<!--
[](https://news.ycombinator.com/item?id=46608519)
-->
<div align="center">
<a href="https://trendshift.io/repositories/4227" target="_blank"><img src="https://trendshift.io/api/badge/repositories/4227" alt="serengil%2Fdeepface | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
</div>
</div>
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/deepface-icon-labeled.png" width="200" height="240"></p>
DeepFace is a lightweight [face recognition](https://sefiks.com/2018/08/06/deep-face-recognition-with-keras/) and facial attribute analysis ([age](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [gender](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [emotion](https://sefiks.com/2018/01/01/facial-expression-recognition-with-keras/) and [race](https://sefiks.com/2019/11/11/race-and-ethnicity-prediction-in-keras/)) framework for python. It is a hybrid face recognition framework wrapping **state-of-the-art** models: [`VGG-Face`](https://sefiks.com/2018/08/06/deep-face-recognition-with-keras/), [`FaceNet`](https://sefiks.com/2018/09/03/face-recognition-with-facenet-in-keras/), [`OpenFace`](https://sefiks.com/2019/07/21/face-recognition-with-openface-in-keras/), [`DeepFace`](https://sefiks.com/2020/02/17/face-recognition-with-facebook-deepface-in-keras/), [`DeepID`](https://sefiks.com/2020/06/16/face-recognition-with-deepid-in-keras/), [`ArcFace`](https://sefiks.com/2020/12/14/deep-face-recognition-with-arcface-in-keras-and-python/), [`Dlib`](https://sefiks.com/2020/07/11/face-recognition-with-dlib-in-python/), `SFace`, `GhostFaceNet`, `Buffalo_L`.
[A modern face recognition pipeline](https://sefiks.com/2020/05/01/a-gentle-introduction-to-face-recognition-in-deep-learning/) consists of 5 common stages: [detect](https://sefiks.com/2020/08/25/deep-face-detection-with-opencv-in-python/), [align](https://sefiks.com/2020/02/23/face-alignment-for-face-recognition-in-python-within-opencv/), [normalize](https://sefiks.com/2020/11/20/facial-landmarks-for-face-recognition-with-dlib/), [represent](https://sefiks.com/2018/08/06/deep-face-recognition-with-keras/) and [verify](https://sefiks.com/2020/05/22/fine-tuning-the-threshold-in-face-recognition/). While DeepFace handles all these common stages in the background, you don’t need to acquire in-depth knowledge about all the processes behind it. You can just call its verification, find or analysis function with a single line of code.
[`Experiments`](https://github.com/serengil/deepface/tree/master/benchmarks) show that **human beings have 97.53% accuracy** on facial recognition tasks whereas those models already reached and passed that accuracy level.
## Installation [](https://pypi.org/project/deepface/)
The easiest way to install deepface is to download it from [`PyPI`](https://pypi.org/project/deepface/). It's going to install the library itself and its prerequisites as well.
```shell
$ pip install deepface
```
Alternatively, you can also install deepface from its source code. Source code may have new features not published in pip release yet.
```shell
$ git clone https://github.com/serengil/deepface.git
$ cd deepface
$ pip install -e .
```
Once you installed the library, then you will be able to import it and use its functionalities.
```python
from deepface import DeepFace
```
**Face Verification** - [`Demo`](https://youtu.be/KRCvkNCOphE)
This function determines whether two facial images belong to the same person or to different individuals. The function returns a dictionary, where the key of interest is `verified`: True indicates the images are of the same person, while False means they are of different people.
```python
result: dict = DeepFace.verify(img1_path = "img1.jpg", img2_path = "img2.jpg")
```
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/verify-credit.jpg" width="99%"></p>
**Face recognition** - [`Tutorial`](https://sefiks.com/2026/01/01/introducing-brand-new-face-recognition-in-deepface/), [`Demo`](https://youtu.be/Hrjp-EStM_s)
[Face recognition](https://sefiks.com/2020/05/25/large-scale-face-recognition-for-deep-learning/) requires applying face verification many times. DeepFace provides an out-of-the-box `find` function that searches for the identity of an input image within a specified database path.
```python
dfs: List[pd.DataFrame] = DeepFace.find(img_path = "img1.jpg", db_path = "C:/my_db")
```
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/stock-6-v2.jpg" width="95%"></p>
Here, the `find` function relies on a directory-based face datastore and stores embeddings on disk. Alternatively, DeepFace provides a database-backed [`search`](https://sefiks.com/2026/01/01/introducing-brand-new-face-recognition-in-deepface/) functionality where embeddings are explicitly registered and queried. Currently, [postgres](https://sefiks.com/2023/06/22/vector-similarity-search-in-postgresql/), [mongo](https://sefiks.com/2021/01/22/deep-face-recognition-with-mongodb/), [neo4j](https://sefiks.com/2021/04/03/deep-face-recognition-with-neo4j/), [pgvector](https://sefiks.com/2024/07/05/postgres-as-a-vector-database-billion-scale-vector-similarity-search-with-pgvector/), [pinecone](https://sefiks.com/2021/05/19/large-scale-face-recognition-with-pinecone-vector-database/) and weaviate are supported as backend databases.
```python
# register an image into the database
DeepFace.register(img = "img1.jpg")
# perform exact search
dfs: List[pd.DataFrame] = DeepFace.search(img = "target.jpg")
```
If you want to perform [`approximate nearest neighbor`](https://sefiks.com/2023/12/31/a-step-by-step-approximate-nearest-neighbor-example-in-python-from-scratch/) search instead of exact search to achieve faster results on [large-scale databases](https://www.youtube.com/playlist?list=PLsS_1RYmYQQGSJu_Z3OVhXhGmZ86_zuIm), you can build an index beforehand and explicitly enable ANN search. Here, [Faiss](https://sefiks.com/2020/09/17/large-scale-face-recognition-with-facebook-faiss/) is used to index embeddings in postgres and mongo; whereas vector databases such as pgvector, weaviate, pinecone and neo4j handle indexing internally.
```python
# build index on registered embeddings (for postgres and mongo only)
DeepFace.build_index()
# perform approximate nearest neighbor search
dfs: List[pd.DataFrame] = DeepFace.search(img = "target.jpg", search_method = "ann")
```
**Facial Attribute Analysis** - [`Demo`](https://youtu.be/GT2UeN85BdA)
DeepFace also comes with a strong facial attribute analysis module including [`age`](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [`gender`](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/), [`facial expression`](https://sefiks.com/2018/01/01/facial-expression-recognition-with-keras/) (including angry, fear, neutral, sad, disgust, happy and surprise) and [`race`](https://sefiks.com/2019/11/11/race-and-ethnicity-prediction-in-keras/) (including asian, white, middle eastern, indian, latino and black) predictions.
```python
objs: List[dict] = DeepFace.analyze(
img_path = "img4.jpg", actions = ['age', 'gender', 'race', 'emotion']
)
```
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/stock-2.jpg" width="95%"></p>
Age model got ± 4.65 MAE; gender model got 97.44% accuracy, 96.29% precision and 95.05% recall as mentioned in its [tutorial](https://sefiks.com/2019/02/13/apparent-age-and-gender-prediction-in-keras/).
**Real Time Analysis** - [`Demo`](https://youtu.be/-c9sSJcx6wI), [`React Demo part-i`](https://youtu.be/IXoah6rhxac), [`React Demo part-ii`](https://youtu.be/_waBA-cH2D4)
You can run deepface for real time videos as well. Stream function will access your webcam and apply both face recognition and facial attribute analysis. The function starts to analyze a frame if it can focus a face sequentially 5 frames. Then, it shows results 5 seconds.
```python
DeepFace.stream(db_path = "C:/database")
```
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/stock-3.jpg" width="90%"></p>
Even though face recognition is based on one-shot learning, you can use multiple face pictures of a person as well. You should rearrange your directory structure as illustrated below.
```bash
user
├── database
│ ├── Alice
│ │ ├── Alice1.jpg
│ │ ├── Alice2.jpg
│ ├── Bob
│ │ ├── Bob.jpg
```
If you intend to perform face verification or analysis tasks directly from your browser, [`deepface-react-ui`](https://github.com/serengil/deepface-react-ui) is a separate repository built using ReactJS depending on deepface api.
Here, you can also find some real time demos for various facial recognition models:
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/refs/heads/master/icon/deepface-realtime.jpg" width="90%"></p>
| Task | Model | Demo |
| --- | --- | --- |
| Facial Recognition | DeepFace | [`Video`](https://youtu.be/YjYIMs5ZOfc) |
| Facial Recognition | FaceNet | [`Video`](https://youtu.be/vB1I5vWgTQg) |
| Facial Recognition | VGG-Face | [`Video`](https://youtu.be/tSU_lNi0gQQ) |
| Facial Recognition | OpenFace | [`Video`](https://youtu.be/-4z2sL6wzP8) |
| Age & Gender | Default | [`Video`](https://youtu.be/tFI7vZn3P7E) |
| Race & Ethnicity | Default | [`Video`](https://youtu.be/-ztiy5eJha8) |
| Emotion | Default | [`Video`](https://youtu.be/Y7DfLvLKScs) |
| Celebrity Look-Alike | Default | [`Video`](https://youtu.be/RMgIKU1H8DY) |
**Embeddings** - [`Tutorial`](https://sefiks.com/2025/06/28/what-are-vector-embeddings-and-why-they-matter-in-ai/), [`Demo`](https://youtu.be/OYialFo7Qo4)
Face recognition models basically represent facial images as multi-dimensional vectors. Sometimes, you need those embedding vectors directly. DeepFace comes with a dedicated representation function.
```python
embedding_objs: List[dict] = DeepFace.represent(img_path = "img.jpg")
```
Embeddings can be [plotted](https://sefiks.com/2020/05/01/a-gentle-introduction-to-face-recognition-in-deep-learning/) as below. Each slot is corresponding to a dimension value and dimension value is emphasized with colors. Similar to 2D barcodes, vertical dimension stores no information in the illustration.
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/embedding.jpg" width="95%"></p>
In summary, the distance between vector embeddings of the same person should be smaller than that between embeddings of different people. When reduced to two-dimensional space, the clusters become clearly distinguishable.
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/refs/heads/master/icon/facenet-pca.png" width="95%"></p>
**Face recognition models** - [`Demo`](https://youtu.be/eKOZawGR3y0)
DeepFace is a **hybrid** face recognition package. It currently wraps many **state-of-the-art** face recognition models: [`VGG-Face`](https://sefiks.com/2018/08/06/deep-face-recognition-with-keras/) , [`FaceNet`](https://sefiks.com/2018/09/03/face-recognition-with-facenet-in-keras/), [`OpenFace`](https://sefiks.com/2019/07/21/face-recognition-with-openface-in-keras/), [`DeepFace`](https://sefiks.com/2020/02/17/face-recognition-with-facebook-deepface-in-keras/), [`DeepID`](https://sefiks.com/2020/06/16/face-recognition-with-deepid-in-keras/), [`ArcFace`](https://sefiks.com/2020/12/14/deep-face-recognition-with-arcface-in-keras-and-python/), [`Dlib`](https://sefiks.com/2020/07/11/face-recognition-with-dlib-in-python/), `SFace`, `GhostFaceNet` and `Buffalo_L`. The default configuration uses VGG-Face model.
```python
models = [
"VGG-Face", "Facenet", "Facenet512", "OpenFace", "DeepFace",
"DeepID", "ArcFace", "Dlib", "SFace", "GhostFaceNet",
"Buffalo_L",
]
result = DeepFace.verify(
img1_path = "img1.jpg", img2_path = "img2.jpg", model_name = models[0]
)
dfs = DeepFace.find(
img_path = "img1.jpg", db_path = "C:/my_db", model_name = models[1]
)
embeddings = DeepFace.represent(
img_path = "img.jpg", model_name = models[2]
)
```
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/model-portfolio-20240316.jpg" width="95%"></p>
FaceNet, VGG-Face, ArcFace and Dlib are overperforming ones based on experiments - see [`BENCHMARKS`](https://github.com/serengil/deepface/tree/master/benchmarks) for more details. You can find the measured scores of various models in DeepFace and the reported scores from their original studies in the following table.
| Model | Measured Score | Declared Score |
| -------------- | -------------- | ------------------ |
| Facenet512 | 98.4% | 99.6% |
| Human-beings | 97.5% | 97.5% |
| Facenet | 97.4% | 99.2% |
| Dlib | 96.8% | 99.3 % |
| VGG-Face | 96.7% | 98.9% |
| ArcFace | 96.7% | 99.5% |
| GhostFaceNet | 93.3% | 99.7% |
| SFace | 93.0% | 99.5% |
| OpenFace | 78.7% | 92.9% |
| DeepFace | 69.0% | 97.3% |
| DeepID | 66.5% | 97.4% |
Conducting experiments with those models within DeepFace may reveal disparities compared to the original studies, owing to the adoption of distinct detection or normalization techniques. Furthermore, some models have been released solely with their backbones, lacking pre-trained weights. Thus, we are utilizing their re-implementations instead of the original pre-trained weights.
**Face Detection and Alignment** - [`Demo`](https://youtu.be/GZ2p2hj2H5k)
Face detection and alignment are important early stages of a modern face recognition pipeline. [Experiments](https://github.com/serengil/deepface/tree/master/benchmarks) show that detection increases the face recognition accuracy up to 42%, while alignment increases it up to 6%. [`OpenCV`](https://sefiks.com/2020/02/23/face-alignment-for-face-recognition-in-python-within-opencv/), [`Ssd`](https://sefiks.com/2020/08/25/deep-face-detection-with-opencv-in-python/), [`Dlib`](https://sefiks.com/2020/07/11/face-recognition-with-dlib-in-python/), [`MtCnn`](https://sefiks.com/2020/09/09/deep-face-detection-with-mtcnn-in-python/), `Faster MtCnn`, [`RetinaFace`](https://sefiks.com/2021/04/27/deep-face-detection-with-retinaface-in-python/), [`MediaPipe`](https://sefiks.com/2022/01/14/deep-face-detection-with-mediapipe/), `Yolo`, `YuNet` and `CenterFace` detectors are wrapped in deepface.
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/detector-portfolio-v6.jpg" width="95%"></p>
All deepface functions accept optional detector backend and align input arguments. You can switch among those detectors and alignment modes with these arguments. OpenCV is the default detector and alignment is on by default.
```python
backends = [
'opencv', 'ssd', 'dlib', 'mtcnn', 'fastmtcnn',
'retinaface', 'mediapipe', 'yolov8n', 'yolov8m',
'yolov8l', 'yolov11n', 'yolov11s', 'yolov11m',
'yolov11l', 'yolov12n', 'yolov12s', 'yolov12m',
'yolov12l', 'yunet', 'centerface',
]
detector = backends[3]
align = True
obj = DeepFace.verify(
img1_path = "img1.jpg", img2_path = "img2.jpg", detector_backend = detector, align = align
)
dfs = DeepFace.find(
img_path = "img.jpg", db_path = "my_db", detector_backend = detector, align = align
)
embedding_objs = DeepFace.represent(
img_path = "img.jpg", detector_backend = detector, align = align
)
demographies = DeepFace.analyze(
img_path = "img4.jpg", detector_backend = detector, align = align
)
face_objs = DeepFace.extract_faces(
img_path = "img.jpg", detector_backend = detector, align = align
)
```
Face recognition models are actually CNN models and they expect standard sized inputs. So, resizing is required before representation. To avoid deformation, deepface adds black padding pixels according to the target size argument after detection and alignment.
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/detector-outputs-20240414.jpg" width="90%"></p>
[RetinaFace](https://sefiks.com/2021/04/27/deep-face-detection-with-retinaface-in-python/) and [MtCnn](https://sefiks.com/2020/09/09/deep-face-detection-with-mtcnn-in-python/) seem to overperform in detection and alignment stages but they are much slower. If the speed of your pipeline is more important, then you should use opencv or ssd. On the other hand, if you consider the accuracy, then you should use retinaface or mtcnn.
The performance of RetinaFace is very satisfactory even in the crowd as seen in the following illustration. Besides, it comes with an incredible facial landmark detection performance. Highlighted red points show some facial landmarks such as eyes, nose and mouth. That's why, alignment score of RetinaFace is high as well.
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/retinaface-results.jpeg" width="90%">
<br><em>The Yellow Angels - Fenerbahce Women's Volleyball Team</em>
</p>
You can find out more about RetinaFace on this [repo](https://github.com/serengil/retinaface).
**Face Anti Spoofing** - [`Demo`](https://youtu.be/UiK1aIjOBlQ)
DeepFace also includes an anti-spoofing analysis module to understand given image is real or fake. To activate this feature, set the `anti_spoofing` argument to True in any DeepFace tasks.
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/face-anti-spoofing.jpg" width="40%"></p>
```python
# anti spoofing test in face detection
face_objs = DeepFace.extract_faces(img_path="dataset/img1.jpg", anti_spoofing = True)
assert all(face_obj["is_real"] is True for face_obj in face_objs)
# anti spoofing test in real time analysis
DeepFace.stream(db_path = "C:/database", anti_spoofing = True)
```
**Similarity** - [`Demo`](https://youtu.be/1EPoS69fHOc)
Face recognition models are regular [convolutional neural networks](https://sefiks.com/2018/03/23/convolutional-autoencoder-clustering-images-with-neural-networks/) and they are responsible to represent faces as vectors. We expect that a face pair of same person should be [more similar](https://sefiks.com/2020/05/22/fine-tuning-the-threshold-in-face-recognition/) than a face pair of different persons.
Similarity could be calculated by different metrics such as [Cosine Similarity](https://sefiks.com/2018/08/13/cosine-similarity-in-machine-learning/), Angular Distance, Euclidean Distance or L2 normalized Euclidean. The default configuration uses cosine similarity. According to [experiments](https://github.com/serengil/deepface/tree/master/benchmarks), no distance metric is overperforming than other.
```python
metrics = ["cosine", "euclidean", "euclidean_l2", "angular"]
result = DeepFace.verify(
img1_path = "img1.jpg", img2_path = "img2.jpg", distance_metric = metrics[1]
)
dfs = DeepFace.find(
img_path = "img1.jpg", db_path = "C:/my_db", distance_metric = metrics[2]
)
```
**API** - [`Demo`](https://youtu.be/HeKCQ6U9XmI), [`Docker Demo`](https://youtu.be/9Tk9lRQareA)
DeepFace serves an API as well - see [`api folder`](https://github.com/serengil/deepface/tree/master/deepface/api/src) for more details. You can clone deepface source code and run the api with the following command. It will use gunicorn server to get a rest service up. In this way, you can call deepface from an external system such as mobile app or web.
```shell
cd scripts && ./service.sh
```
Alternatively, you can run the dockerized service.
```shell
cd scripts && ./dockerize.sh
```
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/deepface-api.jpg" width="90%"></p>
Face verification, facial attribute analysis, vector representation and register & search functions are covered in the API. The API accepts images as file uploads (via form data), or as exact image paths, URLs, or base64-encoded strings (via either JSON or form data).
```shell
$ curl -X POST http://localhost:5005/represent \
-d '{"model_name":"Facenet", "img":"img1.jpg"}'
$ curl -X POST http://localhost:5005/verify \
-d '{"img1":"img1.jpg", "img2":"img3.jpg"}'
$ curl -X POST http://localhost:5005/analyze \
-d '{"img": "img2.jpg", "actions": ["age", "gender"]}'
$ curl -X POST http://localhost:5005/register \
-d '{"model_name":"Facenet", "img":"img18.jpg"}'
$ curl -X POST http://localhost:5005/search \
-d '{"img":"img1.jpg", "model_name":"Facenet"}'
```
[`Here`](https://github.com/serengil/deepface/tree/master/deepface/api/postman), you can find a postman project to find out how these methods should be called.
**Encrypt Embeddings** - [`Demo with PHE`](https://youtu.be/8VCu39jFZ7k), [`Tutorial for PHE`](https://sefiks.com/2025/03/04/vector-similarity-search-with-partially-homomorphic-encryption-in-python/), [`Demo with FHE`](https://youtu.be/njjw0PEhH00), [`Tutorial for FHE`](https://sefiks.com/2021/12/01/homomorphic-facial-recognition-with-tenseal/)
Vector embeddings, though not reversible, carry sensitive information like fingerprints, making their security crucial. Encrypting them prevents adversarial misuse. Traditional encryption (e.g., AES) is secure but unsuitable for cloud-based distance calculations.
[Homomorphic encryption](https://youtu.be/3ejI0zNPMEQ) allows computations on encrypted data without revealing content—ideal for secure cloud processing. For example, the cloud can compute encrypted similarity without knowing the data, while only the key holder can decrypt the result. See the [`LightPHE`](https://github.com/serengil/LightPHE) library for partially homomorphic encryption.
```python
from lightphe import LightPHE
# build an additively homomorphic cryptosystem (e.g. Paillier) on-prem
cs = LightPHE(algorithm_name = "Paillier", precision = 19)
# define encrypted and plain vectors
encrypted_alpha = DeepFace.represent("source.jpg", cryptosystem=cs)[0]["encrypted_embedding"]
beta = DeepFace.represent("target.jpg")[0]["embedding"]
# dot product of encrypted & plain embedding in cloud - private key not required
encrypted_cosine_similarity = encrypted_alpha @ beta
# decrypt similarity on-prem - private key required
calculated_similarity = cs.decrypt(encrypted_cosine_similarity)[0]
# verification
print("same person" if calculated_similarity >= 1 - threshold else "different persons")
```
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/refs/heads/master/icon/encrypt-embeddings.jpg" width="60%"></p>
For stronger privacy, fully homomorphic encryption enables dot product computations between encrypted embeddings, but it's far more computationally intensive. Explore [`CipherFace`](https://github.com/serengil/cipherface) for FHE-based approaches.
### Extended Applications
DeepFace can also be used for fun and insightful applications such as
**Find Your Celebrity Look-Alike** - [`Demo`](https://youtu.be/jaxkEn-Kieo), [`Real-Time Demo`](https://youtu.be/RMgIKU1H8DY), [`Tutorial`](https://sefiks.com/2019/05/05/celebrity-look-alike-face-recognition-with-deep-learning-in-keras/)
DeepFace can analyze your facial features and match them with celebrities, letting you discover which famous personality you resemble the most.
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/celebrity-look-alike.jpg" width="55%"></p>
**Find Which Parent a Child Look More** - [`Demo`](https://youtu.be/nza4tmi9vhE), [`Tutorial`](https://sefiks.com/2022/12/22/decide-whom-your-child-looks-like-with-facial-recognition-mommy-or-daddy/)
DeepFace can also be used to compare a child's face to their parents' or relatives' faces to determine which one the child resembles more.
<p align="center"><img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/parental-look-alike-scaled.jpg" width="90%"></p>
## Contribution
Pull requests are more than welcome! If you are planning to contribute a large patch, please create an issue first to get any upfront questions or design decisions out of the way first.
Before creating a PR, you should run the unit tests and linting locally by running `make test && make lint` command. Once a PR sent, GitHub test workflow will be run automatically and unit test and linting jobs will be available in [GitHub actions](https://github.com/serengil/deepface/actions) before approval.
## Support
There are many ways to support a project - starring⭐️ the GitHub repo is just one 🙏 It really helps the project get discovered by more people.
If you do like this work, then you can support it financially on [Patreon](https://www.patreon.com/serengil?repo=deepface), [GitHub Sponsors](https://github.com/sponsors/serengil) or [Buy Me a Coffee](https://buymeacoffee.com/serengil).
<a href="https://www.patreon.com/serengil?repo=deepface">
<img src="https://raw.githubusercontent.com/serengil/deepface/master/icon/patreon.png" width="30%">
</a>
## Citation
Please cite deepface in your publications if it helps your research.
<details open>
<summary>S. I. Serengil and A. Ozpinar, <b>Boosted LightFace: A Hybrid DNN and GBM Model for Boosted Facial Recognition</b>, <i>Gazi University Journal of Science</i>, vol. 39, no. 1, pp. 452-466, 2026.</summary>
```BibTeX
@article{serengil2026boosted,
title = {Boosted LightFace: A Hybrid DNN and GBM Model for Boosted Facial Recognition},
author = {Serengil, Sefik Ilkin and Ozpinar, Alper},
journal = {Gazi University Journal of Science},
volume = {39},
number = {1},
pages = {452-466},
year = {2026},
doi = {10.35378/gujs.1794891},
url = {https://dergipark.org.tr/en/pub/gujs/article/1794891},
publisher = {Gazi University}
}
```
</details>
<details>
<summary>S. Serengil and A. Ozpinar, <b>"A Benchmark of Facial Recognition Pipelines and Co-Usability Performances of Modules"</b>, <i>Journal of Information Technologies</i>, vol. 17, no. 2, pp. 95-107, 2024.</summary>
```BibTeX
@article{serengil2024lightface,
title = {A Benchmark of Facial Recognition Pipelines and Co-Usability Performances of Modules},
author = {Serengil, Sefik and Ozpinar, Alper},
journal = {Journal of Information Technologies},
volume = {17},
number = {2},
pages = {95-107},
year = {2024},
doi = {10.17671/gazibtd.1399077},
url = {https://dergipark.org.tr/en/pub/gazibtd/issue/84331/1399077},
publisher = {Gazi University}
}
```
</details>
<details>
<summary>S. I. Serengil and A. Ozpinar, <b>"HyperExtended LightFace: A Facial Attribute Analysis Framework"</b>, <i>2021 International Conference on Engineering and Emerging Technologies (ICEET)</i>, 2021, pp. 1-4.</summary>
```BibTeX
@inproceedings{serengil2021lightface,
title = {HyperExtended LightFace: A Facial Attribute Analysis Framework},
author = {Serengil, Sefik Ilkin and Ozpinar, Alper},
booktitle = {2021 International Conference on Engineering and Emerging Technologies (ICEET)},
pages = {1-4},
year = {2021},
doi = {10.1109/ICEET53442.2021.9659697},
url = {https://ieeexplore.ieee.org/document/9659697},
organization = {IEEE}
}
```
</details>
<details>
<summary>S. I. Serengil and A. Ozpinar, <b>"LightFace: A Hybrid Deep Face Recognition Framework"</b>, <i>2020 Innovations in Intelligent Systems and Applications Conference (ASYU)</i>, 2020, pp. 23-27.</summary>
```BibTeX
@inproceedings{serengil2020lightface,
title = {LightFace: A Hybrid Deep Face Recognition Framework},
author = {Serengil, Sefik Ilkin and Ozpinar, Alper},
booktitle = {2020 Innovations in Intelligent Systems and Applications Conference (ASYU)},
pages = {23-27},
year = {2020},
doi = {10.1109/ASYU50717.2020.9259802},
url = {https://ieeexplore.ieee.org/document/9259802},
organization = {IEEE}
}
```
</details>
Also, if you use deepface in your GitHub projects, please add `deepface` in the `requirements.txt`.
## Licence
DeepFace is licensed under the MIT License - see [`LICENSE`](https://github.com/serengil/deepface/blob/master/LICENSE) for more details.
DeepFace wraps some external face recognition models: [VGG-Face](http://www.robots.ox.ac.uk/~vgg/software/vgg_face/), [Facenet](https://github.com/davidsandberg/facenet/blob/master/LICENSE.md) (both 128d and 512d), [OpenFace](https://github.com/iwantooxxoox/Keras-OpenFace/blob/master/LICENSE), [DeepFace](https://github.com/swghosh/DeepFace), [DeepID](https://github.com/Ruoyiran/DeepID/blob/master/LICENSE.md), [ArcFace](https://github.com/leondgarse/Keras_insightface/blob/master/LICENSE), [Dlib](https://github.com/davisking/dlib/blob/master/dlib/LICENSE.txt), [SFace](https://github.com/opencv/opencv_zoo/blob/master/models/face_recognition_sface/LICENSE), [GhostFaceNet](https://github.com/HamadYA/GhostFaceNets/blob/main/LICENSE) and
[Buffalo_L](https://github.com/deepinsight/insightface/blob/master/README.md). Besides, age, gender and race / ethnicity models were trained on the backbone of VGG-Face with transfer learning. Similarly, DeepFace wraps many face detectors: [OpenCv](https://github.com/opencv/opencv/blob/4.x/LICENSE), [Ssd](https://github.com/opencv/opencv/blob/master/LICENSE), [Dlib](https://github.com/davisking/dlib/blob/master/LICENSE.txt), [MtCnn](https://github.com/ipazc/mtcnn/blob/master/LICENSE), [Fast MtCnn](https://github.com/timesler/facenet-pytorch/blob/master/LICENSE.md), [RetinaFace](https://github.com/serengil/retinaface/blob/master/LICENSE), [MediaPipe](https://github.com/google/mediapipe/blob/master/LICENSE), [YuNet](https://github.com/ShiqiYu/libfacedetection/blob/master/LICENSE), [Yolo](https://github.com/ultralytics/ultralytics/blob/main/LICENSE) and [CenterFace](https://github.com/Star-Clouds/CenterFace/blob/master/LICENSE). Finally, DeepFace is optionally using [face anti spoofing](https://github.com/minivision-ai/Silent-Face-Anti-Spoofing/blob/master/LICENSE) to determine the given images are real or fake. License types will be inherited when you intend to utilize those models. Please check the license types of those models for production purposes.
DeepFace [logo](https://thenounproject.com/term/face-recognition/2965879/) is created by [Adrien Coquet](https://thenounproject.com/coquet_adrien/) and it is licensed under [Creative Commons: By Attribution 3.0 License](https://creativecommons.org/licenses/by/3.0/).
================================================
FILE: benchmarks/Evaluate-Results.ipynb
================================================
{
"cells": [
{
"cell_type": "markdown",
"id": "59b076ef",
"metadata": {},
"source": [
"# Evaluate DeepFace's Results In The Big Picture"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "79200f8c",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"from IPython.display import display, HTML\n",
"from sklearn import metrics\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "bbc11592",
"metadata": {},
"outputs": [],
"source": [
"alignment = [False, True]\n",
"models = [\"Facenet512\", \"Facenet\", \"VGG-Face\", \"ArcFace\", \"Dlib\", \"GhostFaceNet\", \"SFace\", \"OpenFace\", \"DeepFace\", \"DeepID\"]\n",
"detectors = [\"retinaface\", \"mtcnn\", \"fastmtcnn\", \"dlib\", \"yolov8\", \"yunet\", \"centerface\", \"mediapipe\", \"ssd\", \"opencv\", \"skip\"]\n",
"distance_metrics = [\"euclidean\", \"euclidean_l2\", \"cosine\"]"
]
},
{
"cell_type": "markdown",
"id": "e0dabf1b",
"metadata": {},
"source": [
"# Main results"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "03b09fa3",
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"euclidean for alignment False\n"
]
},
{
"data": {
"text/html": [
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Facenet512</th>\n",
" <th>Facenet</th>\n",
" <th>VGG-Face</th>\n",
" <th>ArcFace</th>\n",
" <th>Dlib</th>\n",
" <th>GhostFaceNet</th>\n",
" <th>SFace</th>\n",
" <th>OpenFace</th>\n",
" <th>DeepFace</th>\n",
" <th>DeepID</th>\n",
" </tr>\n",
" <tr>\n",
" <th>detector</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>retinaface</th>\n",
" <td>96.1</td>\n",
" <td>92.8</td>\n",
" <td>95.7</td>\n",
" <td>84.1</td>\n",
" <td>88.3</td>\n",
" <td>83.2</td>\n",
" <td>78.6</td>\n",
" <td>70.8</td>\n",
" <td>67.4</td>\n",
" <td>64.3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mtcnn</th>\n",
" <td>95.9</td>\n",
" <td>92.5</td>\n",
" <td>95.5</td>\n",
" <td>81.8</td>\n",
" <td>89.3</td>\n",
" <td>83.2</td>\n",
" <td>76.3</td>\n",
" <td>70.9</td>\n",
" <td>65.9</td>\n",
" <td>63.2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>fastmtcnn</th>\n",
" <td>96.3</td>\n",
" <td>93.0</td>\n",
" <td>96.0</td>\n",
" <td>82.2</td>\n",
" <td>90.0</td>\n",
" <td>82.7</td>\n",
" <td>76.8</td>\n",
" <td>71.2</td>\n",
" <td>66.5</td>\n",
" <td>64.3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>dlib</th>\n",
" <td>96.0</td>\n",
" <td>89.0</td>\n",
" <td>94.1</td>\n",
" <td>82.6</td>\n",
" <td>96.3</td>\n",
" <td>65.6</td>\n",
" <td>73.1</td>\n",
" <td>75.9</td>\n",
" <td>61.8</td>\n",
" <td>61.9</td>\n",
" </tr>\n",
" <tr>\n",
" <th>yolov8</th>\n",
" <td>94.8</td>\n",
" <td>90.8</td>\n",
" <td>95.2</td>\n",
" <td>83.2</td>\n",
" <td>88.4</td>\n",
" <td>77.6</td>\n",
" <td>71.6</td>\n",
" <td>68.9</td>\n",
" <td>68.2</td>\n",
" <td>66.3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>yunet</th>\n",
" <td>97.9</td>\n",
" <td>96.5</td>\n",
" <td>96.3</td>\n",
" <td>84.1</td>\n",
" <td>91.4</td>\n",
" <td>82.7</td>\n",
" <td>78.2</td>\n",
" <td>71.7</td>\n",
" <td>65.5</td>\n",
" <td>65.2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>centerface</th>\n",
" <td>97.4</td>\n",
" <td>95.4</td>\n",
" <td>95.8</td>\n",
" <td>83.2</td>\n",
" <td>90.3</td>\n",
" <td>82.0</td>\n",
" <td>76.5</td>\n",
" <td>69.9</td>\n",
" <td>65.7</td>\n",
" <td>62.9</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mediapipe</th>\n",
" <td>94.9</td>\n",
" <td>87.1</td>\n",
" <td>93.1</td>\n",
" <td>71.1</td>\n",
" <td>91.9</td>\n",
" <td>61.9</td>\n",
" <td>73.2</td>\n",
" <td>77.6</td>\n",
" <td>61.7</td>\n",
" <td>62.4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ssd</th>\n",
" <td>97.2</td>\n",
" <td>94.9</td>\n",
" <td>96.7</td>\n",
" <td>83.9</td>\n",
" <td>88.6</td>\n",
" <td>84.9</td>\n",
" <td>82.0</td>\n",
" <td>69.9</td>\n",
" <td>66.7</td>\n",
" <td>64.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>opencv</th>\n",
" <td>94.1</td>\n",
" <td>90.2</td>\n",
" <td>95.8</td>\n",
" <td>89.8</td>\n",
" <td>91.2</td>\n",
" <td>91.0</td>\n",
" <td>86.9</td>\n",
" <td>71.1</td>\n",
" <td>68.4</td>\n",
" <td>61.1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>skip</th>\n",
" <td>92.0</td>\n",
" <td>64.1</td>\n",
" <td>90.6</td>\n",
" <td>56.6</td>\n",
" <td>69.0</td>\n",
" <td>75.1</td>\n",
" <td>81.4</td>\n",
" <td>57.4</td>\n",
" <td>60.8</td>\n",
" <td>60.7</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<hr>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"euclidean_l2 for alignment False\n"
]
},
{
"data": {
"text/html": [
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Facenet512</th>\n",
" <th>Facenet</th>\n",
" <th>VGG-Face</th>\n",
" <th>ArcFace</th>\n",
" <th>Dlib</th>\n",
" <th>GhostFaceNet</th>\n",
" <th>SFace</th>\n",
" <th>OpenFace</th>\n",
" <th>DeepFace</th>\n",
" <th>DeepID</th>\n",
" </tr>\n",
" <tr>\n",
" <th>detector</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>retinaface</th>\n",
" <td>98.0</td>\n",
" <td>95.9</td>\n",
" <td>95.7</td>\n",
" <td>95.7</td>\n",
" <td>88.4</td>\n",
" <td>89.5</td>\n",
" <td>90.6</td>\n",
" <td>70.8</td>\n",
" <td>67.7</td>\n",
" <td>64.6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mtcnn</th>\n",
" <td>97.8</td>\n",
" <td>96.2</td>\n",
" <td>95.5</td>\n",
" <td>95.9</td>\n",
" <td>89.2</td>\n",
" <td>88.0</td>\n",
" <td>91.1</td>\n",
" <td>70.9</td>\n",
" <td>67.0</td>\n",
" <td>64.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>fastmtcnn</th>\n",
" <td>97.7</td>\n",
" <td>96.6</td>\n",
" <td>96.0</td>\n",
" <td>95.9</td>\n",
" <td>89.6</td>\n",
" <td>87.8</td>\n",
" <td>89.7</td>\n",
" <td>71.2</td>\n",
" <td>67.8</td>\n",
" <td>64.2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>dlib</th>\n",
" <td>96.5</td>\n",
" <td>89.9</td>\n",
" <td>94.1</td>\n",
" <td>93.8</td>\n",
" <td>95.6</td>\n",
" <td>63.0</td>\n",
" <td>75.0</td>\n",
" <td>75.9</td>\n",
" <td>62.6</td>\n",
" <td>61.8</td>\n",
" </tr>\n",
" <tr>\n",
" <th>yolov8</th>\n",
" <td>97.7</td>\n",
" <td>95.8</td>\n",
" <td>95.2</td>\n",
" <td>95.0</td>\n",
" <td>88.1</td>\n",
" <td>88.7</td>\n",
" <td>89.8</td>\n",
" <td>68.9</td>\n",
" <td>68.9</td>\n",
" <td>65.3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>yunet</th>\n",
" <td>98.3</td>\n",
" <td>96.8</td>\n",
" <td>96.3</td>\n",
" <td>96.1</td>\n",
" <td>91.7</td>\n",
" <td>88.0</td>\n",
" <td>90.5</td>\n",
" <td>71.7</td>\n",
" <td>67.6</td>\n",
" <td>63.2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>centerface</th>\n",
" <td>97.4</td>\n",
" <td>96.3</td>\n",
" <td>95.8</td>\n",
" <td>95.8</td>\n",
" <td>90.2</td>\n",
" <td>86.8</td>\n",
" <td>89.3</td>\n",
" <td>69.9</td>\n",
" <td>68.4</td>\n",
" <td>63.1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mediapipe</th>\n",
" <td>96.3</td>\n",
" <td>90.0</td>\n",
" <td>93.1</td>\n",
" <td>89.3</td>\n",
" <td>91.8</td>\n",
" <td>65.6</td>\n",
" <td>74.6</td>\n",
" <td>77.6</td>\n",
" <td>64.9</td>\n",
" <td>61.6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ssd</th>\n",
" <td>97.9</td>\n",
" <td>97.0</td>\n",
" <td>96.7</td>\n",
" <td>96.6</td>\n",
" <td>89.4</td>\n",
" <td>91.5</td>\n",
" <td>93.0</td>\n",
" <td>69.9</td>\n",
" <td>68.7</td>\n",
" <td>64.9</td>\n",
" </tr>\n",
" <tr>\n",
" <th>opencv</th>\n",
" <td>96.2</td>\n",
" <td>92.9</td>\n",
" <td>95.8</td>\n",
" <td>93.2</td>\n",
" <td>91.5</td>\n",
" <td>93.3</td>\n",
" <td>91.7</td>\n",
" <td>71.1</td>\n",
" <td>68.3</td>\n",
" <td>61.6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>skip</th>\n",
" <td>91.4</td>\n",
" <td>67.6</td>\n",
" <td>90.6</td>\n",
" <td>57.2</td>\n",
" <td>69.3</td>\n",
" <td>78.4</td>\n",
" <td>83.4</td>\n",
" <td>57.4</td>\n",
" <td>62.6</td>\n",
" <td>61.6</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<hr>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"cosine for alignment False\n"
]
},
{
"data": {
"text/html": [
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Facenet512</th>\n",
" <th>Facenet</th>\n",
" <th>VGG-Face</th>\n",
" <th>ArcFace</th>\n",
" <th>Dlib</th>\n",
" <th>GhostFaceNet</th>\n",
" <th>SFace</th>\n",
" <th>OpenFace</th>\n",
" <th>DeepFace</th>\n",
" <th>DeepID</th>\n",
" </tr>\n",
" <tr>\n",
" <th>detector</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>retinaface</th>\n",
" <td>98.0</td>\n",
" <td>95.9</td>\n",
" <td>95.7</td>\n",
" <td>95.7</td>\n",
" <td>88.4</td>\n",
" <td>89.5</td>\n",
" <td>90.6</td>\n",
" <td>70.8</td>\n",
" <td>67.7</td>\n",
" <td>63.7</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mtcnn</th>\n",
" <td>97.8</td>\n",
" <td>96.2</td>\n",
" <td>95.5</td>\n",
" <td>95.9</td>\n",
" <td>89.2</td>\n",
" <td>88.0</td>\n",
" <td>91.1</td>\n",
" <td>70.9</td>\n",
" <td>67.0</td>\n",
" <td>64.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>fastmtcnn</th>\n",
" <td>97.7</td>\n",
" <td>96.6</td>\n",
" <td>96.0</td>\n",
" <td>95.9</td>\n",
" <td>89.6</td>\n",
" <td>87.8</td>\n",
" <td>89.7</td>\n",
" <td>71.2</td>\n",
" <td>67.8</td>\n",
" <td>62.7</td>\n",
" </tr>\n",
" <tr>\n",
" <th>dlib</th>\n",
" <td>96.5</td>\n",
" <td>89.9</td>\n",
" <td>94.1</td>\n",
" <td>93.8</td>\n",
" <td>95.6</td>\n",
" <td>63.0</td>\n",
" <td>75.0</td>\n",
" <td>75.9</td>\n",
" <td>62.6</td>\n",
" <td>61.7</td>\n",
" </tr>\n",
" <tr>\n",
" <th>yolov8</th>\n",
" <td>97.7</td>\n",
" <td>95.8</td>\n",
" <td>95.2</td>\n",
" <td>95.0</td>\n",
" <td>88.1</td>\n",
" <td>88.7</td>\n",
" <td>89.8</td>\n",
" <td>68.9</td>\n",
" <td>68.9</td>\n",
" <td>65.3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>yunet</th>\n",
" <td>98.3</td>\n",
" <td>96.8</td>\n",
" <td>96.3</td>\n",
" <td>96.1</td>\n",
" <td>91.7</td>\n",
" <td>88.0</td>\n",
" <td>90.5</td>\n",
" <td>71.7</td>\n",
" <td>67.6</td>\n",
" <td>63.2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>centerface</th>\n",
" <td>97.4</td>\n",
" <td>96.3</td>\n",
" <td>95.8</td>\n",
" <td>95.8</td>\n",
" <td>90.2</td>\n",
" <td>86.8</td>\n",
" <td>89.3</td>\n",
" <td>69.9</td>\n",
" <td>68.4</td>\n",
" <td>62.6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mediapipe</th>\n",
" <td>96.3</td>\n",
" <td>90.0</td>\n",
" <td>93.1</td>\n",
" <td>89.3</td>\n",
" <td>91.8</td>\n",
" <td>64.8</td>\n",
" <td>74.6</td>\n",
" <td>77.6</td>\n",
" <td>64.9</td>\n",
" <td>61.6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ssd</th>\n",
" <td>97.9</td>\n",
" <td>97.0</td>\n",
" <td>96.7</td>\n",
" <td>96.6</td>\n",
" <td>89.4</td>\n",
" <td>91.5</td>\n",
" <td>93.0</td>\n",
" <td>69.9</td>\n",
" <td>68.7</td>\n",
" <td>63.8</td>\n",
" </tr>\n",
" <tr>\n",
" <th>opencv</th>\n",
" <td>96.2</td>\n",
" <td>92.9</td>\n",
" <td>95.8</td>\n",
" <td>93.2</td>\n",
" <td>91.5</td>\n",
" <td>93.3</td>\n",
" <td>91.7</td>\n",
" <td>71.1</td>\n",
" <td>68.1</td>\n",
" <td>61.1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>skip</th>\n",
" <td>91.4</td>\n",
" <td>67.6</td>\n",
" <td>90.6</td>\n",
" <td>54.8</td>\n",
" <td>69.3</td>\n",
" <td>78.4</td>\n",
" <td>83.4</td>\n",
" <td>57.4</td>\n",
" <td>62.6</td>\n",
" <td>61.1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<hr>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"euclidean for alignment True\n"
]
},
{
"data": {
"text/html": [
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Facenet512</th>\n",
" <th>Facenet</th>\n",
" <th>VGG-Face</th>\n",
" <th>ArcFace</th>\n",
" <th>Dlib</th>\n",
" <th>GhostFaceNet</th>\n",
" <th>SFace</th>\n",
" <th>OpenFace</th>\n",
" <th>DeepFace</th>\n",
" <th>DeepID</th>\n",
" </tr>\n",
" <tr>\n",
" <th>detector</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>retinaface</th>\n",
" <td>95.9</td>\n",
" <td>93.5</td>\n",
" <td>95.8</td>\n",
" <td>85.2</td>\n",
" <td>88.9</td>\n",
" <td>85.9</td>\n",
" <td>80.2</td>\n",
" <td>69.4</td>\n",
" <td>67.0</td>\n",
" <td>65.6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mtcnn</th>\n",
" <td>95.2</td>\n",
" <td>93.8</td>\n",
" <td>95.9</td>\n",
" <td>83.7</td>\n",
" <td>89.4</td>\n",
" <td>83.0</td>\n",
" <td>77.4</td>\n",
" <td>70.2</td>\n",
" <td>66.5</td>\n",
" <td>63.3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>fastmtcnn</th>\n",
" <td>96.0</td>\n",
" <td>93.4</td>\n",
" <td>95.8</td>\n",
" <td>83.5</td>\n",
" <td>91.1</td>\n",
" <td>82.8</td>\n",
" <td>77.7</td>\n",
" <td>69.4</td>\n",
" <td>66.7</td>\n",
" <td>64.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>dlib</th>\n",
" <td>96.0</td>\n",
" <td>90.8</td>\n",
" <td>94.5</td>\n",
" <td>88.6</td>\n",
" <td>96.8</td>\n",
" <td>65.7</td>\n",
" <td>66.3</td>\n",
" <td>75.8</td>\n",
" <td>63.4</td>\n",
" <td>60.4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>yolov8</th>\n",
" <td>94.4</td>\n",
" <td>91.9</td>\n",
" <td>95.0</td>\n",
" <td>84.1</td>\n",
" <td>89.2</td>\n",
" <td>77.6</td>\n",
" <td>73.4</td>\n",
" <td>68.7</td>\n",
" <td>69.0</td>\n",
" <td>66.5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>yunet</th>\n",
" <td>97.3</td>\n",
" <td>96.1</td>\n",
" <td>96.0</td>\n",
" <td>84.9</td>\n",
" <td>92.2</td>\n",
" <td>84.0</td>\n",
" <td>79.4</td>\n",
" <td>70.9</td>\n",
" <td>65.8</td>\n",
" <td>65.2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>centerface</th>\n",
" <td>97.6</td>\n",
" <td>95.8</td>\n",
" <td>95.7</td>\n",
" <td>83.6</td>\n",
" <td>90.4</td>\n",
" <td>82.8</td>\n",
" <td>77.4</td>\n",
" <td>68.9</td>\n",
" <td>65.5</td>\n",
" <td>62.8</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mediapipe</th>\n",
" <td>95.1</td>\n",
" <td>88.6</td>\n",
" <td>92.9</td>\n",
" <td>73.2</td>\n",
" <td>93.1</td>\n",
" <td>63.2</td>\n",
" <td>72.5</td>\n",
" <td>78.7</td>\n",
" <td>61.8</td>\n",
" <td>62.2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ssd</th>\n",
" <td>88.9</td>\n",
" <td>85.6</td>\n",
" <td>87.0</td>\n",
" <td>75.8</td>\n",
" <td>83.1</td>\n",
" <td>79.1</td>\n",
" <td>76.9</td>\n",
" <td>66.8</td>\n",
" <td>63.4</td>\n",
" <td>62.5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>opencv</th>\n",
" <td>88.2</td>\n",
" <td>84.2</td>\n",
" <td>87.3</td>\n",
" <td>73.0</td>\n",
" <td>84.4</td>\n",
" <td>83.8</td>\n",
" <td>81.1</td>\n",
" <td>66.4</td>\n",
" <td>65.5</td>\n",
" <td>59.6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>skip</th>\n",
" <td>92.0</td>\n",
" <td>64.1</td>\n",
" <td>90.6</td>\n",
" <td>56.6</td>\n",
" <td>69.0</td>\n",
" <td>75.1</td>\n",
" <td>81.4</td>\n",
" <td>57.4</td>\n",
" <td>60.8</td>\n",
" <td>60.7</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<hr>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"euclidean_l2 for alignment True\n"
]
},
{
"data": {
"text/html": [
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Facenet512</th>\n",
" <th>Facenet</th>\n",
" <th>VGG-Face</th>\n",
" <th>ArcFace</th>\n",
" <th>Dlib</th>\n",
" <th>GhostFaceNet</th>\n",
" <th>SFace</th>\n",
" <th>OpenFace</th>\n",
" <th>DeepFace</th>\n",
" <th>DeepID</th>\n",
" </tr>\n",
" <tr>\n",
" <th>detector</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>retinaface</th>\n",
" <td>98.4</td>\n",
" <td>96.4</td>\n",
" <td>95.8</td>\n",
" <td>96.6</td>\n",
" <td>89.1</td>\n",
" <td>90.5</td>\n",
" <td>92.4</td>\n",
" <td>69.4</td>\n",
" <td>67.7</td>\n",
" <td>64.4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mtcnn</th>\n",
" <td>97.6</td>\n",
" <td>96.8</td>\n",
" <td>95.9</td>\n",
" <td>96.0</td>\n",
" <td>90.0</td>\n",
" <td>89.8</td>\n",
" <td>90.5</td>\n",
" <td>70.2</td>\n",
" <td>66.4</td>\n",
" <td>64.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>fastmtcnn</th>\n",
" <td>98.1</td>\n",
" <td>97.2</td>\n",
" <td>95.8</td>\n",
" <td>96.4</td>\n",
" <td>91.0</td>\n",
" <td>89.5</td>\n",
" <td>90.0</td>\n",
" <td>69.4</td>\n",
" <td>67.4</td>\n",
" <td>64.1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>dlib</th>\n",
" <td>97.0</td>\n",
" <td>92.6</td>\n",
" <td>94.5</td>\n",
" <td>95.1</td>\n",
" <td>96.4</td>\n",
" <td>63.3</td>\n",
" <td>69.8</td>\n",
" <td>75.8</td>\n",
" <td>66.5</td>\n",
" <td>59.5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>yolov8</th>\n",
" <td>97.3</td>\n",
" <td>95.7</td>\n",
" <td>95.0</td>\n",
" <td>95.5</td>\n",
" <td>88.8</td>\n",
" <td>88.9</td>\n",
" <td>91.9</td>\n",
" <td>68.7</td>\n",
" <td>67.5</td>\n",
" <td>66.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>yunet</th>\n",
" <td>97.9</td>\n",
" <td>97.4</td>\n",
" <td>96.0</td>\n",
" <td>96.7</td>\n",
" <td>91.6</td>\n",
" <td>89.1</td>\n",
" <td>91.0</td>\n",
" <td>70.9</td>\n",
" <td>66.5</td>\n",
" <td>63.6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>centerface</th>\n",
" <td>97.7</td>\n",
" <td>96.8</td>\n",
" <td>95.7</td>\n",
" <td>96.5</td>\n",
" <td>90.9</td>\n",
" <td>87.5</td>\n",
" <td>89.3</td>\n",
" <td>68.9</td>\n",
" <td>67.8</td>\n",
" <td>64.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mediapipe</th>\n",
" <td>96.1</td>\n",
" <td>90.6</td>\n",
" <td>92.9</td>\n",
" <td>90.3</td>\n",
" <td>92.6</td>\n",
" <td>64.4</td>\n",
" <td>75.4</td>\n",
" <td>78.7</td>\n",
" <td>64.7</td>\n",
" <td>63.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ssd</th>\n",
" <td>88.7</td>\n",
" <td>87.5</td>\n",
" <td>87.0</td>\n",
" <td>86.2</td>\n",
" <td>83.3</td>\n",
" <td>82.2</td>\n",
" <td>84.6</td>\n",
" <td>66.8</td>\n",
" <td>64.1</td>\n",
" <td>62.6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>opencv</th>\n",
" <td>87.6</td>\n",
" <td>84.8</td>\n",
" <td>87.3</td>\n",
" <td>84.6</td>\n",
" <td>84.0</td>\n",
" <td>85.0</td>\n",
" <td>83.6</td>\n",
" <td>66.4</td>\n",
" <td>63.8</td>\n",
" <td>60.9</td>\n",
" </tr>\n",
" <tr>\n",
" <th>skip</th>\n",
" <td>91.4</td>\n",
" <td>67.6</td>\n",
" <td>90.6</td>\n",
" <td>57.2</td>\n",
" <td>69.3</td>\n",
" <td>78.4</td>\n",
" <td>83.4</td>\n",
" <td>57.4</td>\n",
" <td>62.6</td>\n",
" <td>61.6</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<hr>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"cosine for alignment True\n"
]
},
{
"data": {
"text/html": [
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Facenet512</th>\n",
" <th>Facenet</th>\n",
" <th>VGG-Face</th>\n",
" <th>ArcFace</th>\n",
" <th>Dlib</th>\n",
" <th>GhostFaceNet</th>\n",
" <th>SFace</th>\n",
" <th>OpenFace</th>\n",
" <th>DeepFace</th>\n",
" <th>DeepID</th>\n",
" </tr>\n",
" <tr>\n",
" <th>detector</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>retinaface</th>\n",
" <td>98.4</td>\n",
" <td>96.4</td>\n",
" <td>95.8</td>\n",
" <td>96.6</td>\n",
" <td>89.1</td>\n",
" <td>90.5</td>\n",
" <td>92.4</td>\n",
" <td>69.4</td>\n",
" <td>67.7</td>\n",
" <td>64.4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mtcnn</th>\n",
" <td>97.6</td>\n",
" <td>96.8</td>\n",
" <td>95.9</td>\n",
" <td>96.0</td>\n",
" <td>90.0</td>\n",
" <td>89.8</td>\n",
" <td>90.5</td>\n",
" <td>70.2</td>\n",
" <td>66.3</td>\n",
" <td>63.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>fastmtcnn</th>\n",
" <td>98.1</td>\n",
" <td>97.2</td>\n",
" <td>95.8</td>\n",
" <td>96.4</td>\n",
" <td>91.0</td>\n",
" <td>89.5</td>\n",
" <td>90.0</td>\n",
" <td>69.4</td>\n",
" <td>67.4</td>\n",
" <td>63.6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>dlib</th>\n",
" <td>97.0</td>\n",
" <td>92.6</td>\n",
" <td>94.5</td>\n",
" <td>95.1</td>\n",
" <td>96.4</td>\n",
" <td>63.3</td>\n",
" <td>69.8</td>\n",
" <td>75.8</td>\n",
" <td>66.5</td>\n",
" <td>58.7</td>\n",
" </tr>\n",
" <tr>\n",
" <th>yolov8</th>\n",
" <td>97.3</td>\n",
" <td>95.7</td>\n",
" <td>95.0</td>\n",
" <td>95.5</td>\n",
" <td>88.8</td>\n",
" <td>88.9</td>\n",
" <td>91.9</td>\n",
" <td>68.7</td>\n",
" <td>67.5</td>\n",
" <td>65.9</td>\n",
" </tr>\n",
" <tr>\n",
" <th>yunet</th>\n",
" <td>97.9</td>\n",
" <td>97.4</td>\n",
" <td>96.0</td>\n",
" <td>96.7</td>\n",
" <td>91.6</td>\n",
" <td>89.1</td>\n",
" <td>91.0</td>\n",
" <td>70.9</td>\n",
" <td>66.5</td>\n",
" <td>63.5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>centerface</th>\n",
" <td>97.7</td>\n",
" <td>96.8</td>\n",
" <td>95.7</td>\n",
" <td>96.5</td>\n",
" <td>90.9</td>\n",
" <td>87.5</td>\n",
" <td>89.3</td>\n",
" <td>68.9</td>\n",
" <td>67.8</td>\n",
" <td>63.6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mediapipe</th>\n",
" <td>96.1</td>\n",
" <td>90.6</td>\n",
" <td>92.9</td>\n",
" <td>90.3</td>\n",
" <td>92.6</td>\n",
" <td>64.3</td>\n",
" <td>75.4</td>\n",
" <td>78.7</td>\n",
" <td>64.8</td>\n",
" <td>63.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ssd</th>\n",
" <td>88.7</td>\n",
" <td>87.5</td>\n",
" <td>87.0</td>\n",
" <td>86.2</td>\n",
" <td>83.3</td>\n",
" <td>82.2</td>\n",
" <td>84.5</td>\n",
" <td>66.8</td>\n",
" <td>63.8</td>\n",
" <td>62.6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>opencv</th>\n",
" <td>87.6</td>\n",
" <td>84.9</td>\n",
" <td>87.2</td>\n",
" <td>84.6</td>\n",
" <td>84.0</td>\n",
" <td>85.0</td>\n",
" <td>83.6</td>\n",
" <td>66.2</td>\n",
" <td>63.7</td>\n",
" <td>60.1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>skip</th>\n",
" <td>91.4</td>\n",
" <td>67.6</td>\n",
" <td>90.6</td>\n",
" <td>54.8</td>\n",
" <td>69.3</td>\n",
" <td>78.4</td>\n",
" <td>83.4</td>\n",
" <td>57.4</td>\n",
" <td>62.6</td>\n",
" <td>61.1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<hr>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"for align in alignment:\n",
" for metric in distance_metrics:\n",
" df = pd.read_csv(f\"results/pivot_{metric}_with_alignment_{align}.csv\")\n",
" df = df.rename(columns = {'Unnamed: 0': 'detector'})\n",
" df = df.set_index('detector')\n",
"\n",
" print(f\"{metric} for alignment {align}\")\n",
" display(HTML(df.to_html()))\n",
" display(HTML(\"<hr>\"))"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "aef6dc64",
"metadata": {},
"outputs": [],
"source": [
"def create_github_table():\n",
" for metric in distance_metrics:\n",
" for align in [True, False]:\n",
" df = pd.read_csv(f\"results/pivot_{metric}_with_alignment_{align}.csv\")\n",
" df = df.rename(columns = {'Unnamed: 0': 'detector'})\n",
" df = df.set_index('detector')\n",
" \n",
" print(f\"Performance Matrix for {metric} while alignment is {align} \\n\")\n",
" header = \"| | \"\n",
" for col_name in df.columns.tolist():\n",
" header += f\"{col_name} |\"\n",
" print(header)\n",
" # -------------------------------\n",
" seperator = \"| --- | \"\n",
" for col_name in df.columns.tolist():\n",
" seperator += \" --- |\"\n",
" print(seperator)\n",
" # -------------------------------\n",
" for index, instance in df.iterrows():\n",
" line = f\"| {instance.name} |\"\n",
" for i in instance.values:\n",
" if i < 97.5:\n",
" line += f\"{i} |\"\n",
" else:\n",
" line += f\"**{i}** |\"\n",
" print(line)\n",
" \n",
" print(\"\\n---------------------------\")"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "5004caaa",
"metadata": {},
"outputs": [],
"source": [
"# create_github_table()"
]
},
{
"cell_type": "markdown",
"id": "965c655f",
"metadata": {},
"source": [
"# Alignment impact"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "6ce20a58",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>max_alignment_impact</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>ArcFace</th>\n",
" <td>6.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>DeepFace</th>\n",
" <td>3.9</td>\n",
" </tr>\n",
" <tr>\n",
" <th>GhostFaceNet</th>\n",
" <td>2.7</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Facenet</th>\n",
" <td>2.7</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SFace</th>\n",
" <td>2.1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Dlib</th>\n",
" <td>1.4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>DeepID</th>\n",
" <td>1.4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>OpenFace</th>\n",
" <td>1.1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Facenet512</th>\n",
" <td>0.5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>VGG-Face</th>\n",
" <td>0.4</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"align_df = None\n",
"\n",
"for distance_metric in distance_metrics:\n",
" df1 = (\n",
" pd.read_csv(f\"results/pivot_{distance_metric}_with_alignment_True.csv\")\n",
" .rename(columns = {'Unnamed: 0': 'detector'})\n",
" .set_index('detector')\n",
" )\n",
" df2 = (\n",
" pd.read_csv(f\"results/pivot_{distance_metric}_with_alignment_False.csv\")\n",
" .rename(columns = {'Unnamed: 0': 'detector'})\n",
" .set_index('detector')\n",
" )\n",
" df1 = df1[df1.index != \"skip\"]\n",
" df2 = df2[df2.index != \"skip\"]\n",
" pivot_df = df1.subtract(df2)\n",
" \n",
" pivot_df = pivot_df.max()\n",
" pivot_df = pd.DataFrame(pivot_df, columns=[f'alignment_impact_of_{distance_metric}'])\n",
" # display(HTML(pivot_df.to_html()))\n",
"\n",
" if align_df is None:\n",
" align_df = pivot_df.copy()\n",
" else:\n",
" align_df = align_df.merge(pivot_df, left_index=True, right_index=True)\n",
"\n",
"# display(HTML(align_df.to_html()))\n",
"align_df = pd.DataFrame(align_df.max(axis=1), columns = [\"max_alignment_impact\"])\n",
"align_df = align_df.sort_values(by=[\"max_alignment_impact\"], ascending=False)\n",
"display(HTML(align_df.to_html()))"
]
},
{
"cell_type": "markdown",
"id": "f66e349f",
"metadata": {},
"source": [
"## Detection impact"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "34eca61b",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>max_detection_impact</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>ArcFace</th>\n",
" <td>41.8</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Facenet</th>\n",
" <td>32.4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Dlib</th>\n",
" <td>27.3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>OpenFace</th>\n",
" <td>20.2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>GhostFaceNet</th>\n",
" <td>15.9</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SFace</th>\n",
" <td>9.6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>DeepFace</th>\n",
" <td>7.6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Facenet512</th>\n",
" <td>6.9</td>\n",
" </tr>\n",
" <tr>\n",
" <th>VGG-Face</th>\n",
" <td>6.1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>DeepID</th>\n",
" <td>5.6</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"detect_df = None\n",
"for distance_metric in distance_metrics:\n",
" tmp_df = (\n",
" pd.read_csv(f\"results/pivot_{distance_metric}_with_alignment_False.csv\")\n",
" .rename(columns = {'Unnamed: 0': 'detector'})\n",
" .set_index('detector')\n",
" )\n",
" ref_df = tmp_df[tmp_df.index == \"skip\"]\n",
" \n",
" j = []\n",
" for i in range(0, len(detectors) - 1):\n",
" j.append(ref_df)\n",
" minus_df = pd.concat(j)\n",
" \n",
" tmp_df = tmp_df[tmp_df.index != \"skip\"]\n",
" minus_df.index = tmp_df.index\n",
" \n",
" # print(\"performance with no detection\")\n",
" # display(HTML(ref_df.to_html()))\n",
" \n",
" # print(\"pivot\")\n",
" tmp_df = tmp_df.subtract(minus_df)\n",
" # display(HTML(tmp_df.to_html()))\n",
" \n",
" # print(\"avg of detector impact for models\")\n",
" # avg_df = pd.DataFrame(tmp_df.mean()).T\n",
" avg_df = pd.DataFrame(tmp_df.max(), columns=[f\"detection_impact_of_{distance_metric}\"])\n",
" # display(HTML(avg_df.to_html()))\n",
"\n",
" if detect_df is None:\n",
" detect_df = avg_df.copy()\n",
" else:\n",
" detect_df = detect_df.merge(avg_df, left_index=True, right_index=True)\n",
"\n",
"# display(HTML(detect_df.to_html()))\n",
"detect_df = pd.DataFrame(detect_df.max(axis=1), columns = [\"max_detection_impact\"])\n",
"detect_df = detect_df.sort_values(by=[\"max_detection_impact\"], ascending=False)\n",
"display(HTML(detect_df.to_html()))\n"
]
},
{
"cell_type": "markdown",
"id": "1bdf64a3",
"metadata": {},
"source": [
"# facial recognition model's best scores"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "0cb1f232",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>best_accuracy_score</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Facenet512</th>\n",
" <td>98.4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Human-beings</th>\n",
" <td>97.5</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Facenet</th>\n",
" <td>97.4</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Dlib</th>\n",
" <td>96.8</td>\n",
" </tr>\n",
" <tr>\n",
" <th>VGG-Face</th>\n",
" <td>96.7</td>\n",
" </tr>\n",
" <tr>\n",
" <th>ArcFace</th>\n",
" <td>96.7</td>\n",
" </tr>\n",
" <tr>\n",
" <th>GhostFaceNet</th>\n",
" <td>93.3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>SFace</th>\n",
" <td>93.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>OpenFace</th>\n",
" <td>78.7</td>\n",
" </tr>\n",
" <tr>\n",
" <th>DeepFace</th>\n",
" <td>69.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>DeepID</th>\n",
" <td>66.5</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" best_accuracy_score\n",
"Facenet512 98.4\n",
"Human-beings 97.5\n",
"Facenet 97.4\n",
"Dlib 96.8\n",
"VGG-Face 96.7\n",
"ArcFace 96.7\n",
"GhostFaceNet 93.3\n",
"SFace 93.0\n",
"OpenFace 78.7\n",
"DeepFace 69.0\n",
"DeepID 66.5"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = pd.DataFrame()\n",
"for align in alignment:\n",
" for distance_metric in distance_metrics:\n",
" tmp_df = (\n",
" pd.read_csv(f\"results/pivot_{distance_metric}_with_alignment_{align}.csv\")\n",
" .rename(columns = {'Unnamed: 0': 'detector'})\n",
" .set_index('detector')\n",
" )\n",
" df = pd.concat([df, tmp_df])\n",
"\n",
"pivot_df = pd.DataFrame(df.max(), columns = [\"best_accuracy_score\"])\n",
"\n",
"# add human comparison\n",
"pivot_df.loc[\"Human-beings\"] = 97.5\n",
"\n",
"pivot_df = pivot_df.sort_values(by = [\"best_accuracy_score\"], ascending = False)\n",
"pivot_df"
]
},
{
"cell_type": "markdown",
"id": "b81ebe92",
"metadata": {},
"source": [
"# ROC Curves"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "bcb4db0a",
"metadata": {},
"outputs": [],
"source": [
"def plot_roc(model_name, detector_backend, distance_metric, align):\n",
" alignment_text = \"aligned\" if align == True else \"unaligned\"\n",
"\n",
" df = pd.read_csv(f\"outputs/test/{model_name}_{detector_backend}_{distance_metric}_{alignment_text}.csv\")\n",
" \n",
" #normalize\n",
" df[\"distances_normalized\"] = df[\"distances\"] / df[\"distances\"].max()\n",
" df[\"actuals_normalized\"] = 0\n",
" idx = df[df[\"actuals\"] == False].index\n",
" df.loc[idx, \"actuals_normalized\"] = 1\n",
" \n",
" y_actual = df[\"actuals_normalized\"].values.tolist()\n",
" y_pred_proba = df[\"distances_normalized\"].values.tolist()\n",
" \n",
" fpr, tpr, _ = metrics.roc_curve(y_actual, y_pred_proba)\n",
" auc = metrics.roc_auc_score(y_actual, y_pred_proba)\n",
" auc = round(auc, 4)\n",
"\n",
" # best accuracy score\n",
" result_path = f\"results/pivot_{distance_metric}_with_alignment_{align}.csv\"\n",
" result_df = pd.read_csv(result_path)\n",
" acc = result_df[result_df[\"Unnamed: 0\"] == detector_backend][model_name].values[0]\n",
"\n",
" label = f\"{model_name}_{detector_backend}_{distance_metric}_{alignment_text} (acc: {acc}, auc: {auc})\"\n",
"\n",
" return acc, auc, fpr, tpr, label"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "84b3d5b5",
"metadata": {
"scrolled": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABXwAAAKnCAYAAAA1L4U5AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8g+/7EAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOzdeXhU9dn/8c/M5MxkJoGoYFgkgopFERfAQt21UnF5XH5txV2aujxabW1pXHhE0LpXq9hqpS7BrZaqtWqt1SotbqWILAqKWlwwlaVQKyFMmJnMfH9/UCIhs5zJnDmzvV/Xlesi8z1zzp2FZOaTe+6vxxhjBAAAAAAAAAAoed5CFwAAAAAAAAAAcAaBLwAAAAAAAACUCQJfAAAAAAAAACgTBL4AAAAAAAAAUCYIfAEAAAAAAACgTBD4AgAAAAAAAECZIPAFAAAAAAAAgDJB4AsAAAAAAAAAZaKq0AW4LZFIaOXKlerVq5c8Hk+hywEAAAAAAABQAYwx2rBhgwYOHCivN399uBUX+K5cuVINDQ2FLgMAAAAAAABABWppadGgQYPydv6KC3x79eolafMntnfv3gWuBgAAAAAAAEAlaG1tVUNDQ2c+mS8VF/huGePQu3dvAl8AAAAAAAAArsr3mFk2bQMAAAAAAACAMkHgCwAAAAAAAABlgsAXAAAAAAAAAMoEgS8AAAAAAAAAlAkCXwAAAAAAAAAoEwS+AAAAAAAAAFAmCHwBAAAAAAAAoEwQ+AIAAAAAAABAm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AADFLR8zcXPVv39/NTY2pg1z6cwF0ito4Pvb3/5WkyZN0owZMzR27FhNnz5d48eP1/vvv6/6+vpuxz/66KO64oor1NzcrAMPPFAffPCBvvOd78jj8ei2224rwEcAIBW783klZvQCAAAAQCHEYjHXw95MgS5hLpC7gga+t912m8477zw1NjZKkmbMmKE//vGPam5u1hVXXNHt+L/97W866KCDdPrpp0uShgwZotNOO03z5tnckMw2I3liau9olzy+bqubOtodvh5Q3tLN55WY0QsAAAAAhebETFw7CHSB/CtY4BuNRrVgwQJNnjy58zav16tx48Zp7ty5Se9z4IEH6pFHHtEbb7yhMWPG6KOPPtJzzz2ns846y7G6jDEKDZ4hX2iFDn98atJjquJ+natbHLsmUO6YzwsAAACgHLg179Yt0Wi0899+v9+VwBdA/hUs8F23bp3i8bj69evX5fZ+/frpvffeS3qf008/XevWrdPBBx+8eTOojg5dcMEF+r//+7+U14lEIopstWlUa2tr2ro2xTfJF1ph++MIVgVtHwsAAAAAAIpXukDXyU3HACCfCr5pWzbmzJmjG264Qb/85S81duxYLV++XJdccomuvfZaXXXVVUnvc+ONN+qaa67p0fX+9P9ma4dgbbfbY5G4HnljviTxMgQAAAAAAArMic7bSg50GxoaZFlWocsA4JCCBb59+/aVz+fTmjVruty+Zs0a9e/fP+l9rrrqKp111lk699xzJUl77723Nm7cqPPPP19XXnmlvF5vt/tMnjxZkyZN6ny/tbVVDQ0NtmoMVgUVskLdbo8l4rbu7xpjpFg49Xo0zRqQhDFGHVt1xvdELLLJoWoAAAAAlLNcw1q3g9pMm46VIubqAuWlYIGv3+/X6NGjNXv2bJ100kmSpEQiodmzZ+viiy9Oep9wONwt1PX5Nm+qZoxJep9AIKBAIOBc4fkQDUtVyevPyBhp5tHS6iXO1oSKZYzRrKmXaeUHywpdCgAAAIASlynMLcau2kyBLuEogGJX0JEOkyZN0sSJE7X//vtrzJgxmj59ujZu3KjGxkZJ0tlnn62ddtpJN954oyTp+OOP12233aaRI0d2jnS46qqrdPzxx3cGvyVj64D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qT+/Oc/64YbbtCiRYs0d+5cXXbZZXr22Wf10ksvFbpESdLMmTO7fC8888wzrl27urpa999/v/7xj3+4dk04o7a2Vn369Cl0GXlXCo9btvbEE0+od+/eOuiggwpdShfnnnuuXnzxRT388MNasmSJjjrqKI0bN06fffZZ5zFf+cpXdOedd2rJkiV67bXXNGTIEB111FFau3ZtyvMOGjRIN910kxYsWKA333xTX//613XiiSfqnXfecePDclQ8Htdxxx2naDSqv/3tb3rwwQf1wAMPaOrUqSnvY+fxliTddtttuvLKK3XFFVfonXfe0UsvvaTx48d3rjc1NXV7Ljp8+PAujwl22GEHXXnllZo7d67efvttNTY2qrGxsctjFh43ABmYCrN+/Xojybz7wz+ZlstfSfsWj3QkPUe0vd3cOuE4c+uE40y0vd3ljyB7kUjETJs2zUybNs1EIpFCl+OIRCJhOjo2pnyLRNaal2bval6avavp6Njo+PXb29vNu+++a9pL4Ou/rYkTJ5oTTzwx6drPfvYzM2LECBMKhcygQYPMhRdeaDZs2NDlmNdee80cdthhJhgMmu22284cddRR5vPPPzfGGBOPx80NN9xghgwZYqqrq81XRowwtzz4iFm8fqNZvH6juffZPxlJ5ldPP2uG7zfSVAeDZp8xY83zC98yiUSi8xpPPfWUGTlypAkEAmaXXXYxV199tYnFYsYYYwYPHmwkdb4NHjzYGGPMX//6VyPJ/Oc//7H1eZBkfv/732c87o033jCSzIoVKzIe+/HHHxtJZtasWebQQw81gUDAzJw50xhjzL333mv22GMPEwgEzLBhw8xdd93VpZat3w477DBjTPev1WGHHWa+//3vm0svvdRsv/32pl+/fmbatGldakj3NdzyOdr67a9//atZt26dOfXUU83AgQNNMBg0I0aMMI8++miX88bjcXPzzTeb3Xbbzfj9ftPQ0GCuu+66zvVPP/3UnHzyyaaurs5sv/325oQTTjAff/xxxs/ZFvfff78ZPny48fv9pn///uaiiy7qXFuxYoU54YQTTE1NjenVq5c5+eSTzerVqzvXFy9ebA4//HBTW1trevXqZUaNGmXmz59vjDFm5syZpq6urvPYadOmmX333dc89NBDZvDgwaZ3797mlFNOMa2trV0+1q2/j/fZZx/z+OOP2/o4Ojo6zHe/+90v/w985Stm+vTpXY5J9nW95JJLOt9fuXKlOfbYY011dbUZMmSI+fWvf20GDx5sbr/99s5jJJl7773XnHTSSSYYDJqhQ4eap59+ust1lixZYo4++mhTU1Nj6uvrzZlnnmnWrl3bud7W1mbOOussU1NTY/r3729uvfXWbrVs61//+pfxeDxm6dKlXW534mdHuu+vTH71q1+Z+vp6E4/HO297++23jSTzj3/8wxhjzPz5840k8+mnn6Y8JpVFixaZnXbayaxatcr2z46tLV++3Jxwwgmmvr7e1NTUmP3339+8+OKLXY5Jdt66urrOnyHGGNPS0mJOPfVUs/3225tQKGRGjx5t/v73v9uu47LLLjN77bVXl9tOOeUUM378+JT3Oe2008y3v/3tLrf9/Oc/N4MGDer8uX3AAQeYpqamLsdMmjTJHHTQQSnPe/vtt5tevXqZtra2Lrc3NjaaM88809bHg67Gjx9vBg0a1O1zusXWv2ft/AyZM2eO+epXv9r5c/nyyy/v/F1sjDGPP/64GTFihKmurjY77LCDOfLII01bW5uZNm1a0t81W66b7P+PG7+Htvz8/8Y3vmFOPvnkztsXLVpkJHU5Nt3Pz4kTJ3b7+Oz8vsv0+TzssMPMRRddZC666CLTu3dv06dPHzNlypQuX7dNmzaZH//4x2bgwIEmFAqZMWPGdH5ujfnyd97zzz9v9thjD1NTU2PGjx9vVq5c2aWWVL9zTzvtNDNhwoQux0ajUdOnTx/z4IMPZvwYM32N3n77bXPEEUd0fs+cd955XX5X/PWvfzVf/epXTSgUMnV1debAAw80n3zyiTHmy6/fFlt+l95yyy2mf//+ZocddjDf+973TDQatf35Smfb6xmz+efWlseddmt46KGHzOjRo01tba3p16+fOe2008yaNWu6fMxbP37d9nGLMcZce+21ZscddzS1tbXmnHPOMZdffnlePhczZ840DQ0NJhgMmpNOOsnceuut3WrZ1nHHHdft5/8bb7xhxo0bZ/r06WN69+5tDj30ULNgwYIux/znP/8x559/vqmvrzeBQMDstdde5g9/+EPnerrHDJmEw2Hj8/nMs88+2+X2UaNGmSuvvDLl/bbkBC+99JKt62yx/fbbm/vuu8/28XYeKyZ7PHbiiSeaiRMndr6/adMmc9lll5lBgwYZv99vdtttt6zqeO6554zX6+3ymPruu+82vXv3TpkZ2Hm89fnnn5tgMJjV53Hx4sVGknnllVfSHjdy5EgzZcqULre5/bihlHMAFI8tP2/Wr1+f1+sUT3tOkfEP7i2PxaenGBljtGDhBM15ee+Ub6++NrYgdYWjHQV5Mw5tbub1evXzn/9c77zzjh588EH95S9/0WWXXda5vnjxYh155JEaPny45s6dq9dee03HH3+84vHNnfE33nijHnroIc2YMUNvL12qM753sa48/xytWzBPI3oFtUsoIEm6/4Zr9Yvbb9Mb8+erd8Cvn1x8YWfn3Kuvvqqzzz5bl1xyid5991396le/0gMPPKDrr79ekjpfjrWlQ2jbl2ftt99+GjBggL7xjW/o9ddfz/lzsn79enk8nqw6ba+44gpdcsklWrZsmcaPH69f//rXmjp1qq6//notW7ZMN9xwg6666io9+OCDkqQ33nhDkvTSSy9p1apVevLJJ1Oe+8EHH1RNTY3mzZunn/70p/rJT36iF198sXM93dfwwAMP1Pvvvy9J+t3vfqdVq1bpwAMP1KZNmzR69Gj98Y9/1NKlS3X++efrrLPO6qxLkiZPnqybbrpJV111ld599109+uij6tevn6TNXczjx49Xr1699Oqrr+r1119XbW2tjj76aEWj0Yyfr7vvvlsXXXSRzj//fC1ZskTPPPOMhg4dKklKJBI68cQT9fnnn+vll1/Wiy++qI8++kinnHJK5/3POOMMDRo0SPPnz9eCBQt0xRVXyLKslNf78MMP9dRTT+nZZ5/Vs88+q5dfflk33XRT5/rW38fvvPOOfvSjH+nMM8/Uyy+/nPFjSSQSGjRokB5//HG9++67mjp1qv7v//5Pjz32WMb7brFljMicOXP0u9/9Tvfcc4/+9a9/dTvummuu0YQJE/T222/r2GOP1RlnnKHPP/9ckvTFF1/o61//ukaOHKk333xTzz//vNasWaMJEyZ03v/SSy/Vyy+/rKefflp//vOfNWfOHC1cmH6zy9dee02hUEh77rlnl9tz/dmR7vtL2vzy6W27R7YWiUTk9/u7dB0Hg8HOmiVp2LBh6tOnj+6//35Fo1G1t7fr/vvv15577qkhQ4akPHc4HNbpp5+uu+66S/3790/7+Umlra1Nxx57rGbPnq1Fixbp6KOP1vHHH69PP/00q3Mcdthh+uyzz/TMM8/orbfe0mWXXdb5MsYto2HmzJmT8hxz587VuHHjutw2fvx4zZ07N+V9IpGIqquru9wWDAb1z3/+UytWrEh7zBtvvJGye/r+++/Xqaee2uXlm5I0ZswYvfrqqynrKQRjjGKbNhXkze7v93//+9/685//rIsuuqjb53SLbTvU0/0M+eyzz3Tsscfqq1/9qt566y3dfffduv/++3XddddJklatWqXTTjtN3/3ud7Vs2TLNmTNH3/zmN2WMUVNTkyZMmNDl1UQHHnhg2vrd/D1000036Xe/+53efPPNpLVk+vl5xx136IADDtB5553X+fE1NDSk/fgyfT63ePDBB1VVVaU33nhDd9xxh2677Tbdd999nesXX3yx5s6dq1mzZuntt9/WySefrKOPPrpLx3I4HNatt96qhx9+WK+88oo+/fRTNTU1da6n+517xhln6A9/+EOXl2e/8MILCofD+n//7/+l/Ril9F+jjRs3avz48dp+++01f/58Pf7443rppZd08cUXS5I6Ojp00kkn6bDDDtPbb7+tuXPn6vzzz0/7yoq//vWv+vDDD/XXv/61sztx6zE1dj5fucpUQywW07XXXqu33npLTz31lD755JO0v8+29etf/1rXX3+9br75Zi1YsEA777yz7r777qzryPS5mDdvns455xxdfPHFWrx4sY444ohu35/JvPbaa9p///273LZhwwZNnDhRr732mv7+979r991317HHHqsNGzZI2vxY6ZhjjtHrr7+uRx55RO+++65uuukm+Xw+SZkfMzzwwANpvy86OjoUj8eT/l7a8phgW9FoVPfcc4/q6uq07777Zvy4pc0dsrNmzdLGjRt1wAEH2LqP5MxjRWnz48Xf/OY3+vnPf65ly5bpV7/6lWprazvXhwwZoquvvjrl/efOnau99967y+Ot8ePHq7W1NWXHsp3HWy+++KISiYQ+++wz7bnnnho0aJAmTJiglpaWlLXc
gitextract_icnp_eu4/
├── .codeboarding/
│ ├── External_Integration_Layer.md
│ ├── Facial_Analysis_Engine.md
│ ├── Model_Management_System.md
│ ├── Utility_Infrastructure_Layer.md
│ └── on_boarding.md
├── .gitattributes
├── .github/
│ ├── CODE_OF_CONDUCT.md
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── 01-report-bug.yaml
│ │ ├── 02-request-feature.yaml
│ │ ├── 03-documentation.yaml
│ │ └── config.yml
│ ├── pull_request_template.md
│ └── workflows/
│ └── tests.yml
├── .gitignore
├── .pylintrc
├── .vscode/
│ └── settings.json
├── CITATION.cff
├── Dockerfile
├── LICENSE
├── Makefile
├── README.md
├── benchmarks/
│ ├── Evaluate-Results.ipynb
│ ├── Perform-Experiments.ipynb
│ └── README.md
├── boosted/
│ ├── Perform-Boosting-Experiments-LightGBM.ipynb
│ ├── Perform-Boosting-Experiments-XGBoost.ipynb
│ └── models/
│ └── boosted_lightface_7.txt
├── deepface/
│ ├── DeepFace.py
│ ├── __init__.py
│ ├── api/
│ │ ├── __init__.py
│ │ ├── postman/
│ │ │ └── deepface-api.postman_collection.json
│ │ └── src/
│ │ ├── __init__.py
│ │ ├── app.py
│ │ ├── dependencies/
│ │ │ ├── __init__.py
│ │ │ ├── container.py
│ │ │ └── variables.py
│ │ └── modules/
│ │ ├── __init__.py
│ │ ├── auth/
│ │ │ ├── __init__.py
│ │ │ └── service.py
│ │ └── core/
│ │ ├── __init__.py
│ │ ├── routes.py
│ │ └── service.py
│ ├── commons/
│ │ ├── __init__.py
│ │ ├── constant.py
│ │ ├── embed_utils.py
│ │ ├── folder_utils.py
│ │ ├── image_utils.py
│ │ ├── logger.py
│ │ ├── package_utils.py
│ │ └── weight_utils.py
│ ├── config/
│ │ ├── __init__.py
│ │ ├── confidence.py
│ │ ├── minmax.py
│ │ └── threshold.py
│ ├── models/
│ │ ├── Demography.py
│ │ ├── Detector.py
│ │ ├── FacialRecognition.py
│ │ ├── __init__.py
│ │ ├── demography/
│ │ │ ├── Age.py
│ │ │ ├── Emotion.py
│ │ │ ├── Gender.py
│ │ │ ├── Race.py
│ │ │ └── __init__.py
│ │ ├── face_detection/
│ │ │ ├── CenterFace.py
│ │ │ ├── Dlib.py
│ │ │ ├── FastMtCnn.py
│ │ │ ├── MediaPipe.py
│ │ │ ├── MtCnn.py
│ │ │ ├── OpenCv.py
│ │ │ ├── RetinaFace.py
│ │ │ ├── Ssd.py
│ │ │ ├── Yolo.py
│ │ │ ├── YuNet.py
│ │ │ └── __init__.py
│ │ ├── facial_recognition/
│ │ │ ├── ArcFace.py
│ │ │ ├── Buffalo_L.py
│ │ │ ├── DeepID.py
│ │ │ ├── Dlib.py
│ │ │ ├── Facenet.py
│ │ │ ├── FbDeepFace.py
│ │ │ ├── GhostFaceNet.py
│ │ │ ├── OpenFace.py
│ │ │ ├── SFace.py
│ │ │ ├── VGGFace.py
│ │ │ └── __init__.py
│ │ └── spoofing/
│ │ ├── FasNet.py
│ │ ├── FasNetBackbone.py
│ │ └── __init__.py
│ └── modules/
│ ├── __init__.py
│ ├── database/
│ │ ├── __init__.py
│ │ ├── inventory.py
│ │ ├── mongo.py
│ │ ├── neo4j.py
│ │ ├── pgvector.py
│ │ ├── pinecone.py
│ │ ├── postgres.py
│ │ ├── types.py
│ │ └── weaviate.py
│ ├── datastore.py
│ ├── demography.py
│ ├── detection.py
│ ├── encryption.py
│ ├── exceptions.py
│ ├── modeling.py
│ ├── normalization.py
│ ├── preprocessing.py
│ ├── recognition.py
│ ├── representation.py
│ ├── streaming.py
│ └── verification.py
├── docker/
│ ├── docker-compose.yml
│ ├── integration.sh
│ ├── pgvector-init/
│ │ └── 01_pgvector.sql
│ └── postgres-init/
│ └── 001_create_table.sql
├── entrypoint.sh
├── experiments/
│ └── distance-to-confidence.ipynb
├── mypy.ini
├── package_info.json
├── requirements-dev.txt
├── requirements.txt
├── requirements_additional.txt
├── requirements_local
├── scripts/
│ ├── dockerize.sh
│ ├── push-release.sh
│ └── service.sh
├── setup.py
└── tests/
├── integration/
│ ├── test_postgres_register.py
│ └── test_postgres_search.py
└── unit/
├── dataset/
│ ├── face-recognition-pivot.csv
│ └── master.csv
├── face-recognition-how.py
├── overlay.py
├── stream.py
├── test_analyze.py
├── test_api.py
├── test_commons.py
├── test_encrypt.py
├── test_enforce_detection.py
├── test_extract_faces.py
├── test_find.py
├── test_find_batched.py
├── test_landmark_sanitization.py
├── test_output_normalization.py
├── test_represent.py
├── test_signature.py
├── test_singleton.py
├── test_verify.py
├── test_version.py
└── visual-test.py
SYMBOL INDEX (529 symbols across 81 files)
FILE: deepface/DeepFace.py
function build_model (line 54) | def build_model(model_name: str, task: str = "facial_recognition") -> Any:
function verify (line 75) | def verify(
function analyze (line 178) | def analyze(
function find (line 281) | def find(
function represent (line 420) | def represent(
function stream (line 523) | def stream(
function extract_faces (line 591) | def extract_faces(
function cli (line 665) | def cli() -> None:
function detectFace (line 677) | def detectFace(
function register (line 724) | def register(
function search (line 797) | def search(
function build_index (line 905) | def build_index(
FILE: deepface/api/src/app.py
function create_app (line 22) | def create_app() -> Flask:
function load_models_on_startup (line 41) | def load_models_on_startup(variables: Variables) -> None:
FILE: deepface/api/src/dependencies/container.py
class Container (line 7) | class Container:
method __init__ (line 8) | def __init__(self, variables: Variables) -> None:
FILE: deepface/api/src/dependencies/variables.py
class Variables (line 9) | class Variables:
method __init__ (line 10) | def __init__(self) -> None:
FILE: deepface/api/src/modules/auth/service.py
class AuthService (line 11) | class AuthService:
method __init__ (line 12) | def __init__(self, auth_token: Optional[str] = None) -> None:
method extract_token (line 16) | def extract_token(self, auth_header: Optional[str]) -> Optional[str]:
method validate (line 24) | def validate(self, headers: Dict[str, Any]) -> bool:
FILE: deepface/api/src/modules/core/routes.py
function home (line 25) | def home() -> str:
function extract_image_from_request (line 29) | def extract_image_from_request(img_key: str) -> Union[str, NDArray[Any]]:
function represent (line 77) | def represent() -> Tuple[Dict[str, Any], int]:
function verify (line 110) | def verify() -> Tuple[Dict[str, Any], int]:
function analyze (line 147) | def analyze() -> Tuple[Dict[str, Any], int]:
function register (line 192) | def register() -> Tuple[Dict[str, Any], int]:
function search (line 238) | def search() -> Tuple[Dict[str, Any], int]:
function build_index (line 280) | def build_index() -> Tuple[Dict[str, Any], int]:
FILE: deepface/api/src/modules/core/service.py
function represent (line 18) | def represent(
function verify (line 47) | def verify(
function analyze (line 76) | def analyze(
function register (line 104) | def register(
function search (line 143) | def search(
function build_index (line 190) | def build_index(
FILE: deepface/commons/embed_utils.py
function is_flat_embedding (line 4) | def is_flat_embedding(x: Union[List[float], List[List[float]]]) -> bool:
FILE: deepface/commons/folder_utils.py
function initialize_folder (line 7) | def initialize_folder() -> None:
function get_deepface_home (line 27) | def get_deepface_home() -> str:
FILE: deepface/commons/image_utils.py
function list_images (line 25) | def list_images(path: str) -> List[str]:
function yield_images (line 44) | def yield_images(path: str) -> Generator[str, None, None]:
function find_image_hash (line 61) | def find_image_hash(file_path: str) -> str:
function load_image (line 84) | def load_image(
function load_image_from_io_object (line 135) | def load_image_from_io_object(obj: IO[bytes]) -> NDArray[Any]:
function load_image_from_base64 (line 161) | def load_image_from_base64(uri: str) -> NDArray[Any]:
function load_image_from_file_storage (line 191) | def load_image_from_file_storage(file: FileStorage) -> NDArray[Any]:
function load_image_from_web (line 206) | def load_image_from_web(url: str) -> NDArray[Any]:
FILE: deepface/commons/logger.py
class Logger (line 8) | class Logger:
method __new__ (line 19) | def __new__(cls) -> "Logger":
method __init__ (line 24) | def __init__(self) -> None:
method info (line 38) | def info(self, message: Any) -> None:
method debug (line 47) | def debug(self, message: Any) -> None:
method warn (line 56) | def warn(self, message: Any) -> None:
method error (line 65) | def error(self, message: Any) -> None:
method critical (line 74) | def critical(self, message: Any) -> None:
method dump_log (line 83) | def dump_log(self, message: Any) -> None:
FILE: deepface/commons/package_utils.py
function get_tf_major_version (line 13) | def get_tf_major_version() -> int:
function get_tf_minor_version (line 22) | def get_tf_minor_version() -> int:
function validate_for_keras3 (line 31) | def validate_for_keras3() -> None:
function find_file_hash (line 52) | def find_file_hash(file_path: str, hash_algorithm: str = "sha256") -> str:
FILE: deepface/commons/weight_utils.py
function download_weights_if_necessary (line 29) | def download_weights_if_necessary(
function load_model_weights (line 81) | def load_model_weights(model: Sequential, weight_file: str) -> Sequential:
function download_all_models_in_one_shot (line 104) | def download_all_models_in_one_shot() -> None:
FILE: deepface/config/minmax.py
function get_minmax_values (line 16) | def get_minmax_values(model_name: str) -> Tuple[float, float]:
FILE: deepface/models/Demography.py
class Demography (line 22) | class Demography(ABC):
method predict (line 27) | def predict(
method _predict_internal (line 32) | def _predict_internal(self, img_batch: NDArray[Any]) -> NDArray[Any]:
method _preprocess_batch_or_single_input (line 58) | def _preprocess_batch_or_single_input(
FILE: deepface/models/Detector.py
class Detector (line 13) | class Detector(ABC):
method detect_faces (line 15) | def detect_faces(self, img: NDArray[Any]) -> List["FacialAreaRegion"]:
class FacialAreaRegion (line 35) | class FacialAreaRegion:
class DetectedFace (line 65) | class DetectedFace:
FILE: deepface/models/FacialRecognition.py
class FacialRecognition (line 23) | class FacialRecognition(ABC):
method forward (line 29) | def forward(self, img: NDArray[Any]) -> Union[List[float], List[List[f...
FILE: deepface/models/demography/Age.py
class ApparentAgeClient (line 33) | class ApparentAgeClient(Demography):
method __init__ (line 38) | def __init__(self) -> None:
method predict (line 42) | def predict(
function load_model (line 68) | def load_model(
function find_apparent_age (line 103) | def find_apparent_age(age_predictions: NDArray[Any]) -> np.float64:
FILE: deepface/models/demography/Emotion.py
class EmotionClient (line 41) | class EmotionClient(Demography):
method __init__ (line 46) | def __init__(self) -> None:
method _preprocess_image (line 50) | def _preprocess_image(self, img: NDArray[Any]) -> NDArray[Any]:
method predict (line 62) | def predict(self, img: Union[NDArray[Any], List[NDArray[Any]]]) -> NDA...
function load_model (line 86) | def load_model(
FILE: deepface/models/demography/Gender.py
class GenderClient (line 38) | class GenderClient(Demography):
method __init__ (line 43) | def __init__(self) -> None:
method predict (line 47) | def predict(self, img: Union[NDArray[Any], List[NDArray[Any]]]) -> NDA...
function load_model (line 66) | def load_model(
FILE: deepface/models/demography/Race.py
class RaceClient (line 35) | class RaceClient(Demography):
method __init__ (line 40) | def __init__(self) -> None:
method predict (line 44) | def predict(self, img: Union[NDArray[Any], List[NDArray[Any]]]) -> NDA...
function load_model (line 64) | def load_model(
FILE: deepface/models/face_detection/CenterFace.py
class CenterFaceClient (line 22) | class CenterFaceClient(Detector):
method __init__ (line 23) | def __init__(self) -> None:
method build_model (line 28) | def build_model(self) -> "CenterFace":
method detect_faces (line 38) | def detect_faces(self, img: NDArray[Any]) -> List["FacialAreaRegion"]:
class CenterFace (line 90) | class CenterFace:
method __init__ (line 96) | def __init__(self, weight_path: str) -> None:
method forward (line 103) | def forward(self, img: NDArray[Any], height: int, width: int, threshol...
method inference_opencv (line 107) | def inference_opencv(self, img: NDArray[Any], threshold: float) -> Any:
method transform (line 120) | def transform(self, h: int, w: int) -> Tuple[int, int, float, float]:
method postprocess (line 125) | def postprocess(
method decode (line 150) | def decode(
method nms (line 187) | def nms(self, boxes: NDArray[Any], scores: NDArray[Any], nms_thresh: f...
FILE: deepface/models/face_detection/Dlib.py
class DlibClient (line 17) | class DlibClient(Detector):
method __init__ (line 18) | def __init__(self) -> None:
method build_model (line 21) | def build_model(self) -> Dict[str, Any]:
method detect_faces (line 51) | def detect_faces(self, img: NDArray[Any]) -> List[FacialAreaRegion]:
FILE: deepface/models/face_detection/FastMtCnn.py
class FastMtCnnClient (line 12) | class FastMtCnnClient(Detector):
method __init__ (line 17) | def __init__(self) -> None:
method detect_faces (line 21) | def detect_faces(self, img: NDArray[Any]) -> List[FacialAreaRegion]:
method build_model (line 64) | def build_model(self) -> Any:
function xyxy_to_xywh (line 86) | def xyxy_to_xywh(
FILE: deepface/models/face_detection/MediaPipe.py
class MediaPipeClient (line 12) | class MediaPipeClient(Detector):
method __init__ (line 17) | def __init__(self) -> None:
method build_model (line 20) | def build_model(self) -> Any:
method detect_faces (line 45) | def detect_faces(self, img: NDArray[Any]) -> List[FacialAreaRegion]:
FILE: deepface/models/face_detection/MtCnn.py
class MtCnnClient (line 14) | class MtCnnClient(Detector):
method __init__ (line 19) | def __init__(self) -> None:
method detect_faces (line 24) | def detect_faces(self, img: NDArray[Any]) -> List[FacialAreaRegion]:
FILE: deepface/models/face_detection/OpenCv.py
class OpenCvClient (line 14) | class OpenCvClient(Detector):
method __init__ (line 19) | def __init__(self) -> None:
method build_model (line 23) | def build_model(self) -> Dict[str, Any]:
method detect_faces (line 34) | def detect_faces(self, img: NDArray[Any]) -> List[FacialAreaRegion]:
method find_eyes (line 84) | def find_eyes(
method __build_cascade (line 143) | def __build_cascade(self, model_name: str = "haarcascade") -> Any:
method __get_opencv_path (line 175) | def __get_opencv_path(self) -> str:
FILE: deepface/models/face_detection/RetinaFace.py
class RetinaFaceClient (line 13) | class RetinaFaceClient(Detector):
method __init__ (line 14) | def __init__(self) -> None:
method detect_faces (line 18) | def detect_faces(self, img: NDArray[Any]) -> List[FacialAreaRegion]:
FILE: deepface/models/face_detection/Ssd.py
class SsdClient (line 23) | class SsdClient(Detector):
method __init__ (line 24) | def __init__(self) -> None:
method build_model (line 27) | def build_model(self) -> Any:
method detect_faces (line 57) | def detect_faces(self, img: NDArray[Any]) -> List[FacialAreaRegion]:
FILE: deepface/models/face_detection/Yolo.py
class YoloModel (line 17) | class YoloModel(Enum):
method __init__ (line 61) | def __init__(self, file_name: str, url: str):
class YoloDetectorClient (line 66) | class YoloDetectorClient(Detector):
method __init__ (line 67) | def __init__(self, model: YoloModel):
method build_model (line 71) | def build_model(self, model: YoloModel) -> Any:
method detect_faces (line 103) | def detect_faces(self, img: NDArray[Any]) -> List[FacialAreaRegion]:
class YoloDetectorClientV8n (line 163) | class YoloDetectorClientV8n(YoloDetectorClient):
method __init__ (line 164) | def __init__(self) -> None:
class YoloDetectorClientV8m (line 168) | class YoloDetectorClientV8m(YoloDetectorClient):
method __init__ (line 169) | def __init__(self) -> None:
class YoloDetectorClientV8l (line 173) | class YoloDetectorClientV8l(YoloDetectorClient):
method __init__ (line 174) | def __init__(self) -> None:
class YoloDetectorClientV11n (line 178) | class YoloDetectorClientV11n(YoloDetectorClient):
method __init__ (line 179) | def __init__(self) -> None:
class YoloDetectorClientV11s (line 183) | class YoloDetectorClientV11s(YoloDetectorClient):
method __init__ (line 184) | def __init__(self) -> None:
class YoloDetectorClientV11m (line 188) | class YoloDetectorClientV11m(YoloDetectorClient):
method __init__ (line 189) | def __init__(self) -> None:
class YoloDetectorClientV11l (line 193) | class YoloDetectorClientV11l(YoloDetectorClient):
method __init__ (line 194) | def __init__(self) -> None:
class YoloDetectorClientV12n (line 198) | class YoloDetectorClientV12n(YoloDetectorClient):
method __init__ (line 199) | def __init__(self) -> None:
class YoloDetectorClientV12s (line 203) | class YoloDetectorClientV12s(YoloDetectorClient):
method __init__ (line 204) | def __init__(self) -> None:
class YoloDetectorClientV12m (line 208) | class YoloDetectorClientV12m(YoloDetectorClient):
method __init__ (line 209) | def __init__(self) -> None:
class YoloDetectorClientV12l (line 213) | class YoloDetectorClientV12l(YoloDetectorClient):
method __init__ (line 214) | def __init__(self) -> None:
FILE: deepface/models/face_detection/YuNet.py
class YuNetClient (line 20) | class YuNetClient(Detector):
method __init__ (line 21) | def __init__(self) -> None:
method build_model (line 24) | def build_model(self) -> Any:
method detect_faces (line 60) | def detect_faces(self, img: NDArray[Any]) -> List[FacialAreaRegion]:
FILE: deepface/models/facial_recognition/ArcFace.py
class ArcFaceClient (line 52) | class ArcFaceClient(FacialRecognition):
method __init__ (line 57) | def __init__(self) -> None:
function load_model (line 64) | def load_model(
function ResNet34 (line 97) | def ResNet34() -> Model:
function block1 (line 118) | def block1(
function stack1 (line 171) | def stack1(x: Any, filters: int, blocks: int, stride1: int = 2, name: st...
function stack_fn (line 178) | def stack_fn(x: Any) -> Any:
FILE: deepface/models/facial_recognition/Buffalo_L.py
class Buffalo_L (line 18) | class Buffalo_L(FacialRecognition):
method __init__ (line 19) | def __init__(self) -> None:
method load_model (line 25) | def load_model(self) -> None:
method preprocess (line 60) | def preprocess(self, img: NDArray[Any]) -> NDArray[Any]:
method forward (line 81) | def forward(self, img: NDArray[Any]) -> Union[List[float], List[List[f...
FILE: deepface/models/facial_recognition/DeepID.py
class DeepIdClient (line 43) | class DeepIdClient(FacialRecognition):
method __init__ (line 48) | def __init__(self) -> None:
function load_model (line 55) | def load_model(
FILE: deepface/models/facial_recognition/Dlib.py
class DlibClient (line 19) | class DlibClient(FacialRecognition):
method __init__ (line 24) | def __init__(self) -> None:
method forward (line 30) | def forward(self, img: NDArray[Any]) -> Union[List[float], List[List[f...
class DlibResNet (line 60) | class DlibResNet:
method __init__ (line 61) | def __init__(self) -> None:
FILE: deepface/models/facial_recognition/Facenet.py
class FaceNet128dClient (line 60) | class FaceNet128dClient(FacialRecognition):
method __init__ (line 65) | def __init__(self) -> None:
class FaceNet512dClient (line 72) | class FaceNet512dClient(FacialRecognition):
method __init__ (line 77) | def __init__(self) -> None:
function scaling (line 84) | def scaling(x: NDArray[Any], scale: float) -> NDArray[Any]:
function InceptionResNetV1 (line 88) | def InceptionResNetV1(dimension: int = 128) -> Model:
function load_facenet128d_model (line 1671) | def load_facenet128d_model(
function load_facenet512d_model (line 1691) | def load_facenet512d_model(
FILE: deepface/models/facial_recognition/FbDeepFace.py
class DeepFaceClient (line 37) | class DeepFaceClient(FacialRecognition):
method __init__ (line 42) | def __init__(self) -> None:
function load_model (line 57) | def load_model(
FILE: deepface/models/facial_recognition/GhostFaceNet.py
class GhostFaceNetClient (line 57) | class GhostFaceNetClient(FacialRecognition):
method __init__ (line 66) | def __init__(self) -> None:
function load_model (line 73) | def load_model() -> Model:
function GhostFaceNetV1 (line 85) | def GhostFaceNetV1() -> Model:
function se_module (line 158) | def se_module(inputs: Any, reduction: int) -> Any:
function ghost_module (line 198) | def ghost_module(
function ghost_bottleneck (line 234) | def ghost_bottleneck(
function replace_relu_with_prelu (line 294) | def replace_relu_with_prelu(model: Model) -> Model:
FILE: deepface/models/facial_recognition/OpenFace.py
class OpenFaceClient (line 35) | class OpenFaceClient(FacialRecognition):
method __init__ (line 40) | def __init__(self) -> None:
function load_model (line 47) | def load_model(
FILE: deepface/models/facial_recognition/SFace.py
class SFaceClient (line 20) | class SFaceClient(FacialRecognition):
method __init__ (line 25) | def __init__(self) -> None:
method forward (line 31) | def forward(self, img: NDArray[Any]) -> Union[List[float], List[List[f...
function load_model (line 54) | def load_model(
class SFaceWrapper (line 70) | class SFaceWrapper:
method __init__ (line 71) | def __init__(self, model_path: str) -> None:
FILE: deepface/models/facial_recognition/VGGFace.py
class VggFaceClient (line 47) | class VggFaceClient(FacialRecognition):
method __init__ (line 52) | def __init__(self) -> None:
method forward (line 58) | def forward(self, img: NDArray[Any]) -> List[float]:
function base_model (line 83) | def base_model() -> Sequential:
function load_model (line 137) | def load_model(
FILE: deepface/models/spoofing/FasNet.py
class Fasnet (line 20) | class Fasnet:
method __init__ (line 28) | def __init__(self) -> None:
method analyze (line 99) | def analyze(
function to_tensor (line 152) | def to_tensor(pic: NDArray[Any]) -> Any:
class Compose (line 176) | class Compose:
method __init__ (line 177) | def __init__(self, transforms: List[Any]) -> None:
method __call__ (line 180) | def __call__(self, img: NDArray[Any]) -> NDArray[Any]:
class ToTensor (line 186) | class ToTensor:
method __call__ (line 187) | def __call__(self, pic: Any) -> Any:
function _get_new_box (line 191) | def _get_new_box(
function crop (line 224) | def crop(
FILE: deepface/models/spoofing/FasNetBackbone.py
function MiniFASNetV2 (line 131) | def MiniFASNetV2(
function MiniFASNetV1SE (line 143) | def MiniFASNetV1SE(
class Flatten (line 155) | class Flatten(Module): # type: ignore[misc]
method forward (line 156) | def forward(self, input: Any) -> Any:
class Conv_block (line 160) | class Conv_block(Module): # type: ignore[misc]
method __init__ (line 161) | def __init__(
method forward (line 183) | def forward(self, x: Any) -> Any:
class Linear_block (line 190) | class Linear_block(Module): # type: ignore[misc]
method __init__ (line 191) | def __init__(
method forward (line 212) | def forward(self, x: Any) -> Any:
class Depth_Wise (line 218) | class Depth_Wise(Module): # type: ignore[misc]
method __init__ (line 219) | def __init__(
method forward (line 241) | def forward(self, x: Any) -> Any:
class Depth_Wise_SE (line 254) | class Depth_Wise_SE(Module): # type: ignore[misc]
method __init__ (line 255) | def __init__(
method forward (line 279) | def forward(self, x: Any) -> Any:
class SEModule (line 293) | class SEModule(Module): # type: ignore[misc]
method __init__ (line 294) | def __init__(self, channels: int, reduction: int):
method forward (line 304) | def forward(self, x: Any) -> Any:
class Residual (line 316) | class Residual(Module): # type: ignore[misc]
method __init__ (line 317) | def __init__(
method forward (line 348) | def forward(self, x: Any) -> Any:
class ResidualSE (line 352) | class ResidualSE(Module): # type: ignore[misc]
method __init__ (line 353) | def __init__(
method forward (line 400) | def forward(self, x: Any) -> Any:
class MiniFASNet (line 404) | class MiniFASNet(Module): # type: ignore[misc]
method __init__ (line 405) | def __init__(
method forward (line 502) | def forward(self, x: Any) -> Any:
class MiniFASNetSE (line 522) | class MiniFASNetSE(MiniFASNet):
method __init__ (line 523) | def __init__(
FILE: deepface/modules/database/inventory.py
class DatabaseSpec (line 14) | class DatabaseSpec(TypedDict):
FILE: deepface/modules/database/mongo.py
class MongoDbClient (line 21) | class MongoDbClient(Database):
method __init__ (line 26) | def __init__(
method close (line 67) | def close(self) -> None:
method initialize_database (line 71) | def initialize_database(self, **kwargs: Any) -> None:
method upsert_embeddings_index (line 101) | def upsert_embeddings_index(
method get_embeddings_index (line 137) | def get_embeddings_index(
method insert_embeddings (line 174) | def insert_embeddings(self, embeddings: List[Dict[str, Any]], batch_si...
method fetch_all_embeddings (line 235) | def fetch_all_embeddings(
method search_by_id (line 288) | def search_by_id(
FILE: deepface/modules/database/neo4j.py
class Neo4jClient (line 22) | class Neo4jClient(Database):
method __init__ (line 23) | def __init__(
method close (line 62) | def close(self) -> None:
method initialize_database (line 70) | def initialize_database(self, **kwargs: Any) -> None:
method insert_embeddings (line 119) | def insert_embeddings(self, embeddings: List[Dict[str, Any]], batch_si...
method fetch_all_embeddings (line 187) | def fetch_all_embeddings(
method search_by_vector (line 245) | def search_by_vector(
method __is_gds_installed (line 317) | def __is_gds_installed(self) -> bool:
method __generate_node_label (line 332) | def __generate_node_label(
FILE: deepface/modules/database/pgvector.py
class PGVectorClient (line 24) | class PGVectorClient(Database):
method __init__ (line 25) | def __init__(
method close (line 85) | def close(self) -> None:
method initialize_database (line 89) | def initialize_database(self, **kwargs: Any) -> None:
method insert_embeddings (line 168) | def insert_embeddings(self, embeddings: List[Dict[str, Any]], batch_si...
method fetch_all_embeddings (line 254) | def fetch_all_embeddings(
method search_by_vector (line 307) | def search_by_vector(
method __generate_table_name (line 369) | def __generate_table_name(
FILE: deepface/modules/database/pinecone.py
class PineconeClient (line 17) | class PineconeClient(Database):
method __init__ (line 22) | def __init__(
method initialize_database (line 49) | def initialize_database(self, **kwargs: Any) -> None:
method insert_embeddings (line 81) | def insert_embeddings(self, embeddings: List[Dict[str, Any]], batch_si...
method search_by_vector (line 131) | def search_by_vector(
method fetch_all_embeddings (line 183) | def fetch_all_embeddings(
method close (line 231) | def close(self) -> None:
method __generate_index_name (line 236) | def __generate_index_name(
FILE: deepface/modules/database/postgres.py
class PostgresClient (line 55) | class PostgresClient(Database):
method __init__ (line 56) | def __init__(
method initialize_database (line 94) | def initialize_database(self, **kwargs: Any) -> None:
method close (line 126) | def close(self) -> None:
method upsert_embeddings_index (line 130) | def upsert_embeddings_index(
method get_embeddings_index (line 162) | def get_embeddings_index(
method insert_embeddings (line 198) | def insert_embeddings(self, embeddings: List[Dict[str, Any]], batch_si...
method fetch_all_embeddings (line 270) | def fetch_all_embeddings(
method search_by_id (line 309) | def search_by_id(
FILE: deepface/modules/database/types.py
class Database (line 7) | class Database(ABC):
method __init__ (line 9) | def __init__(
method initialize_database (line 20) | def initialize_database(self, **kwargs: Any) -> None:
method insert_embeddings (line 27) | def insert_embeddings(self, embeddings: List[Dict[str, Any]], batch_si...
method fetch_all_embeddings (line 34) | def fetch_all_embeddings(
method close (line 48) | def close(self) -> None:
method get_embeddings_index (line 54) | def get_embeddings_index(
method search_by_vector (line 69) | def search_by_vector(
method search_by_id (line 85) | def search_by_id(
method upsert_embeddings_index (line 97) | def upsert_embeddings_index(
FILE: deepface/modules/database/weaviate.py
class WeaviateClient (line 22) | class WeaviateClient(Database):
method __init__ (line 27) | def __init__(
method initialize_database (line 66) | def initialize_database(self, **kwargs: Any) -> None:
method insert_embeddings (line 121) | def insert_embeddings(self, embeddings: List[Dict[str, Any]], batch_si...
method fetch_all_embeddings (line 188) | def fetch_all_embeddings(
method search_by_vector (line 234) | def search_by_vector(
method close (line 283) | def close(self) -> None:
method __generate_class_name (line 290) | def __generate_class_name(
FILE: deepface/modules/datastore.py
function register (line 34) | def register(
function search (line 139) | def search(
function build_index (line 478) | def build_index(
function __get_embeddings (line 628) | def __get_embeddings(
function __connect_database (line 692) | def __connect_database(
function __get_index (line 725) | def __get_index(
FILE: deepface/modules/demography.py
function analyze (line 16) | def analyze(
FILE: deepface/modules/detection.py
function is_valid_landmark (line 24) | def is_valid_landmark(
function extract_faces (line 47) | def extract_faces(
function detect_faces (line 264) | def detect_faces(
function extract_face (line 344) | def extract_face(
function extract_sub_image (line 456) | def extract_sub_image(
function align_img_wrt_eyes (line 508) | def align_img_wrt_eyes(
function project_facial_area (line 542) | def project_facial_area(
FILE: deepface/modules/encryption.py
function encrypt_embeddings (line 17) | def encrypt_embeddings(
function encrypt_embedding (line 49) | def encrypt_embedding(embeddings: List[float], cryptosystem: LightPHE) -...
FILE: deepface/modules/exceptions.py
class ImgNotFound (line 4) | class ImgNotFound(ValueError):
class PathNotFound (line 10) | class PathNotFound(ValueError):
class FaceNotDetected (line 16) | class FaceNotDetected(ValueError):
class SpoofDetected (line 22) | class SpoofDetected(ValueError):
class EmptyDatasource (line 28) | class EmptyDatasource(ValueError):
class DimensionMismatchError (line 34) | class DimensionMismatchError(ValueError):
class InvalidEmbeddingsShapeError (line 40) | class InvalidEmbeddingsShapeError(ValueError):
class DataTypeError (line 46) | class DataTypeError(ValueError):
class UnimplementedError (line 52) | class UnimplementedError(ValueError):
class DuplicateEntryError (line 58) | class DuplicateEntryError(ValueError):
FILE: deepface/modules/modeling.py
class AvailableModels (line 43) | class AvailableModels(TypedDict):
function build_model (line 98) | def build_model(task: str, model_name: str) -> Any:
FILE: deepface/modules/normalization.py
function normalize_embedding_minmax (line 12) | def normalize_embedding_minmax(
function normalize_embedding_l2 (line 53) | def normalize_embedding_l2(
FILE: deepface/modules/preprocessing.py
function normalize_input (line 20) | def normalize_input(img: NDArray[Any], normalization: str = "base") -> N...
function resize_image (line 78) | def resize_image(img: NDArray[Any], target_size: Tuple[int, int]) -> NDA...
FILE: deepface/modules/recognition.py
function find (line 31) | def find(
function __find_bulk_embeddings (line 414) | def __find_bulk_embeddings(
function find_batched (line 518) | def find_batched(
function __save_representations (line 697) | def __save_representations(
function __load_representations (line 718) | def __load_representations(
function __build_dsa (line 745) | def __build_dsa(credentials: Union[LightDSA, Dict[str, Any]]) -> LightDSA:
function __sign_datastore (line 769) | def __sign_datastore(
function __verify_signature (line 796) | def __verify_signature(
FILE: deepface/modules/representation.py
function represent (line 23) | def represent(
FILE: deepface/modules/streaming.py
function analysis (line 28) | def analysis(
function build_facial_recognition_model (line 226) | def build_facial_recognition_model(model_name: str) -> None:
function search_identity (line 239) | def search_identity(
function build_demography_models (line 334) | def build_demography_models(enable_face_analysis: bool) -> None:
function highlight_facial_areas (line 352) | def highlight_facial_areas(
function countdown_to_freeze (line 381) | def countdown_to_freeze(
function countdown_to_release (line 410) | def countdown_to_release(
function grab_facial_areas (line 440) | def grab_facial_areas(
function extract_facial_areas (line 485) | def extract_facial_areas(
function perform_facial_recognition (line 504) | def perform_facial_recognition(
function perform_demography_analysis (line 561) | def perform_demography_analysis(
function overlay_identified_face (line 612) | def overlay_identified_face(
function overlay_emotion (line 868) | def overlay_emotion(
function overlay_age_gender (line 982) | def overlay_age_gender(
FILE: deepface/modules/verification.py
function verify (line 27) | def verify(
function __extract_faces_and_embeddings (line 243) | def __extract_faces_and_embeddings(
function find_cosine_distance (line 296) | def find_cosine_distance(
function find_angular_distance (line 334) | def find_angular_distance(
function find_euclidean_distance (line 377) | def find_euclidean_distance(
function l2_normalize (line 414) | def l2_normalize(
function find_distance (line 433) | def find_distance(
function find_threshold (line 477) | def find_threshold(model_name: str, distance_metric: str) -> float:
function __sigmoid (line 502) | def __sigmoid(z: float) -> float:
function find_confidence (line 525) | def find_confidence(
FILE: docker/postgres-init/001_create_table.sql
type embeddings (line 3) | CREATE TABLE IF NOT EXISTS embeddings (
type embeddings_index (line 21) | CREATE TABLE IF NOT EXISTS embeddings_index (
FILE: tests/integration/test_postgres_register.py
function flush_data (line 28) | def flush_data():
function test_regsiter_with_json (line 38) | def test_regsiter_with_json(flush_data):
function test_register_with_string (line 50) | def test_register_with_string(flush_data):
function test_register_with_envvar (line 63) | def test_register_with_envvar(flush_data):
function test_register_with_connection (line 74) | def test_register_with_connection(flush_data):
function test_register_duplicate (line 88) | def test_register_duplicate(flush_data):
FILE: tests/integration/test_postgres_search.py
function flush_data (line 28) | def flush_data():
function load_data (line 39) | def load_data():
function test_postgres_search (line 64) | def test_postgres_search(flush_data, load_data):
FILE: tests/unit/test_analyze.py
function test_standard_analyze (line 16) | def test_standard_analyze():
function test_analyze_with_all_actions_as_tuple (line 31) | def test_analyze_with_all_actions_as_tuple():
function test_analyze_with_all_actions_as_list (line 56) | def test_analyze_with_all_actions_as_list():
function test_analyze_for_some_actions (line 81) | def test_analyze_for_some_actions():
function test_analyze_for_preloaded_image (line 103) | def test_analyze_for_preloaded_image():
function test_analyze_for_different_detectors (line 119) | def test_analyze_for_different_detectors():
function test_analyze_for_batched_image_as_list_of_string (line 158) | def test_analyze_for_batched_image_as_list_of_string():
function test_analyze_for_batched_image_as_list_of_numpy (line 181) | def test_analyze_for_batched_image_as_list_of_numpy():
function test_analyze_for_numpy_batched_image (line 209) | def test_analyze_for_numpy_batched_image():
function test_batch_detect_age_for_multiple_faces (line 247) | def test_batch_detect_age_for_multiple_faces():
function test_batch_detect_emotion_for_multiple_faces (line 260) | def test_batch_detect_emotion_for_multiple_faces():
function test_batch_detect_gender_for_multiple_faces (line 272) | def test_batch_detect_gender_for_multiple_faces():
function test_batch_detect_race_for_multiple_faces (line 284) | def test_batch_detect_race_for_multiple_faces():
FILE: tests/unit/test_api.py
class TestApiFunctions (line 33) | class TestApiFunctions(unittest.TestCase):
method setUp (line 34) | def setUp(self):
method setup_invalid_image (line 42) | def setup_invalid_image(self):
method test_tp_verify (line 49) | def test_tp_verify(self):
method test_tn_verify (line 71) | def test_tn_verify(self):
method test_represent (line 93) | def test_represent(self):
method test_represent_encoded (line 113) | def test_represent_encoded(self):
method test_represent_url (line 138) | def test_represent_url(self):
method test_analyze (line 161) | def test_analyze(self):
method test_analyze_inputformats (line 182) | def test_analyze_inputformats(self):
method test_invalid_verify (line 248) | def test_invalid_verify(self):
method test_invalid_represent (line 257) | def test_invalid_represent(self):
method test_no_file_represent (line 267) | def test_no_file_represent(self):
method test_invalid_analyze (line 275) | def test_invalid_analyze(self):
method test_no_file_analyze (line 284) | def test_no_file_analyze(self):
method test_analyze_for_multipart_form_data (line 292) | def test_analyze_for_multipart_form_data(self):
method test_verify_for_multipart_form_data (line 313) | def test_verify_for_multipart_form_data(self):
method test_represent_for_multipart_form_data (line 342) | def test_represent_for_multipart_form_data(self):
method test_represent_for_multipart_form_data_and_filepath (line 361) | def test_represent_for_multipart_form_data_and_filepath(self):
method test_extract_image_from_form_data (line 379) | def test_extract_image_from_form_data(self):
method test_extract_image_string_from_json_data (line 405) | def test_extract_image_string_from_json_data(self):
method test_extract_image_string_from_form_data (line 426) | def test_extract_image_string_from_form_data(self):
class TestTokenValidation (line 452) | class TestTokenValidation(unittest.TestCase):
method setUp (line 460) | def setUp(self):
method test_missing_token (line 474) | def test_missing_token(self):
method test_invalid_token (line 480) | def test_invalid_token(self):
method test_valid_token (line 494) | def test_valid_token(
class TestConnectionStringFailedValidation (line 520) | class TestConnectionStringFailedValidation(unittest.TestCase):
method setUp (line 521) | def setUp(self):
method test_register (line 530) | def test_register(self):
method test_build_index (line 535) | def test_build_index(self):
method test_search (line 540) | def test_search(self):
class TestConnectionStringSucceddedValidation (line 546) | class TestConnectionStringSucceddedValidation(unittest.TestCase):
method setUp (line 548) | def setUp(self):
method tearDown (line 566) | def tearDown(self):
method test_register (line 571) | def test_register(self):
method test_build_index (line 576) | def test_build_index(self):
method test_search (line 581) | def test_search(self):
function download_test_images (line 587) | def download_test_images(url: str):
function is_form_data_file_testable (line 596) | def is_form_data_file_testable() -> bool:
function test_landmarks_are_raw_python_types (line 616) | def test_landmarks_are_raw_python_types(monkeypatch):
FILE: tests/unit/test_commons.py
function test_loading_broken_weights (line 32) | def test_loading_broken_weights():
class TestDownloadWeightFeature (line 63) | class TestDownloadWeightFeature:
method test_download_weights_for_available_file (line 64) | def test_download_weights_for_available_file(
method test_download_weights_if_necessary_gdown_failure (line 91) | def test_download_weights_if_necessary_gdown_failure(
method test_download_weights_if_necessary_no_compression (line 120) | def test_download_weights_if_necessary_no_compression(
method test_download_weights_if_necessary_zip (line 155) | def test_download_weights_if_necessary_zip(
method test_download_weights_if_necessary_bz2 (line 198) | def test_download_weights_if_necessary_bz2(
method test_download_weights_for_non_supported_compress_type (line 245) | def test_download_weights_for_non_supported_compress_type(
FILE: tests/unit/test_encrypt.py
function test_no_encrypt (line 21) | def test_no_encrypt():
function test_encrypt_single (line 34) | def test_encrypt_single():
function test_encrypt_batch (line 53) | def test_encrypt_batch():
function test_encrypt_single_skip_case (line 76) | def test_encrypt_single_skip_case():
function test_encrypt_batch_skip_case (line 121) | def test_encrypt_batch_skip_case():
function test_homomorphic_encryption (line 176) | def test_homomorphic_encryption():
FILE: tests/unit/test_enforce_detection.py
function test_enabled_enforce_detection_for_non_facial_input (line 12) | def test_enabled_enforce_detection_for_non_facial_input():
function test_disabled_enforce_detection_for_non_facial_input_on_represent (line 24) | def test_disabled_enforce_detection_for_non_facial_input_on_represent():
function test_disabled_enforce_detection_for_non_facial_input_on_verify (line 44) | def test_disabled_enforce_detection_for_non_facial_input_on_verify():
FILE: tests/unit/test_extract_faces.py
function test_different_detectors (line 19) | def test_different_detectors():
function test_numpy_input (line 85) | def test_numpy_input():
function test_backends_for_enforced_detection_with_non_facial_inputs (line 102) | def test_backends_for_enforced_detection_with_non_facial_inputs():
function test_backends_for_not_enforced_detection_with_non_facial_inputs (line 110) | def test_backends_for_not_enforced_detection_with_non_facial_inputs():
function test_file_types_while_loading_base64 (line 120) | def test_file_types_while_loading_base64():
function image_to_base64 (line 135) | def image_to_base64(image_path):
function test_facial_coordinates_are_in_borders (line 141) | def test_facial_coordinates_are_in_borders():
function test_batch_str_inputs (line 173) | def test_batch_str_inputs():
function test_batch_ndarray_inputs (line 191) | def test_batch_ndarray_inputs():
FILE: tests/unit/test_find.py
function test_find_with_exact_path (line 20) | def test_find_with_exact_path():
function test_find_with_array_input (line 49) | def test_find_with_array_input():
function test_find_with_extracted_faces (line 71) | def test_find_with_extracted_faces():
function test_filetype_for_find (line 93) | def test_filetype_for_find():
function test_filetype_for_find_bulk_embeddings (line 106) | def test_filetype_for_find_bulk_embeddings():
function test_find_without_refresh_database (line 126) | def test_find_without_refresh_database():
function test_find_for_similarity_search (line 176) | def test_find_for_similarity_search():
FILE: tests/unit/test_find_batched.py
function test_find_with_exact_path (line 18) | def test_find_with_exact_path():
function test_batched_find_with_similarity_search (line 57) | def test_batched_find_with_similarity_search():
function test_find_with_array_input (line 103) | def test_find_with_array_input():
function test_find_with_extracted_faces (line 126) | def test_find_with_extracted_faces():
function test_filetype_for_find (line 151) | def test_filetype_for_find():
FILE: tests/unit/test_landmark_sanitization.py
function sanitize_landmarks (line 8) | def sanitize_landmarks(region, width, height):
function test_sanitize_landmarks (line 21) | def test_sanitize_landmarks():
function test_extract_faces_sanitizes_landmarks (line 42) | def test_extract_faces_sanitizes_landmarks(monkeypatch):
FILE: tests/unit/test_output_normalization.py
function test_minmax_normalization (line 10) | def test_minmax_normalization():
function test_minmax_normalization_batch (line 33) | def test_minmax_normalization_batch():
function test_minmax_normalization_edge_values (line 50) | def test_minmax_normalization_edge_values():
function test_l2_normalization (line 69) | def test_l2_normalization():
FILE: tests/unit/test_represent.py
function test_standard_represent (line 15) | def test_standard_represent():
function test_standard_represent_with_io_object (line 30) | def test_standard_represent_with_io_object():
function test_represent_for_skipped_detector_backend_with_image_path (line 49) | def test_represent_for_skipped_detector_backend_with_image_path():
function test_represent_for_preloaded_image (line 65) | def test_represent_for_preloaded_image():
function test_represent_for_skipped_detector_backend_with_preloaded_image (line 86) | def test_represent_for_skipped_detector_backend_with_preloaded_image():
function test_max_faces (line 103) | def test_max_faces():
function test_represent_detector_backend (line 114) | def test_represent_detector_backend():
function test_batched_represent_for_list_input (line 143) | def test_batched_represent_for_list_input(model_name):
function test_batched_represent_for_numpy_input (line 203) | def test_batched_represent_for_numpy_input(model_name):
FILE: tests/unit/test_signature.py
class TestSignature (line 21) | class TestSignature(unittest.TestCase):
method setUp (line 22) | def setUp(self):
method tearDown (line 38) | def tearDown(self):
method test_sign_and_verify_happy_path_with_obj (line 42) | def test_sign_and_verify_happy_path_with_obj(self):
method test_sign_and_verify_happy_path_with_dict (line 66) | def test_sign_and_verify_happy_path_with_dict(self):
method test_missing_algorithm_in_dict (line 83) | def test_missing_algorithm_in_dict(self):
method test_tampered_datastore_detection_with_type_error (line 99) | def test_tampered_datastore_detection_with_type_error(self):
method test_tampered_datastore_detection_with_content (line 121) | def test_tampered_datastore_detection_with_content(self):
method test_unsigned_datastore_detected (line 166) | def test_unsigned_datastore_detected(self):
method test_signed_datastore_with_no_credentials (line 184) | def test_signed_datastore_with_no_credentials(self):
method test_custom_curves (line 201) | def test_custom_curves(self):
method __flush_datastore_and_signature (line 241) | def __flush_datastore_and_signature(self):
FILE: tests/unit/test_singleton.py
function test_singleton_same_object (line 6) | def test_singleton_same_object():
FILE: tests/unit/test_verify.py
function test_different_facial_recognition_models (line 17) | def test_different_facial_recognition_models():
function test_different_face_detectors (line 76) | def test_different_face_detectors():
function test_verify_for_preloaded_image (line 112) | def test_verify_for_preloaded_image():
function test_verify_for_precalculated_embeddings (line 120) | def test_verify_for_precalculated_embeddings():
function test_verify_with_precalculated_embeddings_for_incorrect_model (line 159) | def test_verify_with_precalculated_embeddings_for_incorrect_model():
function test_verify_for_broken_embeddings (line 177) | def test_verify_for_broken_embeddings():
function test_verify_for_nested_embeddings (line 189) | def test_verify_for_nested_embeddings():
function test_compability_of_verify_and_represent (line 205) | def test_compability_of_verify_and_represent():
function test_confidence (line 236) | def test_confidence():
FILE: tests/unit/test_version.py
function test_version (line 11) | def test_version():
Condensed preview — 150 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,847K chars).
[
{
"path": ".codeboarding/External_Integration_Layer.md",
"chars": 6511,
"preview": "```mermaid\n\ngraph LR\n\n API_Core[\"API Core\"]\n\n Streaming_Module[\"Streaming Module\"]\n\n DeepFace_Facade[\"DeepFace "
},
{
"path": ".codeboarding/Facial_Analysis_Engine.md",
"chars": 1801,
"preview": "```mermaid\n\ngraph LR\n\n FaceDetection[\"FaceDetection\"]\n\n```\n\n[ 2019 Sefik Ilkin Serengil\n\nPermission is hereby granted, free of charge, to any person obtain"
},
{
"path": "Makefile",
"chars": 305,
"preview": "test:\n\tcd tests/unit && python -m pytest . -s --disable-warnings\n\nintegration-test:\n\tcd tests/integration && python -m p"
},
{
"path": "README.md",
"chars": 33022,
"preview": "# deepface\n\n<div align=\"center\">\n\n[\n\nDeepFace offers various configurations that significan"
},
{
"path": "boosted/Perform-Boosting-Experiments-LightGBM.ipynb",
"chars": 1596968,
"preview": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"id\": \"8133a99d\",\n \"metadata\": {},\n \"source\": [\n \"# Perform Expe"
},
{
"path": "boosted/Perform-Boosting-Experiments-XGBoost.ipynb",
"chars": 31428,
"preview": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"id\": \"8133a99d\",\n \"metadata\": {},\n \"source\": [\n \"# Perform Expe"
},
{
"path": "boosted/models/boosted_lightface_7.txt",
"chars": 894448,
"preview": "tree\nversion=v4\nnum_class=1\nnum_tree_per_iteration=1\nlabel_index=0\nmax_feature_idx=13\nobjective=binary sigmoid:1\nfeature"
},
{
"path": "deepface/DeepFace.py",
"chars": 44338,
"preview": "# common dependencies\nimport os\nimport warnings\nimport logging\nfrom typing import Any, Dict, IO, List, Union, Optional, "
},
{
"path": "deepface/__init__.py",
"chars": 23,
"preview": "__version__ = \"0.0.99\"\n"
},
{
"path": "deepface/api/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "deepface/api/postman/deepface-api.postman_collection.json",
"chars": 7526,
"preview": "{\n\t\"info\": {\n\t\t\"_postman_id\": \"26c5ee53-1f4b-41db-9342-3617c90059d3\",\n\t\t\"name\": \"deepface-api\",\n\t\t\"schema\": \"https://sch"
},
{
"path": "deepface/api/src/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "deepface/api/src/app.py",
"chars": 1782,
"preview": "# 3rd parth dependencies\nfrom flask import Flask\nfrom flask_cors import CORS\nfrom dotenv import load_dotenv\n\n# load envi"
},
{
"path": "deepface/api/src/dependencies/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "deepface/api/src/dependencies/container.py",
"chars": 413,
"preview": "# project dependencies\nfrom deepface.api.src.modules.auth.service import AuthService\nfrom deepface.api.src.dependencies."
},
{
"path": "deepface/api/src/dependencies/variables.py",
"chars": 915,
"preview": "# built-in dependencies\nimport os\n\n# project dependencies\nfrom deepface.modules.database.inventory import database_inven"
},
{
"path": "deepface/api/src/modules/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "deepface/api/src/modules/auth/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "deepface/api/src/modules/auth/service.py",
"chars": 1299,
"preview": "# built-in dependencies\nfrom typing import Optional, Dict, Any\n\n# project dependencies\nfrom deepface.commons.logger impo"
},
{
"path": "deepface/api/src/modules/core/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "deepface/api/src/modules/core/routes.py",
"chars": 11280,
"preview": "# built-in dependencies\nfrom typing import Union, cast, Any, Tuple, Dict\n\n# 3rd party dependencies\nfrom flask import Blu"
},
{
"path": "deepface/api/src/modules/core/service.py",
"chars": 6256,
"preview": "# built-in dependencies\nimport traceback\nfrom typing import Optional, Union, Dict, Any, Tuple, List\n\n# 3rd party depende"
},
{
"path": "deepface/commons/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "deepface/commons/constant.py",
"chars": 117,
"preview": "import os\n\nSRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\nROOT_DIR = os.path.dirname(SRC_DIR)\n"
},
{
"path": "deepface/commons/embed_utils.py",
"chars": 470,
"preview": "from typing import List, Union\n\n\ndef is_flat_embedding(x: Union[List[float], List[List[float]]]) -> bool:\n \"\"\"\n Ch"
},
{
"path": "deepface/commons/folder_utils.py",
"chars": 948,
"preview": "import os\nfrom deepface.commons.logger import Logger\n\nlogger = Logger()\n\n\ndef initialize_folder() -> None:\n \"\"\"\n I"
},
{
"path": "deepface/commons/image_utils.py",
"chars": 6752,
"preview": "# built-in dependencies\nimport os\nimport io\nfrom typing import Generator, IO, List, Union, Tuple, cast, Any\nimport hashl"
},
{
"path": "deepface/commons/logger.py",
"chars": 2879,
"preview": "import os\nfrom typing import Any\nimport logging\nfrom datetime import datetime\n\n\n# pylint: disable=broad-except\nclass Log"
},
{
"path": "deepface/commons/package_utils.py",
"chars": 1685,
"preview": "# built-in dependencies\nimport hashlib\n\n# 3rd party dependencies\nimport tensorflow as tf\n\n# package dependencies\nfrom de"
},
{
"path": "deepface/commons/weight_utils.py",
"chars": 8425,
"preview": "# built-in dependencies\nimport os\nfrom typing import Optional\nimport zipfile\nimport bz2\n\n# 3rd party dependencies\nimport"
},
{
"path": "deepface/config/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "deepface/config/confidence.py",
"chars": 14146,
"preview": "confidences = {\n \"VGG-Face\": {\n \"cosine\": {\n \"w\": -6.61254026479904,\n \"b\": 3.14554910266"
},
{
"path": "deepface/config/minmax.py",
"chars": 704,
"preview": "from typing import Tuple\n\n# these values are determined empirically for each model from unit test items\nminmax_values = "
},
{
"path": "deepface/config/threshold.py",
"chars": 1022,
"preview": "thresholds = {\n \"VGG-Face\": {\"cosine\": 0.68, \"euclidean\": 1.17, \"euclidean_l2\": 1.17, \"angular\": 0.39},\n \"Facenet\""
},
{
"path": "deepface/models/Demography.py",
"chars": 2713,
"preview": "# built-in dependencies\nfrom typing import Union, List, Any, cast\nfrom abc import ABC, abstractmethod\n\n# 3rd party depen"
},
{
"path": "deepface/models/Detector.py",
"chars": 2519,
"preview": "# built-in imports\nfrom typing import List, Tuple, Optional, Any\nfrom abc import ABC, abstractmethod\nfrom dataclasses im"
},
{
"path": "deepface/models/FacialRecognition.py",
"chars": 1983,
"preview": "# standard library imports\nfrom abc import ABC\nfrom typing import Any, Union, List, Tuple, cast\n\n# third party imports\ni"
},
{
"path": "deepface/models/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "deepface/models/demography/Age.py",
"chars": 3496,
"preview": "# stdlib dependencies\nfrom typing import List, Union, Any, cast\n\n# 3rd party dependencies\nimport numpy as np\nfrom numpy."
},
{
"path": "deepface/models/demography/Emotion.py",
"chars": 3833,
"preview": "# stdlib dependencies\nfrom typing import List, Union, Any\n\n# 3rd party dependencies\nimport numpy as np\nfrom numpy.typing"
},
{
"path": "deepface/models/demography/Gender.py",
"chars": 2792,
"preview": "# stdlib dependencies\n\nfrom typing import List, Union, Any\n\n# 3rd party dependencies\nfrom numpy.typing import NDArray\n\n#"
},
{
"path": "deepface/models/demography/Race.py",
"chars": 2797,
"preview": "# stdlib dependencies\nfrom typing import List, Union, Any\n\n# 3rd party dependencies\nfrom numpy.typing import NDArray\n\n# "
},
{
"path": "deepface/models/demography/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "deepface/models/face_detection/CenterFace.py",
"chars": 7823,
"preview": "# built-in dependencies\nimport os\nfrom typing import List, Any, Tuple\n\n# 3rd party dependencies\nimport numpy as np\nfrom "
},
{
"path": "deepface/models/face_detection/Dlib.py",
"chars": 3412,
"preview": "# built-in dependencies\nfrom typing import List, Dict, Any\n\n# 3rd party dependencies\nfrom numpy.typing import NDArray\n\n#"
},
{
"path": "deepface/models/face_detection/FastMtCnn.py",
"chars": 3278,
"preview": "# built-in dependencies\nfrom typing import Any, Union, List, Tuple\n\n# 3rd party dependencies\nimport cv2\nfrom numpy.typin"
},
{
"path": "deepface/models/face_detection/MediaPipe.py",
"chars": 3461,
"preview": "# built-in dependencies\r\nimport os\r\nfrom typing import Any, List\r\n\r\n# 3rd party dependencies\r\nfrom numpy.typing import N"
},
{
"path": "deepface/models/face_detection/MtCnn.py",
"chars": 1970,
"preview": "# built-in dependencies\nfrom typing import List, Any\nimport warnings\n\n# 3rd party dependencies\nfrom numpy.typing import "
},
{
"path": "deepface/models/face_detection/OpenCv.py",
"chars": 6313,
"preview": "# built-in dependencies\nimport os\nfrom typing import Any, List, Dict, Tuple, Optional\n\n# 3rd party dependencies\nimport c"
},
{
"path": "deepface/models/face_detection/RetinaFace.py",
"chars": 2504,
"preview": "# built-in dependencies\nfrom typing import List, Any\n\n# 3rd party dependencies\nfrom numpy.typing import NDArray\nfrom ret"
},
{
"path": "deepface/models/face_detection/Ssd.py",
"chars": 3825,
"preview": "# built-in dependencies\nfrom typing import List, Any\nfrom enum import IntEnum\n\n# 3rd party dependencies\nimport cv2\nimpor"
},
{
"path": "deepface/models/face_detection/Yolo.py",
"chars": 6660,
"preview": "# built-in dependencies\nimport os\nfrom typing import List, Any\nfrom enum import Enum\n\n# 3rd party dependencies\nfrom nump"
},
{
"path": "deepface/models/face_detection/YuNet.py",
"chars": 4942,
"preview": "# built-in dependencies\nimport os\nfrom typing import Any, List\n\n# 3rd party dependencies\nimport cv2\nfrom numpy.typing im"
},
{
"path": "deepface/models/face_detection/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "deepface/models/facial_recognition/ArcFace.py",
"chars": 4887,
"preview": "# built-in dependencies\nfrom typing import Any\n\n# project dependencies\nfrom deepface.commons import package_utils, weigh"
},
{
"path": "deepface/models/facial_recognition/Buffalo_L.py",
"chars": 3842,
"preview": "# built-in dependencies\nimport os\nfrom typing import List, Union, Any\n\n# third-party dependencies\nimport numpy as np\nfro"
},
{
"path": "deepface/models/facial_recognition/DeepID.py",
"chars": 2446,
"preview": "# project dependencies\nfrom deepface.commons import package_utils, weight_utils\nfrom deepface.models.FacialRecognition i"
},
{
"path": "deepface/models/facial_recognition/Dlib.py",
"chars": 2491,
"preview": "# built-in dependencies\nfrom typing import List, Union, Any, cast\n\n# 3rd party dependencies\nimport numpy as np\nfrom nump"
},
{
"path": "deepface/models/facial_recognition/Facenet.py",
"chars": 61035,
"preview": "# built-in dependencies\nfrom typing import Any\n\n# 3rd party dependencies\nfrom numpy.typing import NDArray\n\n# project dep"
},
{
"path": "deepface/models/facial_recognition/FbDeepFace.py",
"chars": 3292,
"preview": "# project dependencies\nfrom deepface.commons import package_utils, weight_utils\nfrom deepface.models.FacialRecognition i"
},
{
"path": "deepface/models/facial_recognition/GhostFaceNet.py",
"chars": 9756,
"preview": "# built-in dependencies\nfrom typing import Any\n\n# 3rd party dependencies\nimport tensorflow as tf\n\n# project dependencies"
},
{
"path": "deepface/models/facial_recognition/OpenFace.py",
"chars": 17143,
"preview": "# 3rd party dependencies\nimport tensorflow as tf\n\n# project dependencies\nfrom deepface.commons import package_utils, wei"
},
{
"path": "deepface/models/facial_recognition/SFace.py",
"chars": 2592,
"preview": "# built-in dependencies\nfrom typing import Any, List, Union, cast\n\n# 3rd party dependencies\nimport numpy as np\nfrom nump"
},
{
"path": "deepface/models/facial_recognition/VGGFace.py",
"chars": 5845,
"preview": "# built-in dependencies\nfrom typing import List, cast, Any\n\n# 3rd party dependencies\nfrom numpy.typing import NDArray\n\n#"
},
{
"path": "deepface/models/facial_recognition/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "deepface/models/spoofing/FasNet.py",
"chars": 7825,
"preview": "# built-in dependencies\nfrom typing import Union, Any, Tuple, List\n\n# 3rd party dependencies\nimport cv2\nimport numpy as "
},
{
"path": "deepface/models/spoofing/FasNetBackbone.py",
"chars": 16027,
"preview": "# These classes are copied from Minivision's Silent-Face-Anti-Spoofing Repo\n# licensed under Apache License 2.0\n# Ref: g"
},
{
"path": "deepface/models/spoofing/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "deepface/modules/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "deepface/modules/database/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "deepface/modules/database/inventory.py",
"chars": 1529,
"preview": "# built-in dependencies\nfrom typing import TypedDict, Type, Dict\n\n# project dependencies\nfrom deepface.modules.database."
},
{
"path": "deepface/modules/database/mongo.py",
"chars": 10583,
"preview": "# built-in dependencies\nimport os\nimport json\nimport hashlib\nimport struct\nfrom datetime import datetime, timezone\nfrom "
},
{
"path": "deepface/modules/database/neo4j.py",
"chars": 12427,
"preview": "# built-in dependencies\nimport os\nimport json\nimport hashlib\nimport struct\nfrom typing import Any, Dict, Optional, List,"
},
{
"path": "deepface/modules/database/pgvector.py",
"chars": 13905,
"preview": "# built-in dependencies\nimport os\nimport json\nimport struct\nimport hashlib\nfrom typing import Any, Dict, Optional, List,"
},
{
"path": "deepface/modules/database/pinecone.py",
"chars": 8133,
"preview": "# built-in dependencies\nimport os\nimport json\nimport hashlib\nimport struct\nimport math\nfrom typing import Any, Dict, Opt"
},
{
"path": "deepface/modules/database/postgres.py",
"chars": 11565,
"preview": "# built-in dependencies\nimport os\nimport json\nimport hashlib\nimport struct\nfrom typing import Any, Dict, Optional, List,"
},
{
"path": "deepface/modules/database/types.py",
"chars": 3093,
"preview": "# built-in dependencies\nfrom typing import Any, Dict, List, Union, Optional\nfrom abc import ABC, abstractmethod\n\n\n# pyli"
},
{
"path": "deepface/modules/database/weaviate.py",
"chars": 10996,
"preview": "# built-in dependencies\nimport os\nimport json\nimport hashlib\nimport struct\nimport base64\nimport uuid\nimport math\nfrom ty"
},
{
"path": "deepface/modules/datastore.py",
"chars": 33253,
"preview": "# built-in dependencies\nimport os\nfrom typing import Any, Dict, IO, List, Union, Optional, cast\nimport uuid\nimport time\n"
},
{
"path": "deepface/modules/demography.py",
"chars": 10414,
"preview": "# built-in dependencies\nfrom typing import Any, Dict, List, Union, IO, cast, Tuple\n\n# 3rd party dependencies\nimport nump"
},
{
"path": "deepface/modules/detection.py",
"chars": 22666,
"preview": "# built-in dependencies\nfrom typing import Any, Dict, IO, List, Tuple, Union, Optional, cast\nfrom heapq import nlargest\n"
},
{
"path": "deepface/modules/encryption.py",
"chars": 2664,
"preview": "# built-in dependencies\nfrom typing import List, Union, Optional, cast\n\n# third-party dependencies\nfrom lightphe import "
},
{
"path": "deepface/modules/exceptions.py",
"chars": 1165,
"preview": "# pylint: disable=unnecessary-pass\n\n\nclass ImgNotFound(ValueError):\n \"\"\"Raised when the input image is not found or c"
},
{
"path": "deepface/modules/modeling.py",
"chars": 4461,
"preview": "from __future__ import annotations\n\n# built-in dependencies\nfrom typing import TYPE_CHECKING, Any, Final, TypedDict, Dic"
},
{
"path": "deepface/modules/normalization.py",
"chars": 2955,
"preview": "# built-in dependencies\nfrom typing import List, Union, cast\n\n# third-party dependencies\nimport numpy as np\n\n# project d"
},
{
"path": "deepface/modules/preprocessing.py",
"chars": 3562,
"preview": "# built-in dependencies\nfrom typing import Tuple, Any\n\n# 3rd party\nimport numpy as np\nfrom numpy.typing import NDArray\ni"
},
{
"path": "deepface/modules/recognition.py",
"chars": 34527,
"preview": "# built-in dependencies\nimport os\nimport pickle\nfrom typing import List, Union, Optional, Dict, Any, Set, IO, cast, Tupl"
},
{
"path": "deepface/modules/representation.py",
"chars": 9607,
"preview": "# built-in dependencies\nfrom typing import Any, Dict, List, Union, Optional, Sequence, IO, cast\nfrom collections import "
},
{
"path": "deepface/modules/streaming.py",
"chars": 35904,
"preview": "# built-in dependencies\nimport os\nimport time\nfrom typing import List, Tuple, Optional, cast, Dict, Any\nimport traceback"
},
{
"path": "deepface/modules/verification.py",
"chars": 24615,
"preview": "# built-in dependencies\nimport time\nfrom typing import Any, Dict, Optional, Union, List, Tuple, IO, cast\nimport math\n\n# "
},
{
"path": "docker/docker-compose.yml",
"chars": 1132,
"preview": "services:\n postgres:\n image: postgres:15\n container_name: postgres\n restart: unless-stopped\n environment:\n "
},
{
"path": "docker/integration.sh",
"chars": 85,
"preview": "docker-compose up\n\n# docker exec -it postgres psql -U deepface_user -d deepface\n# \\dt"
},
{
"path": "docker/pgvector-init/01_pgvector.sql",
"chars": 38,
"preview": "CREATE EXTENSION IF NOT EXISTS vector;"
},
{
"path": "docker/postgres-init/001_create_table.sql",
"chars": 844,
"preview": "DROP TABLE IF EXISTS embeddings;\n\nCREATE TABLE IF NOT EXISTS embeddings (\n id SERIAL PRIMARY KEY,\n img_name TEXT N"
},
{
"path": "entrypoint.sh",
"chars": 241,
"preview": "# Example content\necho \"Starting the application...\"\nexec \"$@\"\n\ngunicorn --workers=1 --timeout=7200 --bind=0.0.0.0:5000 "
},
{
"path": "experiments/distance-to-confidence.ipynb",
"chars": 189317,
"preview": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"# Distance to Confidence\\n\",\n \"\\"
},
{
"path": "mypy.ini",
"chars": 105,
"preview": "[mypy]\nignore_missing_imports = True\nwarn_unused_configs = True\nwarn_unused_ignores = False\nstrict = True"
},
{
"path": "package_info.json",
"chars": 28,
"preview": "{\n \"version\": \"0.0.99\"\n}\n"
},
{
"path": "requirements-dev.txt",
"chars": 14,
"preview": "pytest>=8.3.5\n"
},
{
"path": "requirements.txt",
"chars": 305,
"preview": "requests>=2.27.1\r\nnumpy>=1.14.0\r\npandas>=0.23.4\r\ngdown>=3.10.1\r\ntqdm>=4.30.0\r\nPillow>=5.2.0\r\nopencv-python>=4.5.5.64\r\nte"
},
{
"path": "requirements_additional.txt",
"chars": 208,
"preview": "opencv-contrib-python>=4.3.0.36\nmediapipe>=0.8.7.3\ndlib>=19.20.0\nultralytics>=8.1.6\nfacenet-pytorch>=2.5.3\ntorch>=2.1.2\n"
},
{
"path": "requirements_local",
"chars": 453,
"preview": "numpy==1.22.3\npandas==2.0.3\nPillow==9.0.0\nopencv-python==4.9.0.80\ntensorflow==2.13.1\nkeras==2.13.1\nrequests==2.27.1\ngdow"
},
{
"path": "scripts/dockerize.sh",
"chars": 1174,
"preview": "# Dockerfile is in the root\ncd ..\n\n# start docker\n# sudo service docker start\n\n# list current docker packages\n# docker c"
},
{
"path": "scripts/push-release.sh",
"chars": 247,
"preview": "cd ..\n\necho \"deleting existing release related files\"\nrm -rf dist/*\nrm -rf build/*\n\necho \"creating a package for current"
},
{
"path": "scripts/service.sh",
"chars": 246,
"preview": "#!/usr/bin/env bash\ncd ../deepface/api/src\n\n# run the service with flask - not for production purposes\n# python api.py\n\n"
},
{
"path": "setup.py",
"chars": 1220,
"preview": "import json\nimport setuptools\n\nwith open(\"README.md\", \"r\", encoding=\"utf-8\") as fh:\n long_description = fh.read()\n\nwi"
},
{
"path": "tests/integration/test_postgres_register.py",
"chars": 3310,
"preview": "# built-in dependencies\nimport os\nfrom unittest.mock import patch\n\n# 3rd party dependencies\nimport pytest\nimport psycopg"
},
{
"path": "tests/integration/test_postgres_search.py",
"chars": 2392,
"preview": "# built-in dependencies\nimport os\nfrom unittest.mock import patch\n\n# 3rd party dependencies\nimport pytest\nimport psycopg"
},
{
"path": "tests/unit/dataset/face-recognition-pivot.csv",
"chars": 41224,
"preview": "file_x,file_y,decision,VGG-Face_cosine,VGG-Face_euclidean,VGG-Face_euclidean_l2,Facenet_cosine,Facenet_euclidean,Facenet"
},
{
"path": "tests/unit/dataset/master.csv",
"chars": 7044,
"preview": "file_x,file_y,Decision\r\nimg20.jpg,img21.jpg,Yes\r\nimg16.jpg,img17.jpg,Yes\r\nimg3.jpg,img12.jpg,Yes\r\nimg22.jpg,img23.jpg,Ye"
},
{
"path": "tests/unit/face-recognition-how.py",
"chars": 3225,
"preview": "# 3rd party dependencies\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nimport cv2\r\n\r\n# project dependencies\r\nfro"
},
{
"path": "tests/unit/overlay.py",
"chars": 1241,
"preview": "# 3rd party dependencies\nimport cv2\nimport matplotlib.pyplot as plt\n\n# project dependencies\nfrom deepface.modules import"
},
{
"path": "tests/unit/stream.py",
"chars": 404,
"preview": "from deepface import DeepFace\n\nDeepFace.stream(\"dataset\", enable_face_analysis=False, anti_spoofing=True) # opencv\n# De"
},
{
"path": "tests/unit/test_analyze.py",
"chars": 10484,
"preview": "# 3rd party dependencies\nimport cv2\nimport numpy as np\n\n# project dependencies\nfrom deepface import DeepFace\nfrom deepfa"
},
{
"path": "tests/unit/test_api.py",
"chars": 25634,
"preview": "# built-in dependencies\nimport base64\nimport os\nimport shutil\nimport unittest\nfrom pathlib import Path\nfrom tempfile imp"
},
{
"path": "tests/unit/test_commons.py",
"chars": 9635,
"preview": "# built-in dependencies\nimport os\nfrom unittest import mock\nfrom unittest.mock import MagicMock\nimport pytest\n\n# project"
},
{
"path": "tests/unit/test_encrypt.py",
"chars": 7150,
"preview": "# built-in dependencies\nimport uuid\n\n\n# 3rd party dependencies\nimport pytest\nfrom lightphe import LightPHE\nfrom lightphe"
},
{
"path": "tests/unit/test_enforce_detection.py",
"chars": 1715,
"preview": "# 3rd party dependencies\nimport pytest\nimport numpy as np\n\n# project dependencies\nfrom deepface import DeepFace\nfrom dee"
},
{
"path": "tests/unit/test_extract_faces.py",
"chars": 8385,
"preview": "# built-in dependencies\nimport base64\n\n# 3rd party dependencies\nimport cv2\nimport numpy as np\nimport pytest\n\n# project d"
},
{
"path": "tests/unit/test_find.py",
"chars": 6888,
"preview": "# built-in dependencies\nimport os\n\n# 3rd party dependencies\nimport cv2\nimport pandas as pd\n\n# project dependencies\nfrom "
},
{
"path": "tests/unit/test_find_batched.py",
"chars": 5041,
"preview": "# built-in dependencies\nimport os\n\n# 3rd party dependencies\nimport cv2\n\n# project dependencies\nfrom deepface import Deep"
},
{
"path": "tests/unit/test_landmark_sanitization.py",
"chars": 2439,
"preview": "import numpy as np\nimport pytest\nfrom deepface.modules.detection import extract_faces, DetectedFace, FacialAreaRegion, i"
},
{
"path": "tests/unit/test_output_normalization.py",
"chars": 3134,
"preview": "# 3rd-party dependencies\nimport numpy as np\n\n# project dependencies\nfrom deepface import DeepFace\nfrom deepface.modules."
},
{
"path": "tests/unit/test_represent.py",
"chars": 8623,
"preview": "# built-in dependencies\nimport io\nimport cv2\nimport pytest\nimport numpy as np\nimport pytest\n\n# project dependencies\nfrom"
},
{
"path": "tests/unit/test_signature.py",
"chars": 10842,
"preview": "# built-in dependencies\nimport os\nimport shutil\nimport uuid\nimport unittest\n\n# 3rd party dependencies\nimport pytest\nfrom"
},
{
"path": "tests/unit/test_singleton.py",
"chars": 214,
"preview": "from deepface.commons.logger import Logger\n\nlogger = Logger()\n\n\ndef test_singleton_same_object():\n assert Logger() =="
},
{
"path": "tests/unit/test_verify.py",
"chars": 9688,
"preview": "# 3rd party dependencies\nimport pytest\nimport cv2\n\n# project dependencies\nfrom deepface import DeepFace\nfrom deepface.mo"
},
{
"path": "tests/unit/test_version.py",
"chars": 434,
"preview": "# built-in dependencies\nimport json\n\n# project dependencies\nfrom deepface import DeepFace\nfrom deepface.commons.logger i"
},
{
"path": "tests/unit/visual-test.py",
"chars": 3876,
"preview": "# 3rd party dependencies\nimport matplotlib.pyplot as plt\n\n# project dependencies\nfrom deepface import DeepFace\nfrom deep"
}
]
About this extraction
This page contains the full source code of the serengil/deepface GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 150 files (3.6 MB), approximately 947.8k tokens, and a symbol index with 529 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.