Spaces:
Runtime error
Runtime error
Update dataloaders/beat_sep_single.py
Browse files
dataloaders/beat_sep_single.py
CHANGED
|
@@ -19,6 +19,8 @@ import pickle
|
|
| 19 |
import librosa
|
| 20 |
import smplx
|
| 21 |
|
|
|
|
|
|
|
| 22 |
from .build_vocab import Vocab
|
| 23 |
from models.utils.wav2vec import Wav2Vec2Model
|
| 24 |
from .data_tools import joints_list
|
|
@@ -76,8 +78,13 @@ class CustomDataset(Dataset):
|
|
| 76 |
else:
|
| 77 |
self.joint_mask[self.ori_joint_list[joint_name][1] - self.ori_joint_list[joint_name][0]:self.ori_joint_list[joint_name][1]] = 1
|
| 78 |
# select trainable joints
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
self.smplx = smplx.SMPLX(
|
| 80 |
-
model_path=
|
| 81 |
gender='NEUTRAL_2020',
|
| 82 |
use_face_contour=False,
|
| 83 |
num_betas=300,
|
|
|
|
| 19 |
import librosa
|
| 20 |
import smplx
|
| 21 |
|
| 22 |
+
from pathlib import Path
|
| 23 |
+
|
| 24 |
from .build_vocab import Vocab
|
| 25 |
from models.utils.wav2vec import Wav2Vec2Model
|
| 26 |
from .data_tools import joints_list
|
|
|
|
| 78 |
else:
|
| 79 |
self.joint_mask[self.ori_joint_list[joint_name][1] - self.ori_joint_list[joint_name][0]:self.ori_joint_list[joint_name][1]] = 1
|
| 80 |
# select trainable joints
|
| 81 |
+
smplx_path = Path(self.args.data_path_1) / "smplx_models"
|
| 82 |
+
if not smplx_path.exists():
|
| 83 |
+
raise FileNotFoundError(
|
| 84 |
+
f"SMPL-X assets missing at {smplx_path}. Ensure they are available before running the demo."
|
| 85 |
+
)
|
| 86 |
self.smplx = smplx.SMPLX(
|
| 87 |
+
model_path=str(smplx_path),
|
| 88 |
gender='NEUTRAL_2020',
|
| 89 |
use_face_contour=False,
|
| 90 |
num_betas=300,
|