logo
Browse Source

update the readme.

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

26
README.md

@ -19,27 +19,19 @@
Extract facial landmarks from './img1.jpg'.
*Write the pipeline in simplified style:*
*Write a pipeline with explicit inputs/outputs name specifications:*
```python
import towhee
from towhee.dc2 import pipe, ops, DataCollection
towhee.glob('./img1.jpg') \
.image_decode.cv2() \
.face_landmark_detection.mobilefacenet() \
.to_list()
```
*Write a same pipeline with explicit inputs/outputs name specifications:*
```python
import towhee
p = (
pipe.input('path')
.map('path', 'img', ops.image_decode())
.map('img', 'landmark', ops.face_landmark_detection.mobilefacenet())
.output('img', 'landmark')
)
towhee.glob['path']('./img1.jpg') \
.image_decode.cv2['path', 'img']() \
.face_landmark_detection.mobilefacenet['img', 'landmark']() \
.select['img','landmark']() \
.show()
DataCollection(p('./img1.jpg')).show()
```
<img src="https://towhee.io/face-landmark-detection/mobilefacenet/raw/branch/main/result.png" alt="result1" style="height:20px;"/>

Loading…
Cancel
Save