logo
Browse Source

update the format.

Signed-off-by: wxywb <xy.wang@zilliz.com>
main
wxywb 3 years ago
parent
commit
eb3f1b193f
  1. 26
      README.md

26
README.md

@ -1,6 +1,10 @@
# RetinaFace Face Detection
*Authors: David Wang*
*author: David Wang*
<br />
@ -8,11 +12,15 @@
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 an adaptaion from [biubug6/Pytorch_Retinaface](https://github.com/biubug6/Pytorch_Retinaface).
<br />
## Code Example
Load an image from path './turing.png' and use the pretrained RetinaFace model to generate face bounding boxes and confidence scores.
*Write the pipeline in simplified style*:
*Write the pipeline in simplified style:*
```python
import towhee
@ -33,25 +41,35 @@ import towhee
towhee.glob['path']('turing.png') \
.image_decode.cv2['path', 'img']() \
.face_detection.retinaface['img', ('bbox','score')]() \
.select('img', 'bbox', 'score') \
.select['img', 'bbox', 'score']() \
.show()
```
<img src="https://towhee.io/face-detection/retinaface/raw/branch/main/result2.png" alt="result2" style="height:60px;"/>
<br />
## Factory Constructor
Create the operator via the following factory method.
***face_detection.retinaface()***
<br />
## Interface
A face detection operator takes an image as input. It generates the bounding box positions and confidence scores back to ndarray.
**Parameters:**
***img***: *towhee.types.Image (a sub-class of numpy.ndarray)*
***img:*** *towhee.types.Image (a sub-class of numpy.ndarray)*
​ the image to detect faces.

Loading…
Cancel
Save