peteryuX / arcface-tf2

ArcFace unofficial Implemented in Tensorflow 2.0+ (ResNet50, MobileNetV2). "ArcFace: Additive Angular Margin Loss for Deep Face Recognition" Published in CVPR 2019. With Colab.
MIT License
263 stars 60 forks source link

Load arc_res50 pretained model with tensorflow keras load_model #52

Closed tanpengshi closed 2 years ago

tanpengshi commented 2 years ago

Hello! I have downloaded the arc_res50 pretrained model from Google Drive. My question is how can I load the model with tf.keras.models.load_model or tf.saved_model.load? This is because the .pb file is missing.

Otherwise, how can I load the model?

tanpengshi commented 2 years ago

I solved my problem: basically I follow the suggestion here:

https://stackoverflow.com/questions/73909017/how-to-freeze-tensorflow-model-to-pb-without-a-meta-checkpoint-file

Clone the repo and look at test.py to initialize the ArcFace model first