DenisTome / Lifting-from-the-Deep-release

Implementation of "Lifting from the Deep: Convolutional 3D Pose Estimation from a Single Image"
https://denistome.github.io/papers/lifting-from-the-deep
GNU General Public License v3.0
450 stars 133 forks source link

3D figure doesn't plot on Mac #33

Closed edrdos101 closed 5 years ago

edrdos101 commented 5 years ago

I can't seem to run the 3D pose figure, while the pose_3d results are calculated ok.

Tried both

plot_pose(Prob3dPose.centre_all(single_3D))
plot_pose(single_3D)

Running python 2.7.15 and matplotlib v2.1.0

DenisTome commented 5 years ago

It should show the results automatically.

try to import matplotlib.pyplot as plt and then after you call the plot_pose function, to call plt.show()

but again, this is already included, therefore it should already work

edrdos101 commented 5 years ago

Could you let me know which version of Matplotlib you were building this for? I suppose the solution may lay there, because if I upgrade to v2.2.3 even the 2D plot doesn't show

DenisTome commented 5 years ago

Ok that's should not really happen, because I'm not using anything specific apart from the plot function. I'm using version v3.0.1.

Is it only not visualizing it? or is it also returning any error? If it's the former, then try to do this before importing matplotlib.pyplot

import matplotlib as mpl
mpl.use('TkAgg')
edrdos101 commented 5 years ago

It's just showing an empty figure gui - no error so that's why it's tricky to debug.

Is it supposed to run with python 2.7?

DenisTome commented 5 years ago

Just out of curiosity, what happens if you try to plot something outside the app?

e.g. In the terminal, run python an type:

import matplotlib.pyplot as plt
plt.plot([0, 0], [1, 1])
plt.show()

Does it show anything?

edrdos101 commented 5 years ago

Nope :) Interesting... definitely the problem is not in the code then! I found out that it might be something to do with using matplotlib on the virtualenv (something to do with matplotlib backend)

Anyway, thanks very much for your help!

DenisTome commented 5 years ago

Cool, no worries.

I'm going to close the Issue. Feel free to re-open it if you find any additional problems related to this.