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

Same embedding for every face when useGpu = false #7

Open
leandro-miguenz opened this issue Aug 21, 2024 · 1 comment
Open

Same embedding for every face when useGpu = false #7

leandro-miguenz opened this issue Aug 21, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@leandro-miguenz
Copy link

leandro-miguenz commented Aug 21, 2024

Hi @shubham0204, I'm trying out your app and I have noticed an issue. When the FaceNet useGpu parameter is set to false, the app seems to recognize every face as the same person. This appears to be because faceNet.getFaceEmbedding() method is consistently returning the same value.

Have you encountered this before, and do you have any suggestions on how to address it for devices that don't support GPU delegate?

Steps to reproduce the issue:

  1. In AppModule, change the provideFaceNetEmbeddingModel method to set useGpu to false when creating FaceNet instance:
fun provideFaceNetEmbeddingModel(context: Application): FaceNet {
    return FaceNet(context, false)
}
  1. Run the app and add a new face

  2. Point the camera to any face. It will always be recognized as the one you just added.

@shubham0204 shubham0204 self-assigned this Aug 25, 2024
@shubham0204
Copy link
Owner

@leandro-miguenz How did you know that the model is producing the same embedding? Can you add a log statement in FaceNet.kt and check if the embeddings (vectors) are the same even for different faces?

@shubham0204 shubham0204 added the bug Something isn't working label Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants