JinluZhang1126 / MixSTE

Official implementation of CVPR 2022 paper(MixSTE: Seq2seq Mixed Spatio-Temporal Encoder for 3D Human Pose Estimation in Video)
192 stars 16 forks source link

Missing `copy.deepcopy` results in error when creating multiple `Human36mDataset` | 创建多个Human36mDataset时缺少copy.deepcopy会产生索引错误 #46

Open Mine268 opened 1 year ago

Mine268 commented 1 year ago

in file common/h36m_dataset.py:210, constructor

def __init__(self, path, remove_static_joints=True):

invokes the constructor of super class

super().__init__(fps=50, skeleton=h36m_skeleton)

where skeleton is assigned the reference to h36m_skeleton, if parameter remove_static_joints is set True, than multiple invokation of self.remove_joints will results in index error.

To avoid this issue, wrap h36m_skeleton with copy.deepcopy

super().__init__(fps=50, skeleton=copy.deepcopy(h36m_skeleton))