Datasets:
image imagewidth (px) 2.8k 2.8k | label class label 43
classes |
|---|---|
0S011 | |
0S011 | |
1S012 | |
2S015 | |
2S015 | |
2S015 | |
3S017 | |
4S019 | |
4S019 | |
4S019 | |
5S020 | |
6S026 | |
6S026 | |
6S026 | |
6S026 | |
6S026 | |
7S027 | |
7S027 | |
8S028 | |
8S028 | |
9S029 | |
10S031 | |
10S031 | |
10S031 | |
10S031 | |
11S032 | |
11S032 | |
11S032 | |
12S033 | |
12S033 | |
12S033 | |
12S033 | |
13S034 | |
13S034 | |
13S034 | |
13S034 | |
14S038 | |
15S039 | |
16S041 | |
17S042 | |
18S045 | |
18S045 | |
18S045 | |
19S047 | |
20S049 | |
20S049 | |
21S054 | |
22S061 | |
22S061 | |
22S061 | |
23S064 | |
23S064 | |
24S066 | |
25S067 | |
25S067 | |
26S073 | |
26S073 | |
27S075 | |
28S080 | |
28S080 | |
28S080 | |
29S081 | |
29S081 | |
29S081 | |
29S081 | |
30S082 | |
31S083 | |
32S084 | |
32S084 | |
32S084 | |
32S084 | |
33S091 | |
34S108 | |
34S108 | |
34S108 | |
34S108 | |
35S109 | |
35S109 | |
35S109 | |
35S109 | |
35S109 | |
36S112 | |
36S112 | |
36S112 | |
36S112 | |
37S113 | |
37S113 | |
37S113 | |
37S113 | |
38S114 | |
38S114 | |
39S116 | |
39S116 | |
39S116 | |
39S116 | |
39S116 | |
40S117 | |
40S117 | |
40S117 | |
40S117 |
Policy Reference NPZ Data
This dataset contains per-subject, per-trial .npz files exported from processed OpenSim inverse dynamics results for level walking.
The files are intended for comparing policy inference outputs against OpenSim ID torques. Each exported trial uses the kinematics timeline as the master timeline, with time and timestep reset to start from zero.
ID torques are normalized by the subject's weight in kg from Subject_Demographics.xlsx. GRF force components are normalized by body weight in Newtons, computed as subject_weight_kg * 9.80665.
Processing Notes
The .npz files are exported from the processed OpenSim ID outputs in OpenSim_ID/batch_id_results.
Before inverse dynamics, the source pipeline applies the following trial-level processing:
Step01andStep02kinematics and GRF files are combined into oneStep01_Step02window.- Kinematics are low-pass filtered before ID.
- Subject-specific scaled OpenSim models are used when available, preferring
OpenSim_ID/scaled_models/<subject>/<subject>_scaled.osim. - Trials are processed only when both step GRF files pass the double-peak vertical GRF check used by the batch ID script.
- GRF point columns are converted from millimeters to meters when needed.
- GRF force channels are assigned to
calcn_rorcalcn_lusing TRC heel/toe marker proximity during stance. If TRC marker matching is unavailable, the script falls back to the COP-based side heuristic. - A per-trial, per-force-channel COP offset is estimated when the COP point is far from the assigned foot marker segment. This corrects force-plate point locations before ID, for example when one channel's COP is shifted by approximately a force-plate-length offset.
- Trials are skipped during batch ID if the corrected COP has too little early-to-late displacement along the assigned foot's heel-to-toe marker segment, too little early-to-late movement in the lab frame, or remains too far from the assigned foot after correction. These checks are normalized by the subject's heel-to-toe marker length, so the QC is not based on an absolute foot size.
The exported computed_grf therefore reflects the corrected GRF file used for inverse dynamics. Force-vector columns are normalized by body weight in Newtons in the .npz; COP and ground-torque columns remain in their corrected physical units.
Folder Structure
S011/
S011_Trial01_Step01_Step02.npz
S011_Trial02_Step01_Step02.npz
...
S012/
S012_Trial01_Step01_Step02.npz
...
Each .npz file corresponds to one subject/trial/step window.
Arrays
Each file contains:
| Key | Shape | Description |
|---|---|---|
subject |
scalar string | Subject ID, for example S011. |
trial |
scalar string | Trial name, for example Trial01. |
step_label |
scalar string | Step label, currently Step01_Step02. |
timestep |
(T,) |
Zero-based integer timestep over the kinematics sequence. |
time_sec |
(T,) |
Kinematics time in seconds, shifted so the first frame is 0.0. |
source_time_sec |
(T,) |
Same zero-start kinematics time as time_sec. |
original_kinematics_time_sec |
(T,) |
Original OpenSim kinematics timestamps before zero-shifting. |
id_source_time_sec |
(N_id,) |
Original ID timestamps shifted relative to the first kinematics frame. |
original_id_source_time_sec |
(N_id,) |
Original OpenSim ID timestamps before zero-shifting. |
joint_angle |
(T, N_angle) |
Joint angle / coordinate values from kinematics, on the kinematics timeline. |
joint_angle_columns |
(N_angle,) |
Column names for joint_angle. |
joint_torque |
(T, N_torque) |
ID torques from the processed OpenSim ID run, aligned onto the kinematics timeline and divided by subject_weight_kg. Missing rows are NaN. |
joint_torque_columns |
(N_torque,) |
Column names for joint_torque. |
joint_torque_valid |
(T,) |
Boolean mask where joint_torque has valid ID values. |
joint_torque_normalization |
scalar string | Normalization applied to joint_torque, currently divided_by_subject_weight_kg. |
joint_torque_units |
scalar string | Normalized torque units, currently original_ID_units_per_kg. |
subject_weight_kg |
scalar float | Subject weight used for normalizing joint_torque. |
subject_body_weight_n |
scalar float | Subject body weight in Newtons, computed as subject_weight_kg * 9.80665. |
computed_grf |
(T, N_grf) |
Corrected GRF values used by ID, interpolated onto the kinematics timeline. Force-vector columns are divided by subject_body_weight_n; COP and torque columns remain in corrected physical units. |
computed_grf_columns |
(N_grf,) |
Column names for computed_grf. |
computed_grf_valid |
(T,) |
Boolean mask where computed_grf has valid values. |
computed_grf_normalization |
scalar string | Normalization applied to computed_grf, currently force_columns_divided_by_subject_body_weight_n. |
computed_grf_units |
scalar string | Force columns are in body weight units; COP and torque columns remain in corrected physical units. |
source_files |
(3,) |
Source kinematics, ID torque, and GRF file paths used for export. |
Policy Comparison
Run policy inference using joint_angle. The policy output should have the same first dimension T.
Compare predicted normalized torque against OpenSim ID only where joint_torque_valid is true:
import numpy as np
data = np.load("S011/S011_Trial01_Step01_Step02.npz")
joint_angle = data["joint_angle"]
target_torque = data["joint_torque"]
valid = data["joint_torque_valid"]
subject_weight_kg = float(data["subject_weight_kg"])
predicted_torque = policy(joint_angle)
predicted_torque = predicted_torque / subject_weight_kg
error = predicted_torque[valid] - target_torque[valid]
Rows where joint_torque_valid is false correspond to kinematics frames without an ID result and should be skipped for torque comparison.
- Downloads last month
- 35