# serengil/deepface

A Lightweight Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Library for Python

Repository: https://github.com/serengil/deepface
Canonical: https://ross.abutalabs.com/products/deepface
Homepage: https://www.youtube.com/watch?v=WnUVYQP4h44&list=PLsS_1RYmYQQFdWqxQggXHynP1rqaYXv_E
Language: Python
License: MIT
License Family: permissive
Topics: face-recognition, vgg-face, facenet, openface, facial-expression-recognition, age-prediction, gender-prediction, race-classification, emotion-recognition, deep-learning, machine-learning, deepface, face-analysis, python, deepid, arcface, facial-recognition
Last push: 2026-08-24T11:46:08+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 71, longevity 100
- inputs: {"age_days": 2398, "days_push": 9, "days_rel": 116, "gap_med": 42.5, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 23340, forks 3168 (observed 2026-08-28T04:11:34.711383+00:00)

## What it is
DeepFace is a lightweight Python library for face recognition and facial attribute analysis, wrapping state-of-the-art models like VGG-Face, FaceNet, ArcFace, and DeepID behind a simple API. It also predicts age, gender, emotion, and race from face images and supports face detection, verification, and similarity search.

## Use cases
- verify if two face photos belong to the same person
- find matching faces in a database of images
- predict age and gender from a face photo
- detect facial emotions like happy, sad, or angry
- build a face login or attendance system
- extract face embeddings for downstream ML tasks
- detect and align faces in images

## When to choose
- you need face recognition in Python with a simple high-level API
- you want to compare multiple state-of-the-art face models without reimplementing them
- you need facial attribute analysis (age, gender, emotion, race) alongside recognition
- you want a lightweight, MIT-licensed alternative to cloud face APIs

## When to avoid
- you need real-time recognition on edge devices with strict latency budgets
- you require training or fine-tuning face models from scratch
- you need non-face computer vision tasks
- your use case involves sensitive biometric data and you cannot accept the ethical/legal burden

## Facets
- artifact type: library
- maturity: stable
- function: machine-learning, deep-learning, computer-vision, image-processing
- domain: computer-vision, image-processing, artificial-intelligence, deep-learning
- platform: python, cross-platform
- tags: face-recognition, facial-attribute-analysis, age-prediction, gender-prediction, emotion-recognition, race-classification, facenet, arcface, vgg-face, keras, tensorflow

## Member repositories
- serengil/deepface (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:34.711383+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:56:44.765290+00:00, confidence not recorded.
  - readme: https://github.com/serengil/deepface (fetched 2026-08-28T04:11:34.711383+00:00, sha a052df7e6a46)
  - homepage: https://www.youtube.com/watch?v=WnUVYQP4h44&list=PLsS_1RYmYQQFdWqxQggXHynP1rqaYXv_E (fetched 2026-08-29T07:54:26.048249+00:00, sha 44136fa355b3)
  - registry_pypi: https://pypi.org/pypi/deepface/json (fetched 2026-08-29T07:54:26.057506+00:00, sha d44c67b84c5c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
