Browse Source
update the readme.
Signed-off-by: wxywb <xy.wang@zilliz.com>
main
wxywb
2 years ago
1 changed files with
3 additions and
1 deletions
-
README.md
|
@ -16,16 +16,18 @@ The pipeline is used to extract the feature vector of detected faces in images. |
|
|
Load an image from path './test_face.jpg'. |
|
|
Load an image from path './test_face.jpg'. |
|
|
|
|
|
|
|
|
*Write a pipeline with explicit inputs/outputs name specifications:* |
|
|
*Write a pipeline with explicit inputs/outputs name specifications:* |
|
|
|
|
|
```python |
|
|
from towhee.dc2 import pipe, ops, DataCollection |
|
|
from towhee.dc2 import pipe, ops, DataCollection |
|
|
|
|
|
|
|
|
p = ( |
|
|
p = ( |
|
|
pipe.input('path') |
|
|
pipe.input('path') |
|
|
.map('path', 'img', ops.image_decode()) |
|
|
.map('path', 'img', ops.image_decode()) |
|
|
.map('img', 'vec', ops.face_embedding.deepface(model_name = 'DeepFace'))) |
|
|
|
|
|
|
|
|
.map('img', 'vec', ops.face_embedding.deepface(model_name = 'DeepFace')) |
|
|
.output('img', 'vec') |
|
|
.output('img', 'vec') |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
DataCollection(p('./test_face.jpg')).show() |
|
|
DataCollection(p('./test_face.jpg')).show() |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
<img src="./image.png" height="200px"/> |
|
|
<img src="./image.png" height="200px"/> |
|
|
|
|
|
|
|
|