Face Preparation for Model Prediction
See original GitHub issueHi,
How can I read/align/prepare face for making predict on trained model? I made code like this:
model = create_deepface()
model.load_weights('VGGFace2_DeepFace_weights_val-0.9034.h5')
img = load_img(path)
img = img.resize((152,152))
img_array = img_to_array(img)
img_array = img_array.reshape((-1, 152, 152, 3))
res = model.predict(img_array)
I get different results for every face belonging to the same person.
Thanks a lot for a help
Issue Analytics
- State:
- Created 4 years ago
- Comments:22 (11 by maintainers)
Top Results From Across the Web
Face Recognition for Beginners - Towards Data Science
This technique is usually used to derive a feature space from the image division. The sample image compared to the training set. On...
Read more >How to Perform Face Recognition With VGGFace2 in Keras
This Keras model can be used directly to predict the probability of a given face belonging to one or more of more than...
Read more >Detect faces and predict BMI, Age and Gender using Keras
In this post, we build a model that provides end-to-end capability of detecting faces from image and predicting the BMI, Age and Gender...
Read more >Build a Deep Face Detection Model with Python and Tensorflow
Learn how to build a face detection model using an Object Detection architecture using Tensorflow and Python!
Read more >Deep learning based face beauty prediction via dynamic ...
In this paper, we address Facial Beauty Prediction from static images. The paper contains three main contributions. First, we propose a two- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you so much for your sharing. Indeed, I have 2 questions about the 3D-to-2D process. First, what are the 8 unknows in the affine camera P mean? Location, gesture and lens? Second, the author added the residual r into the 3d coordinates, but this operation can be done only if the coordinates systems are aligned, how could that be done?
I would check the resources you shared and try to re-implement the whole process. By the way, actually, in the modern network, the strong 3D alignment seems not to be a necessity. I am interested in the 3D alignment only because that I am working in the 3D reconstruction of face.
I would let you know when I solve the two questions above.
Thanks again.
Hello, thanks for your work first. I am reading DeepFace, and I am quite confused about the 3D alignment step. To be specific, I cannot tell what is the affine 3D-to-2D camera P (what are the 8 unknowns mean?). Please help me. Thank you a lot.