deepgaze icon indicating copy to clipboard operation
deepgaze copied to clipboard

How could I load the head pose estimator pre-trained model by checkpoint?

Open laurence-lin opened this issue 3 years ago • 1 comments

Hello, I'm Laurence, thank you for your kindly sharing. I'm currently using head pose estimation for my project, however I've noticed that the tensorflow implementation used methods in tensorflow 1.x for operating.

As for the loading yaw_variable, pitch_variable part, the file in .etc use .tf file then tf.train.Saver to restore the variables.

Could I use checkpoint method to load these variables? I haven't found a method to do it. Thank you!

laurence-lin avatar Sep 17 '20 09:09 laurence-lin

Hi @laurence-lin you are right, Deepgaze head pose estimation is based on Tensorflow 1.x. However, it should not be too difficult to load the weights in Tensorflow 2.x since they have been stored as individual tensors.

I suggest you to give a look to the official documentations here. In particular give a look at this section where they explain how to load old checkpoints into TF 2 models. Searching on GitHub you can probably find some projects where this has been done.

Hope this helped.

mpatacchiola avatar Sep 17 '20 11:09 mpatacchiola