Skip to content

Commit 394e395

Browse files
committed
fixed other issue for marker augmentation when nans in trc
1 parent 7c83616 commit 394e395

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sports2D/process.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,6 +1844,7 @@ def process_fun(config_dict, video_file, time_range, frame_rate, result_dir):
18441844
# Convert to meters
18451845
px_to_m_i = [convert_px_to_meters(trc_data[i][kpt_name], first_person_height, height_px, cx, cy, -floor_angle_estim, visible_side=visible_side_i) for kpt_name in new_keypoints_names]
18461846
trc_data_m_i = pd.concat([all_frames_time.rename('time')]+px_to_m_i, axis=1)
1847+
trc_data_m_i = trc_data_m_i.ffill(axis=0).bfill(axis=0)
18471848
px_to_m_unfiltered_i = [convert_px_to_meters(trc_data_unfiltered[i][kpt_name], first_person_height, height_px, cx, cy, -floor_angle_estim) for kpt_name in new_keypoints_names]
18481849
trc_data_unfiltered_m_i = pd.concat([all_frames_time.rename('time')]+px_to_m_unfiltered_i, axis=1)
18491850

@@ -2097,6 +2098,7 @@ def process_fun(config_dict, video_file, time_range, frame_rate, result_dir):
20972098
Pose2Sim_config_dict['project']['participant_mass'] = masses
20982099
Pose2Sim_config_dict['pose']['pose_model'] = pose_model_name.upper()
20992100
Pose2Sim_config_dict = to_dict(Pose2Sim_config_dict)
2101+
print(Pose2Sim_config_dict)
21002102

21012103
# Marker augmentation
21022104
if use_augmentation:

0 commit comments

Comments
 (0)