Open InferencetrainAI opened 3 months ago
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
Let's migrate to insightface huggingface model to do face feature extraction? Need to figure out how to verify by the model -
Current implementation - https://gitlab.com/inferencetraining.ai/faceAuth/-/blob/master/FaceAuth.py?ref_type=heads