Tiny RetinaFace
Tiny RetinaFace is a fast and simplified implementation of biubug6/Pytorch_Retinaface inference module
Installation
pip install tiny-retinaface
Usage
from retinaface import read_image, detect_faces
# Read image as RGB ndarray
image = read_image("images/test.jpg")
# Detect faces as list of Face objects
faces = detect_faces(image)
Face object
Face(
score=0.9997380375862122,
x=142,
y=322,
width=60,
height=72,
landmarks=[
Point(x=160, y=348),
Point(x=187, y=345),
Point(x=177, y=362),
Point(x=165, y=376),
Point(x=188, y=374)
]
)
Tiny RetinaFace Results on World Largest Selfie
from retinaface import read_image_url, detect_faces, draw_faces
url = "https://github.com/yakhyo/retinaface-pytorch/blob/main/assets/large_selfi.jpg?raw=true"
image = read_image_url(url)
faces = detect_faces(image, score_threshold=0.1, nms_threshold=0.1)
draw_faces(image, faces, filename="images/results.jpg")
Acknowledgements
- Original RetinaFace implementation: deepinsight/insightface
- Pytorch RetinaFace implementation: biubug6/Pytorch_Retinaface
- RetinaFace pretrained onnx weights: yakhyo/retinaface-pytorch
References
@inproceedings{Deng2020CVPR,
title = {RetinaFace: Single-Shot Multi-Level Face Localisation in the Wild},
author = {Deng, Jiankang and Guo, Jia and Ververas, Evangelos and Kotsia, Irene and Zafeiriou, Stefanos},
booktitle = {CVPR},
year = {2020}
}
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for tiny-retinaface 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tiny_retinaface-0.1.0.tar.gz | 2.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tiny_retinaface-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.3 MB
Release files / tiny_retinaface-0.1.0.tar.gz
| Download URL | tiny_retinaface-0.1.0.tar.gz |
|---|---|
| Size | 2.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35cccab2c496157dac5351c37de760fd5203b300de7b3a1eb932b522d3988afc
|
|
BLAKE2b-256 checksum How to use checksums |
7cb45c9ebd825afbe65fe5fd037a71a38f4c9cf0f5ace64b823099961a2b0043
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2025.
Transparency logRelease files / tiny_retinaface-0.1.0-py3-none-any.whl
| Download URL | tiny_retinaface-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d2e9b1973f55796286f7a8737dbdb22ba2c7c213c9a654f7199b97a0cf1d44e
|
|
BLAKE2b-256 checksum How to use checksums |
3c33af42cb1c582acb3842ffc47c63331d32a1c8a52f60d5f40c62109430c158
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 13, 2025.
Transparency log