Skip to content

Commit 2b690e3

Browse files
committed
Merge edits mistakenly done to Gui branch -> more in description
2 parents 9500db7 + 2d1d31d commit 2b690e3

File tree

20 files changed

+515
-301
lines changed

20 files changed

+515
-301
lines changed

Pose2Sim/Demo_Batch/Config.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,34 +127,33 @@ calibration_type = 'convert' # 'convert' or 'calculate'
127127

128128

129129
[calibration.calculate]
130+
save_debug_images = true # Save images with clicked points (and their reprojections for extrinsic calibration)
130131
# Camera properties, theoretically need to be calculated only once in a camera lifetime
131132
[calibration.calculate.intrinsics]
132133
overwrite_intrinsics = false # set to false if you don't want to recalculate intrinsic parameters
133-
show_detection_intrinsics = true # true or false (lowercase)
134134
intrinsics_extension = 'jpg' # any video or image extension
135135
extract_every_N_sec = 1 # if video, extract frames every N seconds (can be <1 )
136136
intrinsics_corners_nb = [4,7]
137137
intrinsics_square_size = 60 # mm
138+
show_detection_intrinsics = true # true or false (lowercase)
138139

139140
# Camera placements, need to be done before every session
140141
[calibration.calculate.extrinsics]
141142
calculate_extrinsics = true # true or false (lowercase)
142143
extrinsics_method = 'scene' # 'board', 'scene', 'keypoints'
144+
extrinsics_extension = 'png' # any video or image extension
143145
# 'board' should be large enough to be detected when laid on the floor. Not recommended.
144146
# 'scene' involves manually clicking any point of know coordinates on scene. Usually more accurate if points are spread out.
145147
# 'keypoints' uses automatic pose estimation of a person freely walking and waving arms in the scene. Slighlty less accurate, requires synchronized cameras.
148+
show_reprojection_error = true # true or false (lowercase)
146149
moving_cameras = false # Not implemented yet
147150

148151
[calibration.calculate.extrinsics.board]
149-
show_reprojection_error = true # true or false (lowercase)
150152
board_position = 'vertical' # 'vertical' or 'horizontal'
151-
extrinsics_extension = 'png' # any video or image extension
152153
extrinsics_corners_nb = [4,7] # [H,W] rather than [w,h]
153154
extrinsics_square_size = 60 # mm # [h,w] if square is actually a rectangle
154155

155156
[calibration.calculate.extrinsics.scene]
156-
show_reprojection_error = true # true or false (lowercase)
157-
extrinsics_extension = 'png' # any video or image extension
158157
# list of 3D coordinates to be manually labelled on images. Can also be a 2 dimensional plane.
159158
# in m -> unlike for intrinsics, NOT in mm!
160159
# [X,Y,Z], which becomes [Z,X,Y] in the TRC reference frame, and [-Y,X,Z] in the Blender one
@@ -284,7 +283,7 @@ use_custom_logging = false # if integrated in an API that already has logging
284283
# from anytree import Node, RenderTree
285284
# for pre, _, node in RenderTree(model):
286285
# print(f'{pre}{node.name} id={node.id}')
287-
[pose.CUSTOM]
286+
[[pose.CUSTOM]]
288287
name = "Hip"
289288
id = 19
290289
[[pose.CUSTOM.children]]

Pose2Sim/Demo_Batch/Trial_1/Config.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,34 +127,33 @@
127127

128128

129129
# [calibration.calculate]
130+
# save_debug_images = true # Save images with clicked points (and their reprojections for extrinsic calibration)
130131
# # Camera properties, theoretically need to be calculated only once in a camera lifetime
131132
# [calibration.calculate.intrinsics]
132133
# overwrite_intrinsics = false # set to false if you don't want to recalculate intrinsic parameters
133-
# show_detection_intrinsics = true # true or false (lowercase)
134134
# intrinsics_extension = 'jpg' # any video or image extension
135135
# extract_every_N_sec = 1 # if video, extract frames every N seconds (can be <1 )
136136
# intrinsics_corners_nb = [4,7]
137137
# intrinsics_square_size = 60 # mm
138+
# show_detection_intrinsics = true # true or false (lowercase)
138139

139140
# # Camera placements, need to be done before every session
140141
# [calibration.calculate.extrinsics]
141142
# calculate_extrinsics = true # true or false (lowercase)
142143
# extrinsics_method = 'scene' # 'board', 'scene', 'keypoints'
144+
# extrinsics_extension = 'png' # any video or image extension
143145
# # 'board' should be large enough to be detected when laid on the floor. Not recommended.
144146
# # 'scene' involves manually clicking any point of know coordinates on scene. Usually more accurate if points are spread out.
145147
# # 'keypoints' uses automatic pose estimation of a person freely walking and waving arms in the scene. Slighlty less accurate, requires synchronized cameras.
148+
# show_reprojection_error = true # true or false (lowercase)
146149
# moving_cameras = false # Not implemented yet
147150

148151
# [calibration.calculate.extrinsics.board]
149-
# show_reprojection_error = true # true or false (lowercase)
150152
# board_position = 'vertical' # 'vertical' or 'horizontal'
151-
# extrinsics_extension = 'png' # any video or image extension
152153
# extrinsics_corners_nb = [4,7] # [H,W] rather than [w,h]
153154
# extrinsics_square_size = 60 # mm # [h,w] if square is actually a rectangle
154155

155156
# [calibration.calculate.extrinsics.scene]
156-
# show_reprojection_error = true # true or false (lowercase)
157-
# extrinsics_extension = 'png' # any video or image extension
158157
# # list of 3D coordinates to be manually labelled on images. Can also be a 2 dimensional plane.
159158
# # in m -> unlike for intrinsics, NOT in mm!
160159
# # [X,Y,Z], which becomes [Z,X,Y] in the TRC reference frame, and [-Y,X,Z] in the Blender one
@@ -285,7 +284,7 @@
285284
# # from anytree import Node, RenderTree
286285
# # for pre, _, node in RenderTree(model):
287286
# # print(f'{pre}{node.name} id={node.id}')
288-
# [pose.CUSTOM]
287+
# [[pose.CUSTOM]]
289288
# name = "Hip"
290289
# id = 19
291290
# [[pose.CUSTOM.children]]

Pose2Sim/Demo_Batch/Trial_2/Config.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,34 +125,33 @@ keypoints_to_consider = ['RWrist'] # 'all' if all points should be considered, f
125125

126126

127127
# [calibration.calculate]
128+
# save_debug_images = true # Save images with clicked points (and their reprojections for extrinsic calibration)
128129
# # Camera properties, theoretically need to be calculated only once in a camera lifetime
129130
# [calibration.calculate.intrinsics]
130131
# overwrite_intrinsics = false # set to false if you don't want to recalculate intrinsic parameters
131-
# show_detection_intrinsics = true # true or false (lowercase)
132132
# intrinsics_extension = 'jpg' # any video or image extension
133133
# extract_every_N_sec = 1 # if video, extract frames every N seconds (can be <1 )
134134
# intrinsics_corners_nb = [4,7]
135135
# intrinsics_square_size = 60 # mm
136+
# show_detection_intrinsics = true # true or false (lowercase)
136137

137138
# # Camera placements, need to be done before every session
138139
# [calibration.calculate.extrinsics]
139140
# calculate_extrinsics = true # true or false (lowercase)
140141
# extrinsics_method = 'scene' # 'board', 'scene', 'keypoints'
142+
# extrinsics_extension = 'png' # any video or image extension
141143
# # 'board' should be large enough to be detected when laid on the floor. Not recommended.
142144
# # 'scene' involves manually clicking any point of know coordinates on scene. Usually more accurate if points are spread out.
143145
# # 'keypoints' uses automatic pose estimation of a person freely walking and waving arms in the scene. Slighlty less accurate, requires synchronized cameras.
146+
# show_reprojection_error = true # true or false (lowercase)
144147
# moving_cameras = false # Not implemented yet
145148

146149
# [calibration.calculate.extrinsics.board]
147-
# show_reprojection_error = true # true or false (lowercase)
148150
# board_position = 'vertical' # 'vertical' or 'horizontal'
149-
# extrinsics_extension = 'png' # any video or image extension
150151
# extrinsics_corners_nb = [4,7] # [H,W] rather than [w,h]
151152
# extrinsics_square_size = 60 # mm # [h,w] if square is actually a rectangle
152153

153154
# [calibration.calculate.extrinsics.scene]
154-
# show_reprojection_error = true # true or false (lowercase)
155-
# extrinsics_extension = 'png' # any video or image extension
156155
# # list of 3D coordinates to be manually labelled on images. Can also be a 2 dimensional plane.
157156
# # in m -> unlike for intrinsics, NOT in mm!
158157
# # [X,Y,Z], which becomes [Z,X,Y] in the TRC reference frame, and [-Y,X,Z] in the Blender one
@@ -283,7 +282,7 @@ keypoints_to_consider = ['RWrist'] # 'all' if all points should be considered, f
283282
# # from anytree import Node, RenderTree
284283
# # for pre, _, node in RenderTree(model):
285284
# # print(f'{pre}{node.name} id={node.id}')
286-
# [pose.CUSTOM]
285+
# [[pose.CUSTOM]]
287286
# name = "Hip"
288287
# id = 19
289288
# [[pose.CUSTOM.children]]

Pose2Sim/Demo_MultiPerson/Config.toml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,34 +127,33 @@ calibration_type = 'convert' # 'convert' or 'calculate'
127127

128128

129129
[calibration.calculate]
130+
save_debug_images = true # Save images with clicked points (and their reprojections for extrinsic calibration)
130131
# Camera properties, theoretically need to be calculated only once in a camera lifetime
131132
[calibration.calculate.intrinsics]
132133
overwrite_intrinsics = false # set to false if you don't want to recalculate intrinsic parameters
133-
show_detection_intrinsics = true # true or false (lowercase)
134134
intrinsics_extension = 'jpg' # any video or image extension
135135
extract_every_N_sec = 1 # if video, extract frames every N seconds (can be <1 )
136136
intrinsics_corners_nb = [4,7]
137137
intrinsics_square_size = 60 # mm
138+
show_detection_intrinsics = true # true or false (lowercase)
138139

139140
# Camera placements, need to be done before every session
140141
[calibration.calculate.extrinsics]
141142
calculate_extrinsics = true # true or false (lowercase)
142143
extrinsics_method = 'scene' # 'board', 'scene', 'keypoints'
144+
extrinsics_extension = 'png' # any video or image extension
143145
# 'board' should be large enough to be detected when laid on the floor. Not recommended.
144146
# 'scene' involves manually clicking any point of know coordinates on scene. Usually more accurate if points are spread out.
145147
# 'keypoints' uses automatic pose estimation of a person freely walking and waving arms in the scene. Slighlty less accurate, requires synchronized cameras.
148+
show_reprojection_error = true # true or false (lowercase)
146149
moving_cameras = false # Not implemented yet
147150

148151
[calibration.calculate.extrinsics.board]
149-
show_reprojection_error = true # true or false (lowercase)
150-
extrinsics_extension = 'png' # any video or image extension
151152
board_position = 'vertical' # 'vertical' or 'horizontal'
152153
extrinsics_corners_nb = [4,7] # [H,W] rather than [w,h]
153154
extrinsics_square_size = 60 # mm # [h,w] if square is actually a rectangle
154155

155156
[calibration.calculate.extrinsics.scene]
156-
show_reprojection_error = true # true or false (lowercase)
157-
extrinsics_extension = 'png' # any video or image extension
158157
# list of 3D coordinates to be manually labelled on images. Can also be a 2 dimensional plane.
159158
# in m -> unlike for intrinsics, NOT in mm!
160159
# [X,Y,Z], which becomes [Z,X,Y] in the TRC reference frame, and [-Y,X,Z] in the Blender one
@@ -284,7 +283,7 @@ use_custom_logging = false # if integrated in an API that already has logging
284283
# from anytree import Node, RenderTree
285284
# for pre, _, node in RenderTree(model):
286285
# print(f'{pre}{node.name} id={node.id}')
287-
[pose.CUSTOM]
286+
[[pose.CUSTOM]]
288287
name = "Hip"
289288
id = 19
290289
[[pose.CUSTOM.children]]

Pose2Sim/Demo_SinglePerson/Config.toml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ participant_mass = 70.0 # float (eg 70.0), or list of floats (eg [70
2424

2525
frame_rate = 'auto' # fps # int or 'auto'. If 'auto', finds from video (or defaults to 60 fps if you work with images)
2626
frame_range = 'auto' # 'auto', 'all', or range like [10,300]. If 'auto', will trim around the frames with low reprojection error (useful if a person enters/exits the scene)
27-
28-
## If cameras are not synchronized, designates the frame range of the camera with the shortest recording time
29-
## N.B.: If you want a time range instead, use frame_range = time_range * frame_rate
30-
## For example if you want to analyze from 0.1 to 2 seconds with a 60 fps frame rate,
31-
## frame_range = [0.1, 2.0]*frame_rate = [6, 120]
27+
# If cameras are not synchronized, designates the frame range of the camera with the shortest recording time
28+
# N.B.: If you want a time range instead, use frame_range = time_range * frame_rate
29+
# For example if you want to analyze from 0.1 to 2 seconds with a 60 fps frame rate,
30+
# frame_range = [0.1, 2.0]*frame_rate = [6, 120]
3231

3332
exclude_from_batch = [] # List of trials to be excluded from batch analysis, ['<participant_dir/trial_dir>', 'etc'].
34-
# e.g. ['S00_P00_Participant/S00_P00_T00_StaticTrial', 'S00_P00_Participant/S00_P00_T01_BalancingTrial']
33+
# e.g. ['S00_P00_Participant/S00_P00_T00_StaticTrial', 'S00_P00_Participant/S00_P00_T01_BalancingTrial']
3534

3635

3736
[pose]
@@ -47,7 +46,6 @@ pose_model = 'Body_with_feet' #With RTMLib:
4746
# - Animal (ANIMAL2D_17)
4847
# /!\ Only RTMPose is natively embeded in Pose2Sim. For all other pose estimation methods, you will have to run them yourself, and then refer to the documentation to convert the output files if needed
4948
# /!\ For Face and Animal, use mode="""{dictionary}""", and find the corresponding .onnx model there https://github.com/open-mmlab/mmpose/tree/main/projects/rtmpose
50-
5149
#With MMPose: HALPE_26, COCO_133, COCO_17, CUSTOM. See CUSTOM example at the end of the file
5250
#With openpose: BODY_25B, BODY_25, BODY_135, COCO, MPII
5351
#With mediapipe: BLAZEPOSE
@@ -91,8 +89,8 @@ deepsort_params = """{'max_age':30, 'n_init':3, 'nms_max_overlap':0.8, 'max_cosi
9189
handle_LR_swap = false # Might be useful if cameras film from the sagittal plane and the right and left sides are hard to differenciate to your eye.
9290
undistort_points = false # Better if distorted image (parallel lines curvy on the edge or at least one param > 10^-2), but unnecessary (and slightly slower) if distortions are low
9391

94-
display_detection = true
95-
overwrite_pose = false # set to false if you don't want to recalculate pose estimation when it has already been done
92+
display_detection = true # Real-time display of the videos with pose estimation
93+
overwrite_pose = false # Set to false if you don't want to recalculate pose estimation when it has already been done
9694
save_video = 'to_video' # 'to_video' or 'to_images', 'none', or ['to_video', 'to_images']
9795
output_format = 'openpose' # 'openpose', 'mmpose', 'deeplabcut', 'none' or a list of them # /!\ only 'openpose' is supported for now
9896

@@ -130,34 +128,33 @@ calibration_type = 'convert' # 'convert' or 'calculate'
130128

131129

132130
[calibration.calculate]
131+
save_debug_images = true # Save images with clicked points (and their reprojections for extrinsic calibration)
133132
# Camera properties, theoretically need to be calculated only once in a camera lifetime
134133
[calibration.calculate.intrinsics]
135134
overwrite_intrinsics = false # set to false if you don't want to recalculate intrinsic parameters
136-
show_detection_intrinsics = true # true or false (lowercase)
137135
intrinsics_extension = 'jpg' # any video or image extension
138136
extract_every_N_sec = 1 # if video, extract frames every N seconds (can be <1 )
139137
intrinsics_corners_nb = [4,7]
140138
intrinsics_square_size = 60 # mm
139+
show_detection_intrinsics = true # true or false (lowercase)
141140

142141
# Camera placements, need to be done before every session
143142
[calibration.calculate.extrinsics]
144143
calculate_extrinsics = true # true or false (lowercase)
145144
extrinsics_method = 'scene' # 'board', 'scene', 'keypoints'
145+
extrinsics_extension = 'png' # any video or image extension
146146
# 'board' should be large enough to be detected when laid on the floor. Not recommended.
147147
# 'scene' involves manually clicking any point of know coordinates on scene. Usually more accurate if points are spread out.
148148
# 'keypoints' uses automatic pose estimation of a person freely walking and waving arms in the scene. Slighlty less accurate, requires synchronized cameras.
149+
show_reprojection_error = true # true or false (lowercase)
149150
moving_cameras = false # Not implemented yet
150151

151152
[calibration.calculate.extrinsics.board]
152-
show_reprojection_error = true # true or false (lowercase)
153-
extrinsics_extension = 'png' # any video or image extension
154153
board_position = 'vertical' # 'vertical' or 'horizontal'
155154
extrinsics_corners_nb = [4,7] # [H,W] rather than [w,h]
156155
extrinsics_square_size = 60 # mm # [h,w] if square is actually a rectangle
157156

158157
[calibration.calculate.extrinsics.scene]
159-
show_reprojection_error = true # true or false (lowercase)
160-
extrinsics_extension = 'png' # any video or image extension
161158
# list of 3D coordinates to be manually labelled on images. Can also be a 2 dimensional plane.
162159
# in m -> unlike for intrinsics, NOT in mm!
163160
# [X,Y,Z], which becomes [Z,X,Y] in the TRC reference frame, and [-Y,X,Z] in the Blender one
@@ -178,6 +175,7 @@ calibration_type = 'convert' # 'convert' or 'calculate'
178175
likelihood_threshold_association = 0.3 # should be in single_person section
179176

180177
[personAssociation.single_person]
178+
likelihood_threshold_association = 0.3
181179
reproj_error_threshold_association = 20 # px
182180
tracked_keypoint = 'Neck' # If the neck is not detected by the pose_model, check skeleton.py
183181
# and choose a stable point for tracking the person of interest (e.g., 'right_shoulder' or 'RShoulder')
@@ -287,7 +285,7 @@ use_custom_logging = false # if integrated in an API that already has logging
287285
# from anytree import Node, RenderTree
288286
# for pre, _, node in RenderTree(model):
289287
# print(f'{pre}{node.name} id={node.id}')
290-
[pose.CUSTOM]
288+
[[pose.CUSTOM]]
291289
name = "Hip"
292290
id = 19
293291
[[pose.CUSTOM.children]]

Pose2Sim/Demo_SinglePerson/calibration/Calib_scene.toml

Lines changed: 0 additions & 39 deletions
This file was deleted.
-1.3 MB
Binary file not shown.
-1.22 MB
Binary file not shown.
-1.44 MB
Binary file not shown.
-1.4 MB
Binary file not shown.

0 commit comments

Comments
 (0)