fengju514/Face-Pose-Net

Trouble Running existing model : Can't find renderer

Closed this issue · 6 comments

Hello,

I used git clone --recursive https://github.com/fengju514/Face-Pose-Net.git to get both Face Pose Net and the renderer.

I downloaded the model file and put it in Face-Pose-Net/fpn_new_model

I then used the command python main_fpn.py input.csv to try out the model on the provided data and I keep getting the message :


**** Have you forgeten to "git clone --recursive"? ****
**** You have to do that to also download the face renderer ****


Am I missing a step here to run the code?

Hi @ssundar6087,
that is triggered when it cannot import some files in the renderer as we are catching ImportError Exception.
I now modified the code to output the message from the exception, can you try to re-run again?
Maybe the output now can help more in understanding.
Regardless, we haven't optimized the code too much but I guess you are having problems importing myutil.

Update now the code. I think I have fixed your problem.

I hope this helps.

@iacopomasi Thank you, the updated code helped me identify what I was missing. Another question : Is there a flag to enable GPU ? When I run the main_fpn py file, it uses CPU even though I have tensorflow installed with GPU support. Thanks!

Try to give a look here for the GPU support. It should be easy to activate it.

@iacopomasi Perfect! works great. Thanks a lot. One final question. To estimate head pose, the only inputs needed are the face image, the bounding box demarcating the face and the model, right? The output pose is located in the pred_Rts variable? The other parameters such as the output_lmdb are only used by the renderer? Am I correct in my understanding?

Yes, everything you said is almost correct.
The output pose is stored in the lmdb file ./output_pose.lmdb.
By quoting #11 you can see that

6 degrees mean the rotations (pitch, yaw, roll) and translations in x,y,z-axis
0,22,40,55,75 degrees are the views that we can render the input image to the yaw-0,22,40,55,75 degrees, after getting 6 DoF 3D head pose and running our face renderer

Yes, it is saved in ./output_pose.lmdb, as shown in line 25 of main_fpn.py
and it will be feed into render_fpn.py in line 50 of main_fpn.py for the rendering.

I hope this helps.