skillfed

retinaface-py

RetinaFace: Single-stage Dense Face Localisation in the Wild

retinaface-py v0.0.2 153.9K downloads/30d#10,867 on PyPI0
Permissive license MIT License Abandoned released

What it is and what it does

RetinaFace-py is a PyTorch port of the RetinaFace face detection algorithm, a single-stage detector designed to localize faces and facial landmarks in unconstrained images. It offers two backbone architectures: MobileNet0.25 for lightweight deployment (model size 1.7M) and ResNet50 for higher accuracy. The package wraps the core detection logic and is intended for integration into face-detection pipelines, particularly on edge devices or resource-constrained environments.

The package depends on numpy, torch, torchvision, and opencv-python for tensor operations, model inference, and image I/O. It is abandoned as of February 2023 with no maintenance since its single release, meaning it will not receive updates for new PyTorch versions, security patches, or API changes in its dependencies. Users should expect potential compatibility issues with modern PyTorch releases and should treat it as a reference implementation rather than a production-ready library.

Use it for:

  • Detect and extract face regions from images for downstream face recognition or verification tasks.
  • Localize facial landmarks (e.g., eyes, nose, mouth) for face alignment preprocessing.
  • Deploy lightweight face detection on mobile or edge devices using the MobileNet0.25 backbone.
  • Benchmark face detection performance on standard datasets like WIDERFACE or FDDB.
  • Integrate into batch image processing pipelines to filter or annotate images containing faces.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Detects and localizes faces in images using a PyTorch implementation of the RetinaFace single-stage face detection model, with support for both ResNet50 and MobileNet0.25 backbones.

No, not recommended for new projects. While the package has low install friction and permissive licensing, it is abandoned (last commit February 2023) and will not receive maintenance or updates. For production face detection, use actively maintained alternatives. Consider this package only for research, reference, or legacy system maintenance where the specific RetinaFace architecture is required and you can manage dependency conflicts independently.

Install

retinaface-py on PyPI

pip

pip install retinaface-py

uv

uv add retinaface-py

poetry

poetry add retinaface-py

Installing retinaface-py

Before you install

Low install friction with a pure Python wheel and four common deep-learning dependencies (numpy, torch, torchvision, opencv-python). However, the package is abandoned—last commit was 2023-02-14 and no updates since release. Maintenance risk is significant for a computer-vision library in a rapidly evolving ecosystem.

License in practice

MIT License permits commercial and private use with minimal restrictions, making it legally safe to adopt. No licensing barriers to integration.

Quickstart

pip install retinaface-py torch torchvision opencv-python

import retinaface_py
# Requires trained model weights and image input; exact API not detailed in fact sheet

Requires PyTorch 1.1.0+ and torchvision 0.3.0+; CUDA-capable GPU strongly recommended for inference speed; trained model weights must be obtained separately.

Verify before relying

  • Exact public API and function signatures for face detection inference
  • Whether pre-trained weights are bundled or must be downloaded separately
  • Performance characteristics on modern PyTorch/torchvision versions post-2023
  • Compatibility with current CUDA and cuDNN versions

Package facts

License MIT License (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 4 — numpy, torch, torchvision, opencv-python
Maintenance abandoned — 1,277 days since the last release
Last repo commit
First released
Downloads 153,897/month — #10,867 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: retinaface_py-0.0.2-py3-none-any.whl

Intended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

face detection pytorchretinaface implementationfacial landmark detectionface localizationdense face detectorsingle-stage face detectionface bounding box detection
face-detectioncomputer-visionabandoned

More Libraries packages