draft for batch processing

This commit is contained in:
davidpagnon 2023-12-06 09:48:11 +01:00
parent 4209aea3ec
commit 7652d271ff
705 changed files with 873 additions and 118883 deletions

View File

@ -2,34 +2,22 @@
## PROJECT PARAMETERS ## ## PROJECT PARAMETERS ##
############################################################################### ###############################################################################
# Configure your project parameters here
# IMPORTANT: All configuration parameters specified at that level will
# overwrite the ones given in the subfolders.
# Example: A parameter given in the Config.toml file at the Session level
# will be ignored if it is also given at the Participant or Trial level.
[project] [project]
project_dir = '' # BETWEEN SINGLE QUOTES! # If empty, project dir is current dir frame_rate = 60 # FPS
frame_range = [] #For example [10,300], or [] for all frames frame_range = [] # For example [10,300], or [] for all frames
frame_rate = 60 #Hz # N.B.: If you want a time range instead, use frame_range = time_range * frame_rate
# For example if you want to analyze from 0.1 to 2 seconds with a 60 fps frame rate,
rawImg_folder_name = 'raw' # frame_range = [0.1, 2.0]*frame_rate = [6, 120]
calib_folder_name = 'calibration'
pose_folder_name = 'pose'
pose_json_folder_extension = 'json'
pose_img_folder_extension = 'img'
poseAssociated_folder_name = 'pose-associated'
pose3d_folder_name = 'pose-3d'
opensim_folder_name = 'opensim'
[pose]
pose_model = 'BODY_25B' #With openpose: BODY_25B, BODY_25, BODY_135, COCO, MPII.
#With mediapipe: BLAZEPOSE.
#With alphapose: HALPE_26, HALPE_68, HALPE_136, COCO_133.
#With deeplabcut: CUSTOM. See example at the end of the file.
# What follows has not been implemented yet
pose_framework = 'openpose' # 'openpose', 'mediapipe', 'alphapose', 'deeplabcut'
overwrite_pose = false
openpose_path = '' # only checked if OpenPose is used
# 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'
@ -38,52 +26,83 @@ calibration_type = 'convert' # 'convert' or 'calculate'
[calibration.convert.qualisys] [calibration.convert.qualisys]
binning_factor = 1 # Usually 1, except when filming in 540p where it usually is 2 binning_factor = 1 # Usually 1, except when filming in 540p where it usually is 2
[calibration.convert.optitrack] # See readme for instructions [calibration.convert.optitrack] # See readme for instructions
[calibration.convert.vicon] # No parameters needed [calibration.convert.vicon] # No parameter needed
[calibration.convert.opencap] # No parameters needed [calibration.convert.opencap] # No parameter needed
[calibration.convert.easymocap] # No parameters needed [calibration.convert.easymocap] # No parameter needed
[calibration.convert.biocv] # No parameters needed [calibration.convert.biocv] # No parameter needed
[calibration.convert.anipose] # No parameter needed
[calibration.convert.freemocap] # No parameter needed
[calibration.calculate] [calibration.calculate]
calculate_method = 'board' # 'board' or 'points' # Camera properties, theoretically need to be calculated only once in a camera lifetime
[calibration.calculate.intrinsics]
[calibration.calculate.board.intrinsics] # camera properties, only needs to be done once
intrinsics_board_type = 'checkerboard' # 'checkerboard' ('charucoboard' not supported yet)
overwrite_intrinsics = false # overwrite (or not) if they have already been calculated? overwrite_intrinsics = false # overwrite (or not) if they have already been calculated?
show_detection_intrinsics = true # true or false (lowercase) show_detection_intrinsics = true # true or false (lowercase)
intrinsics_extension = 'jpg' # any video or image extension intrinsics_extension = 'jpg' # any video or image extension
extract_every_N_sec = 1 # if video, extract frames every N seconds (can be <1 ) extract_every_N_sec = 1 # if video, extract frames every N seconds (can be <1 )
intrinsics_corners_nb = [4,7] intrinsics_corners_nb = [4,7]
intrinsics_square_size = 60 # mm intrinsics_square_size = 60 # mm
intrinsics_marker_size = 40 # mm # only checked if charucoboard
intrinsics_aruco_dict = 'DICT_6X6_250' # only checked if charucoboard # see https://docs.opencv.org/3.4/dc/df7/dictionary_8hpp.html
[calibration.calculate.board.extrinsics] # camera placement, needs to be done every time
extrinsics_board_type = 'scene' # 'checkerboard', 'scene' ('charucoboard' not supported yet)
# 'board' should be large enough to be detected when laid on the floor.
# 'scene' involves manually clicking any point of know coordinates on scene. Usually more accurate if points are spread out
moving_camera = false # Not implemented yet
calculate_extrinsics = true # true or false (lowercase)
show_reprojection_error = true # true or false (lowercase)
extrinsics_extension = 'png' # any video or image extension
# if extrinsics_board_type = 'checkerboard' or 'charucoboard'
extrinsics_corners_nb = [4,7] # [H,W] rather than [w,h]
extrinsics_square_size = 60 # mm # [h,w] if square is actually a rectangle
extrinsics_marker_size = 40 # mm # only checked if 'charucoboard' (not supported yet)
extrinsics_aruco_dict = 'DICT_6X6_250' # only checked if 'charucoboard' # see https://docs.opencv.org/3.4/dc/df7/dictionary_8hpp.html
# if extrinsics_board_type = 'scene'
# list of 3D coordinates to be manually labelled on images. Can also be a 2 dimensional plane. # in m
object_coords_3d = [[-2.0, 0.3, 0.0], [-2.0 , 0.0, 0.0], [-2.0, 0.0, 0.05], [-2.0, -0.3 , 0.0], [0.0, 0.3, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.05], [0.0, -0.3, 0.0]] # in meters -> Not in mm! <-
[calibration.calculate.points]
calibration_points = 'wand' # 'wand' or 'keypoints'
# Not supported yet.
# Camera placements, need to be done before every session
[calibration.calculate.extrinsics]
extrinsics_method = 'scene' # 'board', 'scene', 'keypoints'
# 'board' should be large enough to be detected when laid on the floor. Not recommended.
# 'scene' involves manually clicking any point of know coordinates on scene. Usually more accurate if points are spread out.
# 'keypoints' uses automatic pose estimation of a person freely walking and waving arms in the scene. Slighlty less accurate, requires synchronized cameras.
moving_cameras = false # Not implemented yet
calculate_extrinsics = true # true or false (lowercase)
[calibration.calculate.extrinsics.board]
show_reprojection_error = true # true or false (lowercase)
extrinsics_extension = 'png' # any video or image extension
extrinsics_corners_nb = [4,7] # [H,W] rather than [w,h]
extrinsics_square_size = 60 # mm # [h,w] if square is actually a rectangle
[calibration.calculate.extrinsics.scene]
show_reprojection_error = true # true or false (lowercase)
extrinsics_extension = 'png' # any video or image extension
# list of 3D coordinates to be manually labelled on images. Can also be a 2 dimensional plane.
# in m -> unlike for intrinsics, NOT in mm!
object_coords_3d = [[-2.0, 0.3, 0.0],
[-2.0 , 0.0, 0.0],
[-2.0, 0.0, 0.05],
[-2.0, -0.3 , 0.0],
[0.0, 0.3, 0.0],
[0.0, 0.0, 0.0],
[0.0, 0.0, 0.05],
[0.0, -0.3, 0.0]]
[calibration.calculate.extrinsics.keypoints]
# Coming soon!
[pose]
pose_framework = 'openpose' # 'openpose', 'mediapipe', 'alphapose', 'deeplabcut'
pose_model = 'BODY_25B' #With openpose: BODY_25B, BODY_25, BODY_135, COCO, MPII.
#With mediapipe: BLAZEPOSE.
#With alphapose: HALPE_26, HALPE_68, HALPE_136, COCO_133.
#With deeplabcut: CUSTOM. See example at the end of the file.
# What follows has not been implemented yet
overwrite_pose = false
openpose_path = '' # only checked if OpenPose is used
[synchronization]
# COMING SOON!
reset_sync = true # Recalculate synchronization even if already done
frames = [2850,3490] # Frames to use for synchronization, should point to a moment with fast motion.
cut_off_frequency = 10 # cut-off frequency for a 4th order low-pass Butterworth filter
# Vertical speeds (on X, Y, or Z axis, or 2D speeds)
speed_kind = 'y' # 'x', 'y', 'z', or '2D'
vmax = 20 # px/s
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]
tracked_keypoint = 'Neck' # If the neck is not detected by the pose_model, check skeleton.py tracked_keypoint = 'Neck' # If the neck is not detected by the pose_model, check skeleton.py
# and choose a stable point for tracking the person of interest (e.g., 'right_shoulder' with BLAZEPOSE) # and choose a stable point for tracking the person of interest (e.g., 'right_shoulder' with BLAZEPOSE)
@ -122,6 +141,10 @@ display_figures = true # true or false (lowercase)
kernel_size = 9 kernel_size = 9
[opensim] [opensim]
static_trial = 'yes' # 'yes' or 'no' at the Trial level;
# folder name at the Participant level, e.g. 'S00_P00_T00_StaticTrial';
# list of folder names at the Session level, e.g. ['S00_P00_Participant/S00_P00_T00_StaticTrial', 'S00_P01/S00_P01_T00', 'S00_P02/S00_P02_T00']
# CUSTOM skeleton, for DeepLabCut for example (others are in skeletons.py) # CUSTOM skeleton, for DeepLabCut for example (others are in skeletons.py)

View File

@ -2,34 +2,22 @@
## PROJECT PARAMETERS ## ## PROJECT PARAMETERS ##
############################################################################### ###############################################################################
# Configure your project parameters here
# IMPORTANT: All configuration parameters specified at that level will
# overwrite the ones given in the subfolders.
# Example: A parameter given in the Config.toml file at the Session level
# will be ignored if it is also given at the Participant or Trial level.
[project] [project]
project_dir = '' # BETWEEN SINGLE QUOTES! # If empty, project dir is current dir frame_rate = 60 # FPS
frame_range = [0,10] #For example [10,300], or [] for all frames frame_range = [] # For example [10,300], or [] for all frames
frame_rate = 60 #Hz # N.B.: If you want a time range instead, use frame_range = time_range * frame_rate
# For example if you want to analyze from 0.1 to 2 seconds with a 60 fps frame rate,
rawImg_folder_name = 'raw' # frame_range = [0.1, 2.0]*frame_rate = [6, 120]
calib_folder_name = 'calibration'
pose_folder_name = 'pose'
pose_json_folder_extension = 'json'
pose_img_folder_extension = 'img'
poseAssociated_folder_name = 'pose-associated'
pose3d_folder_name = 'pose-3d'
opensim_folder_name = 'opensim'
[pose]
pose_model = 'BODY_25B' #With openpose: BODY_25B, BODY_25, BODY_135, COCO, MPII.
#With mediapipe: BLAZEPOSE.
#With alphapose: HALPE_26, HALPE_68, HALPE_136, COCO_133.
#With deeplabcut: CUSTOM. See example at the end of the file.
# What follows has not been implemented yet
pose_framework = 'openpose' # 'openpose', 'mediapipe', 'alphapose', 'deeplabcut'
overwrite_pose = false
openpose_path = '' # only checked if OpenPose is used
# 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'
@ -38,52 +26,83 @@ calibration_type = 'convert' # 'convert' or 'calculate'
[calibration.convert.qualisys] [calibration.convert.qualisys]
binning_factor = 1 # Usually 1, except when filming in 540p where it usually is 2 binning_factor = 1 # Usually 1, except when filming in 540p where it usually is 2
[calibration.convert.optitrack] # See readme for instructions [calibration.convert.optitrack] # See readme for instructions
[calibration.convert.vicon] # No parameters needed [calibration.convert.vicon] # No parameter needed
[calibration.convert.opencap] # No parameters needed [calibration.convert.opencap] # No parameter needed
[calibration.convert.easymocap] # No parameters needed [calibration.convert.easymocap] # No parameter needed
[calibration.convert.biocv] # No parameters needed [calibration.convert.biocv] # No parameter needed
[calibration.convert.anipose] # No parameter needed
[calibration.convert.freemocap] # No parameter needed
[calibration.calculate] [calibration.calculate]
calculate_method = 'board' # 'board' or 'points' # Camera properties, theoretically need to be calculated only once in a camera lifetime
[calibration.calculate.intrinsics]
[calibration.calculate.board.intrinsics] # camera properties, only needs to be done once
intrinsics_board_type = 'checkerboard' # 'checkerboard' ('charucoboard' not supported yet)
overwrite_intrinsics = false # overwrite (or not) if they have already been calculated? overwrite_intrinsics = false # overwrite (or not) if they have already been calculated?
show_detection_intrinsics = true # true or false (lowercase) show_detection_intrinsics = true # true or false (lowercase)
intrinsics_extension = 'jpg' # any video or image extension intrinsics_extension = 'jpg' # any video or image extension
extract_every_N_sec = 1 # if video, extract frames every N seconds (can be <1 ) extract_every_N_sec = 1 # if video, extract frames every N seconds (can be <1 )
intrinsics_corners_nb = [4,7] intrinsics_corners_nb = [4,7]
intrinsics_square_size = 60 # mm intrinsics_square_size = 60 # mm
intrinsics_marker_size = 40 # mm # only checked if charucoboard
intrinsics_aruco_dict = 'DICT_6X6_250' # only checked if charucoboard # see https://docs.opencv.org/3.4/dc/df7/dictionary_8hpp.html
[calibration.calculate.board.extrinsics] # camera placement, needs to be done every time
extrinsics_board_type = 'scene' # 'checkerboard', 'scene' ('charucoboard' not supported yet)
# 'board' should be large enough to be detected when laid on the floor.
# 'scene' involves manually clicking any point of know coordinates on scene. Usually more accurate if points are spread out
moving_camera = false # Not implemented yet
calculate_extrinsics = true # true or false (lowercase)
show_reprojection_error = true # true or false (lowercase)
extrinsics_extension = 'png' # any video or image extension
# if extrinsics_board_type = 'checkerboard' or 'charucoboard'
extrinsics_corners_nb = [4,7] # [H,W] rather than [w,h]
extrinsics_square_size = 60 # mm # [h,w] if square is actually a rectangle
extrinsics_marker_size = 40 # mm # only checked if 'charucoboard' (not supported yet)
extrinsics_aruco_dict = 'DICT_6X6_250' # only checked if 'charucoboard' # see https://docs.opencv.org/3.4/dc/df7/dictionary_8hpp.html
# if extrinsics_board_type = 'scene'
# list of 3D coordinates to be manually labelled on images. Can also be a 2 dimensional plane. # in m
object_coords_3d = [[-2.0, 0.3, 0.0], [-2.0 , 0.0, 0.0], [-2.0, 0.0, 0.05], [-2.0, -0.3 , 0.0], [0.0, 0.3, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.05], [0.0, -0.3, 0.0]] # in meters -> Not in mm! <-
[calibration.calculate.points]
calibration_points = 'wand' # 'wand' or 'keypoints'
# Not supported yet.
# Camera placements, need to be done before every session
[calibration.calculate.extrinsics]
extrinsics_method = 'scene' # 'board', 'scene', 'keypoints'
# 'board' should be large enough to be detected when laid on the floor. Not recommended.
# 'scene' involves manually clicking any point of know coordinates on scene. Usually more accurate if points are spread out.
# 'keypoints' uses automatic pose estimation of a person freely walking and waving arms in the scene. Slighlty less accurate, requires synchronized cameras.
moving_cameras = false # Not implemented yet
calculate_extrinsics = true # true or false (lowercase)
[calibration.calculate.extrinsics.board]
show_reprojection_error = true # true or false (lowercase)
extrinsics_extension = 'png' # any video or image extension
extrinsics_corners_nb = [4,7] # [H,W] rather than [w,h]
extrinsics_square_size = 60 # mm # [h,w] if square is actually a rectangle
[calibration.calculate.extrinsics.scene]
show_reprojection_error = true # true or false (lowercase)
extrinsics_extension = 'png' # any video or image extension
# list of 3D coordinates to be manually labelled on images. Can also be a 2 dimensional plane.
# in m -> unlike for intrinsics, NOT in mm!
object_coords_3d = [[-2.0, 0.3, 0.0],
[-2.0 , 0.0, 0.0],
[-2.0, 0.0, 0.05],
[-2.0, -0.3 , 0.0],
[0.0, 0.3, 0.0],
[0.0, 0.0, 0.0],
[0.0, 0.0, 0.05],
[0.0, -0.3, 0.0]]
[calibration.calculate.extrinsics.keypoints]
# Coming soon!
[pose]
pose_framework = 'openpose' # 'openpose', 'mediapipe', 'alphapose', 'deeplabcut'
pose_model = 'BODY_25B' #With openpose: BODY_25B, BODY_25, BODY_135, COCO, MPII.
#With mediapipe: BLAZEPOSE.
#With alphapose: HALPE_26, HALPE_68, HALPE_136, COCO_133.
#With deeplabcut: CUSTOM. See example at the end of the file.
# What follows has not been implemented yet
overwrite_pose = false
openpose_path = '' # only checked if OpenPose is used
[synchronization]
# COMING SOON!
reset_sync = true # Recalculate synchronization even if already done
frames = [2850,3490] # Frames to use for synchronization, should point to a moment with fast motion.
cut_off_frequency = 10 # cut-off frequency for a 4th order low-pass Butterworth filter
# Vertical speeds (on X, Y, or Z axis, or 2D speeds)
speed_kind = 'y' # 'x', 'y', 'z', or '2D'
vmax = 20 # px/s
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]
tracked_keypoint = 'Neck' # If the neck is not detected by the pose_model, check skeleton.py tracked_keypoint = 'Neck' # If the neck is not detected by the pose_model, check skeleton.py
# and choose a stable point for tracking the person of interest (e.g., 'right_shoulder' with BLAZEPOSE) # and choose a stable point for tracking the person of interest (e.g., 'right_shoulder' with BLAZEPOSE)
@ -102,7 +121,7 @@ show_interp_indices = true # true or false (lowercase). For each keypoint, retur
[filtering] [filtering]
type = 'butterworth' # butterworth, kalman, gaussian, LOESS, median, butterworth_on_speed type = 'butterworth' # butterworth, kalman, gaussian, LOESS, median, butterworth_on_speed
display_figures = false # true or false (lowercase) display_figures = true # true or false (lowercase)
[filtering.butterworth] [filtering.butterworth]
order = 4 order = 4
@ -122,6 +141,10 @@ display_figures = false # true or false (lowercase)
kernel_size = 9 kernel_size = 9
[opensim] [opensim]
static_trial = 'yes' # 'yes' or 'no' at the Trial level;
# folder name at the Participant level, e.g. 'S00_P00_T00_StaticTrial';
# list of folder names at the Session level, e.g. ['S00_P00_Participant/S00_P00_T00_StaticTrial', 'S00_P01/S00_P01_T00', 'S00_P02/S00_P02_T00']
# CUSTOM skeleton, for DeepLabCut for example (others are in skeletons.py) # CUSTOM skeleton, for DeepLabCut for example (others are in skeletons.py)

View File

@ -0,0 +1,225 @@
###############################################################################
## PROJECT PARAMETERS ##
###############################################################################
# Configure your project parameters here.
#
# IMPORTANT:
# All configuration parameters specified at that level will be overwritten by
# the ones given in sublevels. Thus a parameters given at the Trial level will
# prevail over those given at the Participant or Session level.
# This way, you can set global instructions for the Session and alter them
# for specific Participants or Trials.
[project]
frame_range = [] # For example [10,300], or [] for all frames
frame_rate = 60 # fps
exclude_from_batch = [] # [] if this Config.toml file is at the Trial level;
# folder name at the Participant level, e.g. 'S00_P00_T00_StaticTrial';
# list of folder names at the Session level, e.g. ['S00_P00_Participant/S00_P00_T00_StaticTrial', 'S00_P01/S00_P01_T00', 'S00_P02/S00_P02_T00']
# Take heart, calibration is not that complicated once you get the hang of it!
[calibration]
calibration_type = 'convert' # 'convert' or 'calculate'
[calibration.convert]
convert_from = 'qualisys' # 'qualisys', 'optitrack', vicon', 'opencap', 'easymocap', 'biocv', 'anipose', or 'freemocap'
[calibration.convert.qualisys]
binning_factor = 1 # Usually 1, except when filming in 540p where it usually is 2
[calibration.convert.optitrack] # See readme for instructions
[calibration.convert.vicon] # No parameter needed
[calibration.convert.opencap] # No parameter needed
[calibration.convert.easymocap] # No parameter needed
[calibration.convert.biocv] # No parameter needed
[calibration.convert.anipose] # No parameter needed
[calibration.convert.freemocap] # No parameter needed
[calibration.calculate]
# Camera properties, theoretically need to be calculated only once in a camera lifetime
[calibration.calculate.intrinsics]
overwrite_intrinsics = false # overwrite (or not) if they have already been calculated?
show_detection_intrinsics = true # true or false (lowercase)
intrinsics_extension = 'jpg' # any video or image extension
extract_every_N_sec = 1 # if video, extract frames every N seconds (can be <1 )
intrinsics_corners_nb = [4,7]
intrinsics_square_size = 60 # mm
# Camera placements, need to be done before every session
[calibration.calculate.extrinsics]
extrinsics_method = 'scene' # 'board', 'scene', 'keypoints'
# 'board' should be large enough to be detected when laid on the floor. Not recommended.
# 'scene' involves manually clicking any point of know coordinates on scene. Usually more accurate if points are spread out.
# 'keypoints' uses automatic pose estimation of a person freely walking and waving arms in the scene. Slighlty less accurate, requires synchronized cameras.
moving_cameras = false # Not implemented yet
calculate_extrinsics = true # true or false (lowercase)
[calibration.calculate.extrinsics.board]
show_reprojection_error = true # true or false (lowercase)
extrinsics_extension = 'png' # any video or image extension
extrinsics_corners_nb = [4,7] # [H,W] rather than [w,h]
extrinsics_square_size = 60 # mm # [h,w] if square is actually a rectangle
[calibration.calculate.extrinsics.scene]
show_reprojection_error = true # true or false (lowercase)
extrinsics_extension = 'png' # any video or image extension
# list of 3D coordinates to be manually labelled on images. Can also be a 2 dimensional plane.
# in m -> unlike for intrinsics, NOT in mm!
object_coords_3d = [[-2.0, 0.3, 0.0],
[-2.0 , 0.0, 0.0],
[-2.0, 0.0, 0.05],
[-2.0, -0.3 , 0.0],
[0.0, 0.3, 0.0],
[0.0, 0.0, 0.0],
[0.0, 0.0, 0.05],
[0.0, -0.3, 0.0]]
[calibration.calculate.extrinsics.keypoints]
# Coming soon!
[pose]
pose_framework = 'openpose' # 'openpose', 'mediapipe', 'alphapose', 'deeplabcut'
pose_model = 'BODY_25B' #With openpose: BODY_25B, BODY_25, BODY_135, COCO, MPII.
#With mediapipe: BLAZEPOSE.
#With alphapose: HALPE_26, HALPE_68, HALPE_136, COCO_133.
#With deeplabcut: CUSTOM. See example at the end of the file.
# What follows has not been implemented yet
overwrite_pose = false
openpose_path = '' # only checked if OpenPose is used
[synchronization]
# COMING SOON!
reset_sync = true # Recalculate synchronization even if already done
frames = [2850,3490] # Frames to use for synchronization, should point to a moment with fast motion.
cut_off_frequency = 10 # cut-off frequency for a 4th order low-pass Butterworth filter
# Vertical speeds (on X, Y, or Z axis, or 2D speeds)
speed_kind = 'y' # 'x', 'y', 'z', or '2D'
vmax = 20 # px/s
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]
tracked_keypoint = 'Neck' # If the neck is not detected by the pose_model, check skeleton.py
# and choose a stable point for tracking the person of interest (e.g., 'right_shoulder' with BLAZEPOSE)
reproj_error_threshold_association = 20 # px
[triangulation]
reproj_error_threshold_triangulation = 15 # px
likelihood_threshold = 0.3
min_cameras_for_triangulation = 2
interpolation = 'cubic' #linear, slinear, quadratic, cubic, or none
# 'none' if you don't want to interpolate missing points
interp_if_gap_smaller_than = 10 # do not interpolate bigger gaps
show_interp_indices = true # true or false (lowercase). For each keypoint, return the frames that need to be interpolated
[filtering]
type = 'butterworth' # butterworth, kalman, gaussian, LOESS, median, butterworth_on_speed
display_figures = true # true or false (lowercase)
[filtering.butterworth]
order = 4
cut_off_frequency = 6 # Hz
[filtering.kalman]
# How much more do you trust triangulation results (measurements), than previous data (process assuming constant acceleration)?
trust_ratio = 100 # = measurement_trust/process_trust ~= process_noise/measurement_noise
smooth = true # should be true, unless you need real-time filtering
[filtering.butterworth_on_speed]
order = 4
cut_off_frequency = 10 # Hz
[filtering.gaussian]
sigma_kernel = 2 #px
[filtering.LOESS]
nb_values_used = 30 # = fraction of data used * nb frames
[filtering.median]
kernel_size = 9
[opensim]
static_trial = 'yes' # 'yes' or 'no' if this Config.toml file is at the Trial level;
# folder name at the Participant level, e.g. 'S00_P00_T00_StaticTrial';
# list of folder names at the Session level, e.g. ['S00_P00_Participant/S00_P00_T00_StaticTrial', 'S00_P01/S00_P01_T00', 'S00_P02/S00_P02_T00']
# CUSTOM skeleton, if you trained your own DeepLabCut model for example.
# Make sure the node ids correspond to the column numbers of the 2D pose file, starting from zero.
# If you want to perform inverse kinematics, you will also need to create an OpenSim model
# and add to its markerset the location where you expect the triangulated keypoints to be detected.
# In this example, CUSTOM reproduces the BODY_25B skeleton (default skeletons are stored in skeletons.py).
# You can create as many custom skeletons as you want, just add them further down and rename them.
[pose.CUSTOM]
name = "CHip"
id = "None"
[[pose.CUSTOM.children]]
id = 12
name = "RHip"
[[pose.CUSTOM.children.children]]
id = 14
name = "RKnee"
[[pose.CUSTOM.children.children.children]]
id = 16
name = "RAnkle"
[[pose.CUSTOM.children.children.children.children]]
id = 22
name = "RBigToe"
[[pose.CUSTOM.children.children.children.children.children]]
id = 23
name = "RSmallToe"
[[pose.CUSTOM.children.children.children.children]]
id = 24
name = "RHeel"
[[pose.CUSTOM.children]]
id = 11
name = "LHip"
[[pose.CUSTOM.children.children]]
id = 13
name = "LKnee"
[[pose.CUSTOM.children.children.children]]
id = 15
name = "LAnkle"
[[pose.CUSTOM.children.children.children.children]]
id = 19
name = "LBigToe"
[[pose.CUSTOM.children.children.children.children.children]]
id = 20
name = "LSmallToe"
[[pose.CUSTOM.children.children.children.children]]
id = 21
name = "LHeel"
[[pose.CUSTOM.children]]
id = 17
name = "Neck"
[[pose.CUSTOM.children.children]]
id = 18
name = "Head"
[[pose.CUSTOM.children.children.children]]
id = 0
name = "Nose"
[[pose.CUSTOM.children.children]]
id = 6
name = "RShoulder"
[[pose.CUSTOM.children.children.children]]
id = 8
name = "RElbow"
[[pose.CUSTOM.children.children.children.children]]
id = 10
name = "RWrist"
[[pose.CUSTOM.children.children]]
id = 5
name = "LShoulder"
[[pose.CUSTOM.children.children.children]]
id = 7
name = "LElbow"
[[pose.CUSTOM.children.children.children.children]]
id = 9
name = "LWrist"

View File

@ -0,0 +1,225 @@
###############################################################################
## PROJECT PARAMETERS ##
###############################################################################
# Configure your project parameters here.
#
# IMPORTANT:
# All configuration parameters specified at that level will be overwritten by
# the ones given in sublevels. Thus a parameters given at the Trial level will
# prevail over those given at the Participant or Session level.
# This way, you can set global instructions for the Session and alter them
# for specific Participants or Trials.
[project]
frame_rate = 60 # FPS
frame_range = [] # For example [10,300], or [] for all frames
# N.B.: If you want a time range instead, use frame_range = time_range * frame_rate
# For example if you want to analyze from 0.1 to 2 seconds with a 60 fps frame rate,
# frame_range = [0.1, 2.0]*frame_rate = [6, 120]
exclude_from_batch =
# Take heart, calibration is not that complicated once you get the hang of it!
[calibration]
calibration_type = 'convert' # 'convert' or 'calculate'
[calibration.convert]
convert_from = 'qualisys' # 'qualisys', 'optitrack', vicon', 'opencap', 'easymocap', or 'biocv'
[calibration.convert.qualisys]
binning_factor = 1 # Usually 1, except when filming in 540p where it usually is 2
[calibration.convert.optitrack] # See readme for instructions
[calibration.convert.vicon] # No parameter needed
[calibration.convert.opencap] # No parameter needed
[calibration.convert.easymocap] # No parameter needed
[calibration.convert.biocv] # No parameter needed
[calibration.convert.anipose] # No parameter needed
[calibration.convert.freemocap] # No parameter needed
[calibration.calculate]
# Camera properties, theoretically need to be calculated only once in a camera lifetime
[calibration.calculate.intrinsics]
overwrite_intrinsics = false # overwrite (or not) if they have already been calculated?
show_detection_intrinsics = true # true or false (lowercase)
intrinsics_extension = 'jpg' # any video or image extension
extract_every_N_sec = 1 # if video, extract frames every N seconds (can be <1 )
intrinsics_corners_nb = [4,7]
intrinsics_square_size = 60 # mm
# Camera placements, need to be done before every session
[calibration.calculate.extrinsics]
extrinsics_method = 'scene' # 'board', 'scene', 'keypoints'
# 'board' should be large enough to be detected when laid on the floor. Not recommended.
# 'scene' involves manually clicking any point of know coordinates on scene. Usually more accurate if points are spread out.
# 'keypoints' uses automatic pose estimation of a person freely walking and waving arms in the scene. Slighlty less accurate, requires synchronized cameras.
moving_cameras = false # Not implemented yet
calculate_extrinsics = true # true or false (lowercase)
[calibration.calculate.extrinsics.board]
show_reprojection_error = true # true or false (lowercase)
extrinsics_extension = 'png' # any video or image extension
extrinsics_corners_nb = [4,7] # [H,W] rather than [w,h]
extrinsics_square_size = 60 # mm # [h,w] if square is actually a rectangle
[calibration.calculate.extrinsics.scene]
show_reprojection_error = true # true or false (lowercase)
extrinsics_extension = 'png' # any video or image extension
# list of 3D coordinates to be manually labelled on images. Can also be a 2 dimensional plane.
# in m -> unlike for intrinsics, NOT in mm!
object_coords_3d = [[-2.0, 0.3, 0.0],
[-2.0 , 0.0, 0.0],
[-2.0, 0.0, 0.05],
[-2.0, -0.3 , 0.0],
[0.0, 0.3, 0.0],
[0.0, 0.0, 0.0],
[0.0, 0.0, 0.05],
[0.0, -0.3, 0.0]]
[calibration.calculate.extrinsics.keypoints]
# Coming soon!
[pose]
pose_framework = 'openpose' # 'openpose', 'mediapipe', 'alphapose', 'deeplabcut'
pose_model = 'BODY_25B' #With openpose: BODY_25B, BODY_25, BODY_135, COCO, MPII.
#With mediapipe: BLAZEPOSE.
#With alphapose: HALPE_26, HALPE_68, HALPE_136, COCO_133.
#With deeplabcut: CUSTOM. See example at the end of the file.
# What follows has not been implemented yet
overwrite_pose = false
openpose_path = '' # only checked if OpenPose is used
[synchronization]
# COMING SOON!
reset_sync = true # Recalculate synchronization even if already done
frames = [2850,3490] # Frames to use for synchronization, should point to a moment with fast motion.
cut_off_frequency = 10 # cut-off frequency for a 4th order low-pass Butterworth filter
# Vertical speeds (on X, Y, or Z axis, or 2D speeds)
speed_kind = 'y' # 'x', 'y', 'z', or '2D'
vmax = 20 # px/s
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]
tracked_keypoint = 'Neck' # If the neck is not detected by the pose_model, check skeleton.py
# and choose a stable point for tracking the person of interest (e.g., 'right_shoulder' with BLAZEPOSE)
reproj_error_threshold_association = 20 # px
[triangulation]
reproj_error_threshold_triangulation = 15 # px
likelihood_threshold = 0.3
min_cameras_for_triangulation = 2
interpolation = 'cubic' #linear, slinear, quadratic, cubic, or none
# 'none' if you don't want to interpolate missing points
interp_if_gap_smaller_than = 10 # do not interpolate bigger gaps
show_interp_indices = true # true or false (lowercase). For each keypoint, return the frames that need to be interpolated
[filtering]
type = 'butterworth' # butterworth, kalman, gaussian, LOESS, median, butterworth_on_speed
display_figures = true # true or false (lowercase)
[filtering.butterworth]
order = 4
cut_off_frequency = 6 # Hz
[filtering.kalman]
# How much more do you trust triangulation results (measurements), than previous data (process assuming constant acceleration)?
trust_ratio = 100 # = measurement_trust/process_trust ~= process_noise/measurement_noise
smooth = true # should be true, unless you need real-time filtering
[filtering.butterworth_on_speed]
order = 4
cut_off_frequency = 10 # Hz
[filtering.gaussian]
sigma_kernel = 2 #px
[filtering.LOESS]
nb_values_used = 30 # = fraction of data used * nb frames
[filtering.median]
kernel_size = 9
[opensim]
static_trial = 'yes' # 'yes' or 'no' at the Trial level;
# folder name at the Participant level, e.g. 'S00_P00_T00_StaticTrial';
# list of folder names at the Session level, e.g. ['S00_P00_Participant/S00_P00_T00_StaticTrial', 'S00_P01/S00_P01_T00', 'S00_P02/S00_P02_T00']
# CUSTOM skeleton, for DeepLabCut for example (others are in skeletons.py)
# In this example, CUSTOM reproduces the BODY_25B skeleton.
# You can create as many custom skeletons as you want, just add them further down and rename them.
# Make sure the node ids correspond to the column numbers of the 2D pose file, starting from zero.
[pose.CUSTOM]
name = "CHip"
id = "None"
[[pose.CUSTOM.children]]
id = 12
name = "RHip"
[[pose.CUSTOM.children.children]]
id = 14
name = "RKnee"
[[pose.CUSTOM.children.children.children]]
id = 16
name = "RAnkle"
[[pose.CUSTOM.children.children.children.children]]
id = 22
name = "RBigToe"
[[pose.CUSTOM.children.children.children.children.children]]
id = 23
name = "RSmallToe"
[[pose.CUSTOM.children.children.children.children]]
id = 24
name = "RHeel"
[[pose.CUSTOM.children]]
id = 11
name = "LHip"
[[pose.CUSTOM.children.children]]
id = 13
name = "LKnee"
[[pose.CUSTOM.children.children.children]]
id = 15
name = "LAnkle"
[[pose.CUSTOM.children.children.children.children]]
id = 19
name = "LBigToe"
[[pose.CUSTOM.children.children.children.children.children]]
id = 20
name = "LSmallToe"
[[pose.CUSTOM.children.children.children.children]]
id = 21
name = "LHeel"
[[pose.CUSTOM.children]]
id = 17
name = "Neck"
[[pose.CUSTOM.children.children]]
id = 18
name = "Head"
[[pose.CUSTOM.children.children.children]]
id = 0
name = "Nose"
[[pose.CUSTOM.children.children]]
id = 6
name = "RShoulder"
[[pose.CUSTOM.children.children.children]]
id = 8
name = "RElbow"
[[pose.CUSTOM.children.children.children.children]]
id = 10
name = "RWrist"
[[pose.CUSTOM.children.children]]
id = 5
name = "LShoulder"
[[pose.CUSTOM.children.children.children]]
id = 7
name = "LElbow"
[[pose.CUSTOM.children.children.children.children]]
id = 9
name = "LWrist"

Some files were not shown because too many files have changed in this diff Show More