karfly / learnable-triangulation-pytorch

This repository is an official PyTorch implementation of the paper "Learnable Triangulation of Human Pose" (ICCV 2019, oral). Proposed method archives state-of-the-art results in multi-view 3D human pose estimation!
MIT License
1.1k stars 181 forks source link

Bug with n_joints in `train.py` #73

Closed Samleo8 closed 4 years ago

Samleo8 commented 4 years ago

https://github.com/karfly/learnable-triangulation-pytorch/blob/5220551130a6c776d78f4dcfa1079eb1c56c3c04/train.py#L194

I believe this is an error, because keypoints_3d_pred has shape [<batch_size>, <num_keypoints>, 3].

Therefore, this should be changed to either n_joints = keypoints_3d_pred.shape[1] or n_joints = keypoints_3d_pred[0].shape[0].

uyoung-jeong commented 4 years ago

It seems that n_joints is only used in 1-view case. As long as we don't run it in 1-view setup, it would cause no trouble. By the way, I was surprised that I didn't even notice this problem while I ran the script dozens of times. Thank you!

Samleo8 commented 4 years ago

Unfortunately even if you don't intend to run it with the 1-view setup, what I found is that sometimes if the CMU dataset has missing BBOX data for certain cameras/frames. If you have 3 cameras/views but 2 of them have invalid BBOXes, the algorithm will take that particular batch as a 1-view case.

karfly commented 4 years ago

Oh, missed this issue. Thank you @Samleo8 and @uyoung-jeong, fixed that here: acee6d23902442f3692115678bd72643d9066ca4