skillfed

retina-face

RetinaFace: Deep Face Detection Framework in TensorFlow for Python

retina-face v0.0.18 219.1K downloads/30d#9,329 on PyPI2,023
Permissive license Active released

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-face

uv

uv add retina-face

poetry

poetry add retina-face

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

face detection pythonfacial landmarks extractionface alignment deep learningdetect faces in imagesfacial area coordinatesface recognition preprocessingtensorflow face detector
face-detectioncomputer-visiondeep-learning

More Artificial Intelligence packages