Walter0807 / MotionBERT

[ICCV 2023] PyTorch Implementation of "MotionBERT: A Unified Perspective on Learning Human Motion Representations"
Apache License 2.0
1.02k stars 123 forks source link

ActionDataset, Single person, make a fake zero person #67

Closed valentin-fngr closed 1 year ago

valentin-fngr commented 1 year ago

Hi,

I am not understanding the idea behind this code :

if motion.shape[0]==1:                                  # Single person, make a fake zero person
                fake = np.zeros(motion.shape)
                motion = np.concatenate((motion, fake), axis=0)

Sometimes motion.shape[2] can be 2. What exactly represents that dimension ? Is it the number of people doing the same action in one frame ?

Thanks

Walter0807 commented 1 year ago

Hi, NTU-RGB+D contains 2-person- and 1-person actions (corresponding to different action classes as shown in https://rose1.ntu.edu.sg/dataset/actionRecognition/). If there is only one person, we zero-pad to maintain the same shape, which is also used in other works such as PoseConv3D.