Skip to content

Commit 6e50ee0

Browse files
fix: docs + add procedural staircase skips in AMASS
1 parent 5e7c241 commit 6e50ee0

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

docs/downloading_data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Run ```./prepare_data.sh``` script to prepare the folder structure for the datas
44

55
## AMASS dataset
66

7-
1) Register on the [AMASS website](https://amass.is.tue.mpg.de/) and download the datasets you want to use. Make sure to download SMPL-X data (gender doesn't matter). Put the downloaded files into ```./assets/amass/datasets``` subfolder.
7+
1) Register on the [AMASS website](https://amass.is.tue.mpg.de/) and download the datasets you want to use. Make sure to download SMPL-H data (gender doesn't matter). Put the downloaded files into ```./assets/amass/datasets``` subfolder.
88

99
2) Register and download the [SPML-H model](https://download.is.tue.mpg.de/download.php?domain=mano&resume=1&sfile=smplh.tar.xz) and extract it into ```./assets/amass/body_models``` subfolder
1010

recap/amass/data_loader.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ def __init__(
1919
shuffle=False,
2020
name_blacklist=None,
2121
name_whitelist=None,
22+
skip_stairs=False,
2223
device="cpu",
2324
):
2425
self.datasets_path = datasets_path
26+
self.skip_stairs = skip_stairs
2527
self.device = device
2628
self.target_fps = target_fps
2729
self.template_scale = torch.tensor(template_scale, device=device)
@@ -155,7 +157,11 @@ def preprocess(self, path) -> AMASSMotionWrapper:
155157
)
156158

157159
heel_indices = [SMPLH_JOINT_NAMES_TO_IDX["left_ankle"], SMPLH_JOINT_NAMES_TO_IDX["right_ankle"]]
158-
if torch.any(positions[:, heel_indices, 2] > positions[:, 0, 2].mean() * 0.3).sum().item() > 0:
160+
if (
161+
self.skip_stairs
162+
and torch.any(positions[:, heel_indices, 2] > positions[:, 0, 2].mean() * 0.3).sum().item() > 0
163+
):
164+
print("Stairs present in the clip")
159165
return None
160166

161167
return clip_name, AMASSMotionWrapper(positions=positions, rotations=rotations)
@@ -189,6 +195,7 @@ def _load_and_validate_clip(self, path):
189195
return None
190196

191197
if seq_length is None or seq_length < 10:
198+
print("sequence duration is too small")
192199
return None
193200

194201
# Trim sequences to valid length

0 commit comments

Comments
 (0)