# RetinaFace Face Detection
*Authors: David Wang*
## Desription
This operator detects faces in the images by using [RetinaFace](https://arxiv.org/abs/1905.00641) Detector. It will return the bounding box positions and the confidence scores of detected faces. This repo is a adapataion from [repo](https://github.com/biubug6/Pytorch_Retinaface).
## 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*:
```python
import towhee
towhee.glob('turing.png') \
.image_decode.cv2() \
.face_detection.retinaface() \
.show()
```
*Write a same pipeline with explicit inputs/outputs name specifications:*
```python
import towhee
towhee.glob['path']('turing.png') \
.image_decode.cv2['path', 'img']() \
.face_detection.retinaface['img', ('bbox','score')]() \
.select('img', 'bbox', 'score').show()
```
## 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.