This opertator detects faces in the images by using RetinaFace Detector[1]. It will returns the bounding box positions and the confidence scores of detected faces. This repo is a adopataion from [2].
```python
from towhee import ops
model = ops.face_detection.retinaface()
embedding = model(img)
```
## 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 position and confidence score back to ndarray.
**Args:**
***framework***
the framework of the model
supported types: `str`, default is 'pytorch'
**Parameters:**
***image***
the image to detect faces.
supported types: numpy.ndarray
**Returns:**: *numpy.ndarray*
The detected face bounding boxes.
## Code Example
get detected face bounding boxes from './img1.jpg'.
*Write the pipeline in simplified style*:
```python
import towhee.DataCollection as dc
dc.glob('./img1.jpg')
.image_decode.cv2()
.face_detection.retinaface()
.to_list()
```
*Write a same pipeline with explicit inputs/outputs name specifications:*