Navigate:
All Reposdeepface
~$DEEPFA0.1%

DeepFace: Face recognition and facial attribute analysis

Python library wrapping multiple face recognition deep learning models.

LIVE RANKINGS • 06:51 AM • STEADY
OVERALL
#136
43
AI & ML
#60
13
30 DAY RANKING TREND
ovr#136
·AI#60
STARS
21.5K
FORKS
2.9K
DOWNLOADS
3
7D STARS
+19
7D FORKS
+6
Tags:
See Repo:
Share:

Learn more about deepface

DeepFace is a Python library that performs face recognition and facial attribute analysis through deep learning models. It implements a modular pipeline consisting of face detection, alignment, normalization, representation, and verification stages. The library supports multiple backbone architectures including VGG-Face, FaceNet, OpenFace, DeepFace, DeepID, ArcFace, Dlib, SFace, GhostFaceNet, and Buffalo_L, allowing users to select different models for different accuracy and performance trade-offs. Common applications include identity verification, facial expression recognition, demographic prediction, and face clustering tasks.


1

Swappable Recognition Models

Ten interchangeable face recognition architectures (VGG-Face, FaceNet, OpenFace, DeepFace, DeepID, ArcFace, Dlib, SFace, GhostFaceNet, Buffalo_L) accessible through a unified API. Switch models with a single parameter to optimize for accuracy, inference speed, or memory footprint without code refactoring.

2

Unified Attribute Analysis

Single interface extracts face recognition embeddings and facial attributes (age, gender, emotion, race) simultaneously. Eliminates integration overhead of combining multiple specialized models and preprocessing pipelines.

3

Complete Pipeline Implementation

Handles detection, alignment, normalization, representation, and verification stages automatically with sensible defaults. No manual orchestration of preprocessing steps or model coordination required.


from deepface import DeepFace

# Verify if two images contain the same person
result = DeepFace.verify(
    img1_path="person1.jpg",
    img2_path="person2.jpg"
)

print(f"Same person: {result['verified']}")
print(f"Distance: {result['distance']}")

vv0.0.95

Patches FastMtCnn detection bug and reverts Flask/Werkzeug dependency changes; adds confidence metric for fbdeepface model.

  • Update if using FastMtCnn detector to fix detection errors introduced in prior release.
  • Note Flask and Werkzeug dependencies restored to earlier constraints; check compatibility with your environment.
vv0.0.94

Performance and usability release adding batching to represent/analyze, YOLOv11 detector, Buffalo_L model, and Angular distance metric.

  • Enable GPU batching in `.represent()` and `.analyze()` to speed up bulk embedding generation and attribute prediction.
  • Add YOLOv11 face detector, Buffalo_L recognition model, and Angular distance metric; update thresholds and weight loading accordingly.
vv0.0.93

Refactors internal model structure and detection module; DetectorWrapper removed, models reorganized into dedicated folders.

  • Update imports if you reference DetectorWrapper directly; detection now handled within the detection module.
  • Use max_faces argument in represent to limit face processing; extract_faces now supports RGB, BGR, or grayscale output.


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers