retina-face
RetinaFace: Deep Face Detection Framework in TensorFlow for Python
What it is and what it does
RetinaFace is a TensorFlow-based face detection library that identifies faces in images and returns their bounding boxes along with five facial landmarks (both eyes, nose, and mouth corners). It is designed as a preprocessing step for face recognition pipelines, where it can also align detected faces to improve downstream recognition accuracy. The package wraps a re-implementation of the original RetinaFace model from the insightface project, simplifying the API for pip installation while preserving the reference architecture and pre-trained weights.
The library exposes two main functions: detect_faces() returns face coordinates and landmarks with confidence scores, while extract_faces() crops and optionally aligns detected faces for use in recognition workflows. It depends on numpy, Pillow, opencv-python, and tensorflow, making it suitable for environments where those libraries are already present or acceptable as dependencies.
Use it for:
- Preprocessing images for a face recognition system by detecting and aligning faces before passing them to a recognition model.
- Extracting facial landmarks for face alignment or geometric analysis in computer vision applications.
- Building a face detection API or service that returns bounding boxes and confidence scores for detected faces in bulk image processing.
- Integrating face detection into a larger pipeline (e.g., with deepface) for end-to-end face verification or identification tasks.
- Analyzing crowd images to locate and extract individual faces for further processing or annotation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Detects faces in images and extracts facial landmarks (eyes, nose, mouth) using a deep learning model, with optional face alignment for recognition pipelines.
Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and offers low install friction. It is well-suited if you need face detection and landmark extraction as part of a Python computer vision workflow. Install it if you are building a face recognition pipeline or need facial landmarks for alignment; skip it if you only need bounding boxes and can tolerate heavier dependencies like tensorflow.
Install
retina-face on PyPI
pip
pip install retina-faceuv
uv add retina-facepoetry
poetry add retina-faceInstalling retina-face
Before you install
Low install friction with a pure-Python wheel. Depends on numpy, Pillow, opencv-python, and tensorflow—all stable, widely-used libraries. Repository is active with a recent commit and no archived status.
License in practice
Licensed under MIT, a permissive license that allows commercial and private use with minimal restrictions.
Quickstart
pip install retina-face
from retinaface import RetinaFace
resp = RetinaFace.detect_faces("img.jpg")
faces = RetinaFace.extract_faces(img_path="img.jpg", align=True)
Requires tensorflow and opencv-python, which may take time to install on first setup depending on system configuration.
Verify before relying
- Whether pre-trained model weights are downloaded automatically on first use and where they are cached.
- Performance characteristics (inference time, memory usage) on typical hardware.
- Accuracy metrics on standard face detection benchmarks beyond the description's crowd-detection claim.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.5.5) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — numpy, gdown, Pillow, opencv-python, tensorflow |
| Maintenance | actively maintained — 74 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 219,069/month — #9,329 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: retina_face-0.0.18-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
deepfaceDeepFace performs face recognition,…
permissive · top 15,000 on PyPI
face-alignmentDetects 2D and 3D facial landmarks from images…
permissive · top 15,000 on PyPI
insightfaceInsightFace is a Python library for face…
unclear · top 5,000 on PyPI
mtcnnDetects faces and facial landmarks (eyes, nose,…
permissive · top 5,000 on PyPI
retinaface-pyDetects and localizes faces in images using a…
permissive · top 15,000 on PyPI
face-recognitionDetects, locates, and identifies faces in…
permissive · top 15,000 on PyPI
facexlibFacexlib provides a collection of PyTorch-based…
permissive · top 5,000 on PyPI
face_recognition_modelsProvides pre-trained deep learning models for…
permissive · top 15,000 on PyPI
facenet-pytorchProvides pretrained PyTorch models for face…
permissive · top 15,000 on PyPI
gfpganGFPGAN restores and enhances degraded faces in…
permissive · top 15,000 on PyPI