copied
Readme
Files and versions
Updated 3 years ago
face-detection
RetinaFace Face Detection
Authors: David Wang
Desription
This operator detects faces in the images by using RetinaFace Detector[1]. It will return the bounding box positions and the confidence scores of detected faces. This repo is a adapataion from [2].
Code Example
Load an image from path './dog.jpg' and use the pretrained RetinaFace to generate face bounding boxes.
Write the pipeline in simplified style:
from towhee import ops
bboxes = dc.glob('nmb46.jpg') \
.image_decode.cv2() \
.face_detection.retinaface() \
.to_list()
Write a same pipeline with explicit inputs/outputs name specifications:
from towhee import dc
dc.glob['path']('./dog.jpg') \
.image_decode.cv2['path', 'img']() \
.image_embedding.timm['img', 'vec'](model_name='resnet50') \
.face_detection.retinaface() \
.to_list()
Factory Constructor
Create the operator via the following factory method.
ops.face_detection.retinaface()
Interface
A face detection operator takes an image as input. it generates the bounding box positions and confidence scores back to ndarray.
Parameters:
image: numpy.ndarray.
the image to detect faces.
supported types: numpy.ndarray
Returns:
numpy.ndarray
The detected face bounding boxes.
numpy.ndarray
The detected face bounding boxes confident scores.
Reference
[1]. https://arxiv.org/abs/1905.00641
[2]. https://github.com/biubug6/Pytorch_Retinaface
wxywb
b1240d11ac
| 4 Commits | ||
---|---|---|---|
.gitattributes |
1.1 KiB
|
3 years ago | |
README.md |
1.5 KiB
|
3 years ago | |
__init__.py |
707 B
|
3 years ago | |
pytorch_retinaface_mobilenet_widerface.pth |
1.7 MiB
|
3 years ago | |
requirements.txt |
5 B
|
3 years ago | |
retinaface.py |
1.5 KiB
|
3 years ago | |
retinaface_impl.py |
1.4 KiB
|
3 years ago |