EricGuo5513 / momask-codes

Official implementation of "MoMask: Generative Masked Modeling of 3D Human Motions (CVPR2024)"
https://ericguo5513.github.io/momask/
MIT License
856 stars 73 forks source link

the LOST last frame in VQ MotionDataset. #51

Closed Dai-Wenxun closed 3 weeks ago

Dai-Wenxun commented 6 months ago

In the getitem method of the MotionDataset, I found that the LAST frame of each motion segment cannot be retrieved.

For example, in the first motion, self.cumsum[1] = 129. When item=129, there is idx = 128 since idx=item-self.cumsum[motion_id=0]-1, resulting in the motion segment being [128:128+64] = [128:192], while in fact, the length of this motion should be 129+64=193 according to this line. This issue occurs with every subsequent motion segment. Should I submit a PR to fix this problem?

Dai-Wenxun commented 6 months ago

This issue can be fixed as follows:

self.lengths.append(motion.shape[0] - opt.window_size)
self.lengths.append(motion.shape[0] - opt.window_size + 1)  # Fixed
Murrol commented 3 weeks ago

Cool! Thanks for your careful fix. To keep the code consistent, I might not be able to update this.