diff --git a/README.md b/README.md index 379ec2b..f195ff5 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,18 @@ *author: David Wang* +
-## Desription + + +## Description This operator extracts embedding vector from facial image using [Inception-ResNet](https://arxiv.org/pdf/1602.07261.pdf). The implementation is an adaptation from [timesler/facenet-pytorch](https://github.com/timesler/facenet-pytorch). + +
+ + ## Code Example Extract face image embedding from './img.png'. @@ -31,12 +38,16 @@ import towhee towhee.glob['path']('./img.png') \ .image_decode.cv2['path', 'img']() \ .face_embedding.inceptionresnetv1['img', 'vec']() \ - .select('img','vec') \ + .select['img','vec']() \ .show() ``` result +
+ + + ## Factory Constructor Create the operator via the following factory method @@ -45,24 +56,27 @@ Create the operator via the following factory method **Parameters:** -***image_size***: *int* +***image_size:*** *int* Scaled input image size to extract embedding. The higher resolution would generate the more discriminateive feature but cost more time to calculate. supported types: `int`, default is 160. +
+ + ## Interface A face embedding operator takes a face image as input. It extracts the embedding 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 input image. -**Returns**: *numpy.ndarray* +**Returns:** *numpy.ndarray* ​ The extracted image embedding.