fix read smpl bug

This commit is contained in:
Qing Shuai 2022-08-23 21:05:35 +08:00
parent 0175f07290
commit de973d4047

View File

@ -152,6 +152,8 @@ def read_smpl(outname):
assert os.path.exists(outname), outname assert os.path.exists(outname), outname
datas = read_json(outname) datas = read_json(outname)
outputs = [] outputs = []
if isinstace(datas, dict):
datas = datas['annots']
for data in datas: for data in datas:
for key in ['Rh', 'Th', 'poses', 'shapes']: for key in ['Rh', 'Th', 'poses', 'shapes']:
data[key] = np.array(data[key]) data[key] = np.array(data[key])
@ -255,4 +257,4 @@ if __name__ == '__main__':
# Only exit to OS when we are not running in Blender GUI # Only exit to OS when we are not running in Blender GUI
if bpy.app.background: if bpy.app.background:
sys.exit(exit_status) sys.exit(exit_status)