From 73c7a00fad43e53d6647a6d82a0bbf11e0ecc0e2 Mon Sep 17 00:00:00 2001 From: 532stary4 <61381495+532stary4@users.noreply.github.com> Date: Sun, 17 Oct 2021 17:10:40 +0100 Subject: [PATCH] Fix AttributeError Fix AttributeError: 'SMPLlayer' object has no attribute 'NUM_EXPR' --- easymocap/smplmodel/body_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easymocap/smplmodel/body_model.py b/easymocap/smplmodel/body_model.py index ea88066..1ebf2f3 100644 --- a/easymocap/smplmodel/body_model.py +++ b/easymocap/smplmodel/body_model.py @@ -378,7 +378,7 @@ class SMPLlayer(nn.Module): 'Th': np.zeros((nFrames, 3)), } if self.model_type == 'smplx': - params['expression'] = np.zeros((nFrames, self.NUM_EXPR)) + params['expression'] = np.zeros((nFrames, NUM_EXPR)) if ret_tensor: for key in params.keys(): params[key] = to_tensor(params[key], self.dtype, self.device) @@ -390,7 +390,7 @@ class SMPLlayer(nn.Module): if body_params['poses'].shape[1] != self.NUM_POSES: body_params['poses'] = np.hstack((body_params['poses'], np.zeros((nFrames, self.NUM_POSES - body_params['poses'].shape[1])))) if model_type == 'smplx' and 'expression' not in body_params.keys(): - body_params['expression'] = np.zeros((nFrames, self.NUM_EXPR)) + body_params['expression'] = np.zeros((nFrames, NUM_EXPR)) return body_params @staticmethod