forked from eth-ait/emdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gt_analysis.py
42 lines (34 loc) · 1.18 KB
/
gt_analysis.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""
Ground truth analysis for SMPL data.
"""
import os
import numpy as np
import matplotlib.pyplot as plt
def analyze_ground_truth(sequence_roots):
"""
Perform data science analyses on the ground truth SMPL data.
Args:
sequence_roots (list): List of paths to sequence root directories.
Returns:
dict: Analysis results
"""
results = {}
for root in sequence_roots:
# Load SMPL data
# This is a placeholder and should be replaced with actual data loading
smpl_data = np.load(os.path.join(root, 'smpl_data.npy'))
# Perform analyses (examples)
results[root] = {
'mean_pose': np.mean(smpl_data, axis=0),
'std_pose': np.std(smpl_data, axis=0),
'max_pose': np.max(smpl_data, axis=0),
'min_pose': np.min(smpl_data, axis=0)
}
# Visualize results (example)
plt.figure(figsize=(10, 6))
plt.plot(results[root]['mean_pose'])
plt.title(f"Mean Pose for {os.path.basename(root)}")
plt.savefig(os.path.join(root, 'mean_pose_plot.png'))
plt.close()
return results
# Add more analysis functions as needed