Open lucasjinreal opened 2 years ago
Hi, were you able to fix this problem?
I also have this problem, so kind of you if you can provide a possible solution!
Assuming that for you, the error also occurs if you want to visualize the created mesh on top of the original image (--visualize="True"
option):
I ended up copying some of the original visualization code and wrote my own routine that does this visualization after the fitting process is done, see https://github.com/jufi2112/smplify-x/blob/dc8d58c80430c629d00fd151f450f2d61fb4b132/vis_on_image.py
So I run SMPLify-X with visualization disabled, which, for me, prevents the error. If you are somehow dependent on having the visualization done during the fitting, I'm afraid I have no solution for you at this time. I will, however, come back here if I randomly stumble upon a solution.
As an interesting side note to this problem: If I only fit one image, I get no problems. The error only occurs after I try to fit multiple images. Therefore, I assume that something with the way the Viewer is handled is not correct. However, I use a system configuration different from the one the authors tested their code on, so this might have something to do with the problem.
Thanks @jufi2112 the problem was solved and it works well now!
@SchweitzerGAO it still breaks for me
Is there any PR merged for this sake?
@y-71 Hi there, this has been long and I forgot about how I dealt with this concretely, sorry about that... Maybe I just disabled the visualization part and this worked.
jufi2112 your code does not work for me!
(base) D:\work\gem\smpl\smplify-x>python vis_on_image.py -d ..\output_folder -i ..\data_folder\images -o .
Person Processing: 0it [00:00, ?it/s] | 0/2071 [00:00<?, ?it/s]
Image Processing: 0%| | 0/2071 [00:00<?, ?it/s]
Traceback (most recent call last):
File "D:\work\gem\smpl\smplify-x\vis_on_image.py", line 266, in <module>
main(args)
File "D:\work\gem\smpl\smplify-x\vis_on_image.py", line 211, in main
result['camera_center'],
KeyError: 'camera_center'
You also need to add the following line: https://github.com/jufi2112/smplify-x/blob/8e594c1e521fbaed1a62e88ad945b36827130022/smplifyx/fit_single_frame.py#L469
This is because the camera center is not part of the original result dict
@jufi2112 mmhhhhhmmmm, this means that I'll need to re-launch the inference again? :'(
Thank you for the fast feedback! I'll try this out!
I had this problem on Windows whenever the pyrender.Viewer was called a second time, my solution was setting run_in_thread=False in 54th line https://github.com/vchoutas/smplify-x/blob/master/smplifyx/mesh_viewer.py#:~:text=%3DFalse%2C-,run_in_thread%3DTrue%2C,-registered_keys%3Dregistered_keys