Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using InsightFace, for the ML model #925

Open
InferencetrainAI opened this issue Jun 5, 2024 · 0 comments
Open

Using InsightFace, for the ML model #925

InferencetrainAI opened this issue Jun 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@InferencetrainAI
Copy link

Let's migrate to insightface huggingface model to do face feature extraction? Need to figure out how to verify by the model -



import cv2
from insightface.app import FaceAnalysis
import torch

app = FaceAnalysis(name="buffalo_l", providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
app.prepare(ctx_id=0, det_size=(640, 640))

image = cv2.imread("person.jpg")
faces = app.get(image)

faceid_embeds = torch.from_numpy(faces[0].normed_embedding).unsqueeze(0)

Current implementation - https://gitlab.com/inferencetraining.ai/faceAuth/-/blob/master/FaceAuth.py?ref_type=heads

@saidsay-so saidsay-so added the enhancement New feature or request label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants