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

Embeddings do not match with the original facenet_keras.h5 #40

Open
sahilkhatri opened this issue Jun 3, 2021 · 1 comment
Open

Embeddings do not match with the original facenet_keras.h5 #40

sahilkhatri opened this issue Jun 3, 2021 · 1 comment

Comments

@sahilkhatri
Copy link

Hey, I created facenet_engine.plan file using the facenet.onnx file. When I ran the code for inference, it didn't gave any correct recognition results. I compared the embeddings (same image) generated from facenet.h5 and facenet_engine.plan file, it turns out that they both are COMPLETELY DIFFERENT. What could possibly be the reason for this strange result?

Also, I got error "AssertionError: Bottleneck_BatchNorm/batchnorm_1/add_1:0 is not in graph" while converting from facenet.pb to facenet.onnx. So, I used the command "python -m tf2onnx.convert --input path-to-facenet.pb --inputs input:0[1,160,160,3] --inputs-as-nchw input_1:0 --outputs Bottleneck/BatchNorm/batchnorm/add_1:0 --output path-to-save-facenet.onnx" instead. Later one worked without causing any error.

Please help me to get the right embeddings!
Thank you!

@shubham-shahh
Copy link
Collaborator

Hey, I created facenet_engine.plan file using the facenet.onnx file. When I ran the code for inference, it didn't gave any correct recognition results. I compared the embeddings (same image) generated from facenet.h5 and facenet_engine.plan file, it turns out that they both are COMPLETELY DIFFERENT. What could possibly be the reason for this strange result?

Also, I got error "AssertionError: Bottleneck_BatchNorm/batchnorm_1/add_1:0 is not in graph" while converting from facenet.pb to facenet.onnx. So, I used the command "python -m tf2onnx.convert --input path-to-facenet.pb --inputs input:0[1,160,160,3] --inputs-as-nchw input_1:0 --outputs Bottleneck/BatchNorm/batchnorm/add_1:0 --output path-to-save-facenet.onnx" instead. Later one worked without causing any error.

Please help me to get the right embeddings!
Thank you!

Hi, did you follow all the instructions mentioned in the develop branch?

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

2 participants