copied
Readme
Files and versions
Updated 6 months 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.jpg'.
Write a pipeline with explicit inputs/outputs name specifications:
from towhee import pipe, ops, DataCollection
p = (
pipe.input('path')
.map('path', 'img', ops.image_decode())
.map('img', 'vec', ops.face_embedding.deepface(model_name = 'DeepFace'))
.output('img', 'vec')
)
DataCollection(p('./test_face.jpg')).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.
More Resources
- Exploring Multimodal Embeddings with FiftyOne and Milvus - Zilliz blog: This post explored how multimodal embeddings work with Voxel51 and Milvus.
- How to Get the Right Vector Embeddings - Zilliz blog: A comprehensive introduction to vector embeddings and how to generate them with popular open-source models.
- The guide to clip-vit-base-patch32 | OpenAI: clip-vit-base-patch32: a CLIP multimodal model variant by OpenAI for image and text embedding.
- Using Vector Search to Better Understand Computer Vision Data - Zilliz blog: How Vector Search improves your understanding of Computer Vision Data
- Sparse and Dense Embeddings - Zilliz blog: Learn about sparse and dense embeddings, their use cases, and a text classification example using these embeddings.
- Understanding Neural Network Embeddings - Zilliz blog: This article is dedicated to going a bit more in-depth into embeddings/embedding vectors, along with how they are used in modern ML algorithms and pipelines.
- Enhancing Information Retrieval with Sparse Embeddings | Zilliz Learn - Zilliz blog: Explore the inner workings, advantages, and practical applications of learned sparse embeddings with the Milvus vector database
- An Introduction to Vector Embeddings: What They Are and How to Use Them - Zilliz blog: In this blog post, we will understand the concept of vector embeddings and explore its applications, best practices, and tools for working with embeddings.
| 16 Commits | ||
---|---|---|---|
|
1.1 KiB
|
3 years ago | |
|
3.5 KiB
|
6 months ago | |
|
118 B
|
3 years ago | |
|
1.0 KiB
|
3 years ago | |
|
569 KiB
|
3 years ago | |
|
16 B
|
3 years ago |