From f14fcc840ee6cbd697c5adbf92845aa701c09faf Mon Sep 17 00:00:00 2001 From: Wei-Chen-hub <1259566226@qq.com> Date: Thu, 2 Nov 2023 10:49:50 +0800 Subject: [PATCH] fix --- mmhuman3d/data/data_converters/agora.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mmhuman3d/data/data_converters/agora.py b/mmhuman3d/data/data_converters/agora.py index a75c0770..6f032604 100644 --- a/mmhuman3d/data/data_converters/agora.py +++ b/mmhuman3d/data/data_converters/agora.py @@ -62,7 +62,8 @@ def __init__(self, modes: List = []) -> None: 'jaw_pose': (-1, 3), 'expression': (-1, 10), 'betas_extra': (-1, 1), # how close to kid template - 'betas_fixed': (-1, 10), # gender neutral betas + 'betas_fixed': (-1, 10), # fixed gendered betas + 'betas_neutral': (-1, 10), # neutral betas } super(AgoraConverter, self).__init__(modes) @@ -211,10 +212,10 @@ def convert_by_mode(self, dataset_path: str, out_path: str, if smplx_param['betas'].shape[1] != 10: smplx_param['betas_extra'] = smplx_param['betas'][:, 10:] - smplx_param['betas'] = smplx_param['betas'][:, :10] + smplx_param['betas'] = smplx_param['betas_neutral'][:, :10] else: smplx_param['betas_extra'] = np.zeros([1, 1]) - for key in self.smplx_shape.keys(): + for key in smplx_param.keys(): smplx_[key].append(smplx_param[key]) # # collect keypoints @@ -235,8 +236,8 @@ def convert_by_mode(self, dataset_path: str, out_path: str, self._get_focal_length(image_path), principal_point) # collect meta - # meta_['gender'].append(anno_info['gender']) - meta_['gender'].append('neutral') + meta_['gender'].append(anno_info['gender']) + # meta_['gender'].append('neutral') meta_['principal_point'].append(principal_point) meta_['focal_length'].append(focal_length) meta_['annot_valid'].append(anno_info['is_valid'])