Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ex_aflw_parser] #61

Open
speculaas opened this issue Sep 4, 2018 · 1 comment
Open

[ex_aflw_parser] #61

speculaas opened this issue Sep 4, 2018 · 1 comment

Comments

@speculaas
Copy link

Dear mpatacchiola,

Thanks for your help!

https://github.com/mpatacchiola/deepgaze/blob/master/examples/ex_dnn_head_pose_estimation_training/ex_aflw_parser.py

In the above file:

#Separating the label from the dataset
dataset = data[:,0:4096]
label = data[:,4096:4099]

I think length of the image in 1D should be 64*64 = 4096?
It's 1600 in the current commit and I got error when I try to run ex_dnn_head_pose_estimation_training.py :

Training set (19507, 1600) (19507, 3)
Validation set (2438, 1600) (2438, 3)
Test set (2439, 1600) (2439, 3)
Starting Graph creation...
Traceback (most recent call last):
File "ex_dnn_head_pose_estimation_training.py", line 182, in
weights_output3, biases_output3)
File "ex_dnn_head_pose_estimation_training.py", line 105, in multilayer_model
_input0_result = tf.matmul(_X, _input0) + _biases_input0
File "/home3/jimmy_extra_space/headpose/deepgaze/.env/local/lib/python2.7/site-packages/tensorflow/python/ops/math_ops.py", line 2018, in matmul
a, b, transpose_a=transpose_a, transpose_b=transpose_b, name=name)
File "/home3/jimmy_extra_space/headpose/deepgaze/.env/local/lib/python2.7/site-packages/tensorflow/python/ops/gen_math_ops.py", line 4456, in mat_mul
name=name)
File "/home3/jimmy_extra_space/headpose/deepgaze/.env/local/lib/python2.7/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "/home3/jimmy_extra_space/headpose/deepgaze/.env/local/lib/python2.7/site-packages/tensorflow/python/util/deprecation.py", line 454, in new_func
return func(*args, **kwargs)
File "/home3/jimmy_extra_space/headpose/deepgaze/.env/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 3155, in create_op
op_def=op_def)
File "/home3/jimmy_extra_space/headpose/deepgaze/.env/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1731, in init
control_input_ops)
File "/home3/jimmy_extra_space/headpose/deepgaze/.env/local/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 1579, in _create_c_op
raise ValueError(str(e))
ValueError: Dimensions must be equal, but are 1600 and 4096 for 'MatMul_4' (op: 'MatMul') with input shapes: [2438,1600], [4096,256].

I changed the 1600 to 4096 and was able to proceed with ex_dnn_head_pose_estimation_training.py.

Also I did a brief search here, but didn't find such issue.
Hope this is not a duplicate issue.

BR,
JimmyYS

@NieHw
Copy link

NieHw commented Oct 22, 2018

You should resize the face pictures to 64 * 64 at first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants