lmb-freiburg / hand3d

Network estimating 3D Handpose from single color images
GNU General Public License v2.0
802 stars 252 forks source link

Joint coordinate is not right. #9

Closed lyyiangang closed 6 years ago

lyyiangang commented 6 years ago

run.py contains code like this:

keypoints_scoremap_v, keypoint_coord3d_v = sess.run([hand_scoremap_tf, image_crop_tf, scale_tf, center_tf,keypoints_scoremap_tf, keypoint_coord3d_tf],feed_dict={image_tf: image_v})

The input image is ./data/img.png. but I get keypoint_coord3d_v like this:

[[  1.44893011e-06   2.47310300e-06   8.19431716e-06]
 [  1.90374464e-01  -2.14477921e+00  -1.78279579e-01]
 [ -3.34568620e-02  -1.62475693e+00   4.05245125e-02]
 [ -3.15526843e-01  -1.11640537e+00   3.22329104e-01]
 [ -5.08553386e-01  -3.76516193e-01   5.07125676e-01]
 [ -3.13133001e-01  -1.18032885e+00  -1.30266607e+00]
 [  1.37096226e-01  -1.25639629e+00  -1.34058976e+00]
 [  5.93820870e-01  -1.23831999e+00  -1.13210297e+00]
 [  5.98206878e-01  -9.30948436e-01  -4.23936307e-01]
 [ -4.06365603e-01  -5.10450840e-01  -9.82764661e-01]
 [ -1.59013331e-01  -7.13905573e-01  -1.39288712e+00]
 [  5.09743333e-01  -8.13335598e-01  -1.47191596e+00]
 [  7.26554811e-01  -4.88295704e-01  -6.81376576e-01]
 [ -3.66737843e-01  -9.66296196e-02  -9.01745081e-01]
 [ -2.10868478e-01  -2.65226990e-01  -1.37259626e+00]
 [  3.51663291e-01  -2.92807043e-01  -1.53445566e+00]
 [  6.96920574e-01  -4.46554348e-02  -8.14203858e-01]
 [ -3.76463950e-01   2.41669282e-01  -1.09918964e+00]
 [ -1.30924404e-01   1.84271917e-01  -1.45671225e+00]
 [  2.94114619e-01   2.42203340e-01  -1.51309526e+00]
 [  4.97256935e-01   4.71493840e-01  -8.21017146e-01]]

The distance between wrist and thumb tip (keypoint_coord3d_v[0] and keypoint_coord3d_v[1]) is 2.160583, a weird number. What's the unit?? millimeter and meter both are not correct. Does it need a conversion?

Thanks

--

zimmerm commented 6 years ago

The network estimates coordinates inside a normalized coordinate frame. If you want meters you need to scale it approximately by the length of the first index fingers bone. For more details check out the paper: https://arxiv.org/pdf/1705.01389.pdf (section 3 and 4.3)