Closed AndreaLanfranchi closed 7 months ago
In that case, we should not be able to load the model weights.
Not sure I follow.
Maybe the confusion is because of that FaceNet models has the backbone of InceptionResNetV1 instead of V2: https://github.com/serengil/deepface/blob/master/deepface/basemodels/Facenet.py#L1673
That's a label ... not a value. And how is the function returning the model is named "V2" ?
should be v1
You also wrote me earlier that you unrolled this impl (which is V2)
no, it should be v1. it is implemented from here: https://github.com/davidsandberg/facenet/blob/master/src/models/inception_resnet_v1.py
also documented the training stage here: https://sefiks.com/2018/09/03/face-recognition-with-facenet-in-keras/
also, reference repo mentioned that it is using v1 in its read me: https://github.com/davidsandberg/facenet
Long story short, I do not expect anything wrong in the model. If that would be possible (additional or missing layers), then pre-trained weight cannot be loaded.
Besides, FaceNet-512d and FaceNet-128d models are the most robust ones in deepface's portfolio according to the accuracy scores.
Do you mind to close this?
Closing as addressed in #1144
I believe the
InceptionResNetV2
function has been unrolled wrongly. Consider this code :As the comment says (and as I've found in other implementations) the block-c should be repeated 5 times. However if we follow the repetitions we can see it goes through 6 iterations as shown here
My strong recommendation is to never unroll such complex loops.