retinaface-py
RetinaFace: Single-stage Dense Face Localisation in the Wild
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-pyuv
uv add retinaface-pypoetry
poetry add retinaface-pyInstalling 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
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
retina-faceDetects faces in images and extracts facial…
permissive · top 15,000 on PyPI
mtcnnDetects faces and facial landmarks (eyes, nose,…
permissive · top 5,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
facenet-pytorchProvides pretrained PyTorch models for face…
permissive · top 15,000 on PyPI
face-recognitionDetects, locates, and identifies faces in…
permissive · top 15,000 on PyPI
deepfaceDeepFace performs face recognition,…
permissive · top 15,000 on PyPI
gfpganGFPGAN restores and enhances degraded faces in…
permissive · top 15,000 on PyPI
pretrainedmodelsProvides a unified interface to load pretrained…
permissive · top 15,000 on PyPI
effdetPyTorch implementation of EfficientDet object…
permissive · top 15,000 on PyPI