A Python implementation of RetinaFace, a single-stage dense face localisation model for face detection and landmark localisation in the wild. Current version 0.0.2, requires Python >=3.6, uses PyTorch. The library wraps a pre-trained ResNet50-based RetinaFace model. Release cadence: low (last update likely 2021).
pip install retinaface-pyNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Detect faces in an image using RetinaFace. The input image should be a numpy array (RGB). Returns a dictionary of detections.
Use the correct import statement: from RetinaFace import RetinaFace
Convert BGR to RGB before passing: img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
Consider using alternative face detection libraries like DeepFace, MTCNN, or dlib.