diff --git a/README.md b/README.md index 84d43ad..5ade015 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,92 @@ -# deepface +# Face Embeddings using Deepface + *Author: Krishna katyal* +
+ + + +## Description +The pipeline is used to extract the feature vector of detected faces in images. It uses the for face embeddings [`Deepface`](https://github.com/serengil/deepface). + + +
+ + +## Code Example +Load an image from path './test_face'. + + *Write the pipeline in simplified style*: + +```python +import towhee +towhee.glob('./test_face.jpg') \ + .image_decode.cv2() \ + .face_embedding.deepface(model_name = 'DeepFace').tolist() +``` + + + + +*Write a pipeline with explicit inputs/outputs name specifications:* + + +```python +import towhee + +towhee.glob['path']('./test_face.jpgg') \ + .image_decode.cv2['path', 'img']() \ + .face_embedding.deepface['img', 'vec']() \ + .select['img','vec']() \ + .show() +``` + +
+ + + + +## Factory Constructor + +Create the operator via the following factory method + +***face_embedding.deepface(model_name = 'which model to use')*** + +Model options: +- VGG-Face +- FaceNet +- OpenFace +- DeepFace +- ArcFace +- Dlib +- DeepID + + +
+ + + +## Interface + +A face embedding operator takes a face image as input. It extracts the embedding in ndarray. + +**Parameters:** + +​ ***img:*** *towhee.types.Image (a sub-class of numpy.ndarray)* + +​ The input image. + +**Returns:** *numpy.ndarray* + +​ The extracted image embedding. + + +
+ + + + +**Reference** + +https://github.com/serengil/deepface + +You can refer to [Getting Started with Towhee](https://towhee.io/) for more details. If you have any questions, you can [submit an issue to the towhee repository](https://github.com/towhee-io/towhee/issues). \ No newline at end of file diff --git a/image.png b/image.png new file mode 100644 index 0000000..2132bb1 Binary files /dev/null and b/image.png differ diff --git a/node_modules/.yarn-integrity b/node_modules/.yarn-integrity new file mode 100644 index 0000000..0f19eb7 --- /dev/null +++ b/node_modules/.yarn-integrity @@ -0,0 +1,10 @@ +{ + "systemParams": "darwin-x64-83", + "modulesFolders": [], + "flags": [], + "linkedModules": [], + "topLevelPatterns": [], + "lockfileEntries": {}, + "files": [], + "artifacts": {} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..fb57ccd --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + +