shamangary / FSA-Net

[CVPR19] FSA-Net: Learning Fine-Grained Structure Aggregation for Head Pose Estimation from a Single Image
Apache License 2.0
612 stars 155 forks source link

Error for using in Tensorflowsharp #40

Closed LeeChanHyuk closed 4 years ago

LeeChanHyuk commented 4 years ago

Hello! I want to use your model Thankfully in my project. My project is using Tensorflowsharp in Unity. So i ran my code with your model. (And i think your input layer's name = input_1 , output layer's name=pred_pose/mul_24 right?)

but i got the error.

TFException: Input to reshape is a tensor with 3136 values, but the requested shape has 4096 [[{{node ssr_S_model/reshape_6/Reshape}}]] TensorFlow.TFStatus.CheckMaybeRaise (TensorFlow.TFStatus incomingStatus, System.Boolean last) (at <8fd422194f5048a4af46fe655bc14818>:0) TensorFlow.TFSession.Run (TensorFlow.TFOutput[] inputs, TensorFlow.TFTensor[] inputValues, TensorFlow.TFOutput[] outputs, TensorFlow.TFOperation[] targetOpers, TensorFlow.TFBuffer runMetadata, TensorFlow.TFBuffer runOptions, TensorFlow.TFStatus status) (at <8fd422194f5048a4af46fe655bc14818>:0) TensorFlow.TFSession+Runner.Run (TensorFlow.TFStatus status) (at <8fd422194f5048a4af46fe655bc14818>:0) faces.Update () (at Assets/faces.cs:103)

i try to handle this problem a week... please help me..

shamangary commented 4 years ago

First of all, I have no idea what's tensorflowsharp. However, it seems like the shape of the feature tensor is incorrect. Assuming the code you used is mine, then I guess it's possible that the size of the input image is not 64x64 which is crucial in this case.

LeeChanHyuk commented 4 years ago

Thank you for your reply. yes you were right. i already fixed my error but thank you. And can i know one more? i think the input layer's name is input_1 and output layer's name is pred_pose/mul_24 is it right? i could run your code in my project , but the result is little different. If you can answer me , i think i am so glad to you. Thank you.

shamangary commented 4 years ago

I have no idea what's 'mul_24'. In my code its just 'pred_pose'.

LeeChanHyuk commented 4 years ago

I know the pred_pose is the output layer. But i mean , In pred_pose layer , there are many blocks.(ex - conv or add or mul or something). So i want to know what is the last block in pred_pose layer. When i see your network(pred_pose) , the last block(After this block , there are not any output. That block has only input) is mul_24(multiple 99). My ENG is not good.. I hope you did understand. Thank you so so much.

ps. The image is about mul_24 pp

shamangary commented 4 years ago

I am not familiar with this interface. You are on your own now :0.

LeeChanHyuk commented 4 years ago

Ok thank you