Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
610265158 committed May 5, 2023
1 parent af5c304 commit c80dbd6
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@

It is a simple demo including face detection and face aligment, and some optimizations were made to make the result better.


The keypoint model encodes and decodes the x and y coordinates using heatmap and offset of x and y,
achieving SOTA on WFLW dataset.
Like object detection, heatmap predicts which point is a positive sample on the featuremap,
represented as a highlighted area, while x and y offsets are responsible for predicting the specific coordinates of these positive samples.
And it achieves NME 3.95 on WFLW with no extern data.

click the gif to see the video:
[![demo](https://github.com/610265158/simpleface-engine/blob/master/figure/sample.gif)](https://v.youku.com/v_show/id_XNDM3MTY4MTM2MA==.html?spm=a2h3j.8428770.3416059.1)

Expand Down Expand Up @@ -50,23 +43,38 @@ and with face mask:

I will release new model when there is better one. 7.5K trainning data is not enough for a very good model. Please label more data if needed.

## useage

1. pretrained models are in ./pretrained, for easy to use ,we convert them to mnn
2. run `python demo.py --cam_id 0` use a camera
or `python demo.py --video test.mp4` detect for a video
or `python demo.py --img_dir ./test` detect for images dir no track
or `python demo.py --video test.mp4 --mask True` if u want a face mask


## install
```
git clone https://github.com/610265158/Peppa_Pig_Face_Landmark
python setup.py install
```

## useage

```python
# by code:
from lib import FaceAna

from Skps import FaceAna
facer = FaceAna()


boxes, landmarks, _ = facer.run(image)


## detect images, tracing is not used, add
## facer.reset()
```

More details refer to demo.py
run `python demo.py --cam_id 0` use a camera
or `python demo.py --video test.mp4` detect for a video
or `python demo.py --img_dir ./test` detect for images dir no track
or `python demo.py --video test.mp4 --mask True` if u want a face mask






0 comments on commit c80dbd6

Please sign in to comment.