Spaces:
Runtime error
Runtime error
""" | |
This script is borrowed and extended from https://github.com/nkolot/SPIN/blob/master/path_config.py | |
path configuration | |
This file contains definitions of useful data stuctures and the paths | |
for the datasets and data files necessary to run the code. | |
Things you need to change: *_ROOT that indicate the path to each dataset | |
""" | |
import os | |
from huggingface_hub import hf_hub_url, cached_download | |
# pymaf | |
pymaf_data_dir = hf_hub_url('Yuliang/PyMAF', '') | |
smpl_data_dir = hf_hub_url('Yuliang/SMPL', '') | |
SMPL_MODEL_DIR = os.path.join(smpl_data_dir, 'models/smpl') | |
SMPL_MEAN_PARAMS = cached_download(os.path.join(pymaf_data_dir, 'smpl_mean_params.npz'), use_auth_token=os.environ['ICON']) | |
MESH_DOWNSAMPLEING = cached_download(os.path.join(pymaf_data_dir, 'mesh_downsampling.npz'), use_auth_token=os.environ['ICON']) | |
CUBE_PARTS_FILE = cached_download(os.path.join(pymaf_data_dir, 'cube_parts.npy'), use_auth_token=os.environ['ICON']) | |
JOINT_REGRESSOR_TRAIN_EXTRA = cached_download(os.path.join(pymaf_data_dir, 'J_regressor_extra.npy'), use_auth_token=os.environ['ICON']) | |
JOINT_REGRESSOR_H36M = cached_download(os.path.join(pymaf_data_dir, 'J_regressor_h36m.npy'), use_auth_token=os.environ['ICON']) | |
VERTEX_TEXTURE_FILE = cached_download(os.path.join(pymaf_data_dir, 'vertex_texture.npy'), use_auth_token=os.environ['ICON']) | |
SMPL_MEAN_PARAMS = cached_download(os.path.join(pymaf_data_dir, 'smpl_mean_params.npz'), use_auth_token=os.environ['ICON']) | |
CHECKPOINT_FILE = cached_download(os.path.join(pymaf_data_dir, 'pretrained_model/PyMAF_model_checkpoint.pt'), use_auth_token=os.environ['ICON']) | |