logo
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readme
Files and versions

Updated 3 years ago

face-embedding

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.


Code Example

Load an image from path './test_face'.

Write the pipeline in simplified style:

import towhee 
towhee.glob('./test_face.jpg') \
  .image_decode.cv2() \
  .face_embedding.deepface(model_name = 'DeepFace').to_list()

Write a pipeline with explicit inputs/outputs name specifications:

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
  • Facenet512


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 for more details. If you have any questions, you can submit an issue to the towhee repository.

krishna katyal bfc93a57de changed the operator 8 Commits
folder-icon node_modules Readme update 3 years ago
file-icon .gitattributes
1.1 KiB
download-icon
Initial commit 3 years ago
file-icon README.md
1.6 KiB
download-icon
changed the Readme 3 years ago
file-icon __init__.py
118 B
download-icon
added the init file 3 years ago
file-icon deepface.py
1.0 KiB
download-icon
changed the operator 3 years ago
file-icon image.png
569 KiB
download-icon
Readme update 3 years ago
file-icon requirements.txt
8 B
download-icon
Init the repository 3 years ago
file-icon yarn.lock
86 B
download-icon
Readme update 3 years ago