MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / get_smpl_model

Function get_smpl_model

mbench/pose_quality.py:23–36  ·  view source on GitHub ↗

Load the SMPL model. :param gender: 'neutral', 'male', or 'female' :param model_path: Path to the SMPL model files :return: SMPL model

(gender='neutral', model_path='data/body_models/smpl', batch_size=1, device='cuda')

Source from the content-addressed store, hash-verified

21 }
22
23def get_smpl_model(gender='neutral', model_path='data/body_models/smpl', batch_size=1, device='cuda'):
24 """
25 Load the SMPL model.
26 :param gender: 'neutral', 'male', or 'female'
27 :param model_path: Path to the SMPL model files
28 :return: SMPL model
29 """
30 kwargs = {'model_path': model_path,
31 'gender': 'neutral',
32 'num_betas': 16,
33 'batch_size': batch_size,
34 'use_pca': False}
35 smpl_model = SMPL(**kwargs).to(device)
36 return smpl_model
37
38def smpl_to_joints_and_verts(smpl_model, smpl_params):
39 """

Callers 1

compute_body_penetrationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected