Skip to main content

A face recognition plugin for OVOS

Project description

FaceEmbeddingsRecognitionPlugin

The FaceEmbeddingsRecognitionPlugin is a plugin designed for recognizing and managing face embeddings.

It uses face_recognition to extract face embeddings and integrates with ovos-chromadb-embeddings-plugin for storing and retrieving voice embeddings.

Features

  • Face Embeddings Extraction: Converts images into face embeddings using the face_recognition library.
  • Face Data Storage: Stores and retrieves face embeddings using ChromaEmbeddingsDB.
  • Face Data Management: Provides methods to add, query, and delete face embeddings associated with user IDs.

Note: face_recognition also requires dlib, which may require additional setup. Please refer to the face_recognition installation instructions for detailed steps.

Usage

Here is a quick example of how to use the FaceEmbeddingsRecognitionPlugin:

from ovos_face_embeddings import FaceEmbeddingsRecognitionPlugin
from ovos_chromadb_embeddings import ChromaEmbeddingsDB

db = ChromaEmbeddingsDB("./face_db")
f = FaceEmbeddingsRecognitionPlugin(db)

a = "/home/miro/PycharmProjects/ovos-user-id/a1.jpg"
a2 = "/home/miro/PycharmProjects/ovos-user-id/a2.jpg"
b = "/home/miro/PycharmProjects/ovos-user-id/b.jpg"

import face_recognition # helper to load from file easily
e1 = face_recognition.load_image_file(a)
e2 = face_recognition.load_image_file(a2)
b = face_recognition.load_image_file(b)

f.add_face("arnold", e1)
f.add_face("silvester", b)
print(f.query(e1))
print(f.query(e2))
print(f.query(b))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ovos-face-embeddings-plugin-0.0.0a0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page