fixed tests in single-trial mode

This commit is contained in:
davidpagnon 2024-04-15 17:11:01 +02:00
parent f57b15ce0b
commit 38eca977ec
3 changed files with 11 additions and 12 deletions

View File

@ -102,17 +102,13 @@ multi_person = true # true for trials with multiple participants. If false, only
# [synchronization] # [synchronization]
## COMING SOON! # display_sync_plots = true # true or false (lowercase)
# reset_sync = true # Recalculate synchronization even if already done # keypoints_to_consider = 'all' # 'all' if all points should be considered (default)
# frames = [2850,3490] # Frames to use for synchronization, should point to a moment with fast motion. # # ['RWrist', 'RElbow'] list of keypoint names if you want to specify the keypoints to consider
# cut_off_frequency = 10 # cut-off frequency for a 4th order low-pass Butterworth filter # approx_time_maxspeed = 'auto' # 'auto' if you want to consider the whole capture (default, slower if long sequences)
## Vertical speeds (on X, Y, or Z axis, or 2D speeds) # # [1.0, 0.2, 0.8, 1.1] list of times in seconds, one value per camera if you want to specify an approximate time where to search for synchronization.
# speed_kind = 'y' # 'x', 'y', 'z', or '2D' # # Best times: only one person is in the scene, who performs a sharp vertical movement (with keypoints_to_consider).
# vmax = 20 # px/s # reset_sync = false # Revert to state before synchronization. Won't attempt to synchronize unless set to false.
# cam1_nb = 4
# cam2_nb = 3
# id_kpt = [9,10] # Pour plus tard aller chercher numéro depuis keypoint name dans skeleton.py. 'RWrist' BLAZEPOSE 16, BODY_25B 10, BODY_25 4 ; 'LWrist' BLAZEPOSE 15, BODY_25B 9, BODY_25 7
# weights_kpt = [1,1] # Pris en compte uniquement si on a plusieurs keypoints
# [personAssociation] # [personAssociation]

View File

@ -107,6 +107,7 @@ def test_workflow():
# STATIC TRIAL # STATIC TRIAL
project_dir = os.path.join("S00_P00_SingleParticipant","S00_P00_T00_StaticTrial") project_dir = os.path.join("S00_P00_SingleParticipant","S00_P00_T00_StaticTrial")
config_dict.get("project").update({"project_dir":project_dir}) config_dict.get("project").update({"project_dir":project_dir})
config_dict.get("synchronization").update({"reset_sync":True})
# Pose2Sim.poseEstimation(config_dict) # Pose2Sim.poseEstimation(config_dict)
Pose2Sim.synchronization(config_dict) Pose2Sim.synchronization(config_dict)
Pose2Sim.personAssociation(config_dict) Pose2Sim.personAssociation(config_dict)
@ -180,7 +181,9 @@ def test_workflow():
config_dict = toml.load('../S01_Demo_SingleTrial/Config.toml') config_dict = toml.load('../S01_Demo_SingleTrial/Config.toml')
project_dir = os.path.join("../S01_Demo_SingleTrial") project_dir = os.path.join("../S01_Demo_SingleTrial")
os.chdir(project_dir)
config_dict.get("project").update({"project_dir":project_dir}) config_dict.get("project").update({"project_dir":project_dir})
config_dict.get("synchronization").update({"display_sync_plots":False})
config_dict['filtering']['display_figures'] = False config_dict['filtering']['display_figures'] = False
Pose2Sim.calibration(config_dict) Pose2Sim.calibration(config_dict)
# Pose2Sim.poseEstimation(config_dict) # Pose2Sim.poseEstimation(config_dict)

View File

@ -27,7 +27,6 @@ frame_range = [] # For example [10,300], or [] for all frames
exclude_from_batch = [] # List of trials to be excluded from batch analysis, ['<participant_dir/trial_dir>', 'etc']. exclude_from_batch = [] # List of trials to be excluded from batch analysis, ['<participant_dir/trial_dir>', 'etc'].
# e.g. ['S00_P00_Participant/S00_P00_T00_StaticTrial', 'S00_P00_Participant/S00_P00_T01_BalancingTrial'] # e.g. ['S00_P00_Participant/S00_P00_T00_StaticTrial', 'S00_P00_Participant/S00_P00_T01_BalancingTrial']
# Take heart, calibration is not that complicated once you get the hang of it!
[pose] [pose]
@ -51,6 +50,7 @@ approx_time_maxspeed = 'auto' # 'auto' if you want to consider the whole capture
reset_sync = false # Revert to state before synchronization. Won't attempt to synchronize unless set to false. reset_sync = false # Revert to state before synchronization. Won't attempt to synchronize unless set to false.
# Take heart, calibration is not that complicated once you get the hang of it!
[calibration] [calibration]
calibration_type = 'convert' # 'convert' or 'calculate' calibration_type = 'convert' # 'convert' or 'calculate'