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

Specific Model Roles in FaceAnalysis and Training Guidance #2548

Open
jadechip opened this issue Mar 26, 2024 · 0 comments
Open

Specific Model Roles in FaceAnalysis and Training Guidance #2548

jadechip opened this issue Mar 26, 2024 · 0 comments

Comments

@jadechip
Copy link

Hello,

I am currently utilizing the FaceAnalysis class from InsightFace for extracting facial embeddings and keypoints from images, and I have a few questions regarding the specific models used in this process, as well as guidance on training these models on private datasets.

Context:

In my application, I execute the following steps:

face_info = app.get(cv2.cvtColor(np.array(face_image), cv2.COLOR_RGB2BGR))
face_info = sorted(face_info, key=lambda x: (x['bbox'][2]-x['bbox'][0])*(x['bbox'][3]-x['bbox'][1]))[-1]
face_emb = face_info['embedding']
face_kps = draw_kps(face_image, face_info['kps'])

Assumptions:

Based on the model files present in the antelopev2 package (scrfd_10g_bnkps.onnx, 2d106det.onnx, glintr100.onnx, genderage.onnx, 1k3d68.onnx), I am assuming the following:

  • scrfd_10g_bnkps.onnx is used for initial face detection.
  • 2d106det.onnx provides detailed facial keypoints.
  • glintr100.onnx is responsible for generating face embeddings.

Questions:

  1. Are my assumptions about the model roles in facial embedding and keypoint extraction correct?
  2. I need to train the models from scratch due to commercial licensing concerns. Specifically, which models are required to replicate the face detection, landmark detection, and embedding generation of the FaceAnalysis process? I suspect I need to train models like ResNet100@Glint360K, SCRFD-10GF, 2d106, and 3d68. I am in the process of creating my own synthetic datasets but can you confirm the training code is available for the antelope suite of models?

Your guidance on training these models with my data would be greatly appreciated 🙏

Thank you.

cc @nttstar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant