face detector
Project description
RetinaFace
face detector with landmarks, RetinaFace PyPI implement
reference : https://github.com/peteryuX/retinaface-tf2
INSTALL
pip3 install refinaface
USEAGE
#pip3 install opencv-python
import cv2
from retinaface import RetinaFace
# init with normal accuracy option
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for retinaface-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b1bd5470e9e21655d0d66a336d303a2a13548ab7a87efa23728f7146d4b9c44 |
|
MD5 | 943f75eec76d0b578dc9ddd0e88c291e |
|
BLAKE2b-256 | 9fb1071d078897cefb498c5636bbef78aa942856871c177d08677eaf8d52f436 |