Skip to main content

RetinaFace

face detector with landmarks, RetinaFace PyPI implement

reference : https://github.com/peteryuX/retinaface-tf2

Buy Me A Coffee


INSTALL

pip3 install refinaface

USEAGE

#pip3 install opencv-python
import cv2 
from retinaface import RetinaFace

# init with 'normal' accuracy option (resize width or height to 800 )
# or you can choice 'speed' (resize to 320)
# or you can initiate with no parameter for running with original image size
detector = RetinaFace(quality="normal")

# same with cv2.imread,cv2.cvtColor 
rgb_image = detector.read("data/hian.jpg")

faces = detector.predict(rgb_image)
# faces is list of face dictionary
# each face dictionary contains x1 y1 x2 y2 left_eye right_eye nose left_lip right_lip
# faces=[{"x1":20,"y1":32, ... }, ...]

result_img = detector.draw(rgb_image,faces)

# save ([...,::-1] : rgb -> bgr )
cv2.imwrite("data/result_img.jpg",result_img[...,::-1])

# show using cv2
# cv2.imshow("result",result_img[...,::-1])
# cv2.waitKey()

result with drawing

Release files for retinaface 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for retinaface 1.1.1
File Interpreter ABI Platform
retinaface-1.1.1-py3-none-any.whl Python 3 none any Details

Release files / retinaface-1.1.1-py3-none-any.whl

Download URL retinaface-1.1.1-py3-none-any.whl
Size 5.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
11ecb0ca3e8747d6320fd027349ba7a116cd4ddf3c7a553a7e88f1163a72d429
BLAKE2b-256 checksum
How to use checksums
bac37d9d79c4d0064a8dc6524eb100bdcde9ecabd06539312e2326011bb68147
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.7.10

Release history Release notifications | RSS feed

This release

1.1.1 This release

1 release file

1.1.0

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page