@@ -1225,7 +1225,7 @@ def convert_json2pandas(json_files, likelihood_threshold=0.6, keypoints_ids=[],
12251225 for p in json_data_all
12261226 for keypoints in [np .array ([p ['pose_keypoints_2d' ][3 * i :3 * i + 3 ] for i in keypoints_ids ])]
12271227 ]
1228- max_area_person = json_data_all [np .argmax (bbox_area )]
1228+ max_area_person = json_data_all [np .nanargmax (bbox_area )]
12291229 json_data = np .array ([max_area_person ['pose_keypoints_2d' ][3 * i :3 * i + 3 ] for i in keypoints_ids ])
12301230
12311231 elif synchronization_gui :
@@ -1434,6 +1434,7 @@ def synchronize_cams_all(config_dict):
14341434 keypoints_names = [node .name for _ , _ , node in RenderTree (model ) if node .id != None ]
14351435
14361436 # List json files
1437+ logging .info ('Synchronizing...' )
14371438 try :
14381439 pose_listdirs_names = next (os .walk (pose_dir ))[1 ]
14391440 os .listdir (os .path .join (pose_dir , pose_listdirs_names [0 ]))[0 ]
@@ -1488,7 +1489,6 @@ def synchronize_cams_all(config_dict):
14881489
14891490
14901491 # Extract, interpolate, and filter keypoint coordinates
1491- logging .info ('Synchronizing...' )
14921492 df_coords = []
14931493 b , a = signal .butter (int (filter_order / 2 ), filter_cutoff / (fps / 2 ), 'low' , analog = False )
14941494 json_files_names_range = [[j for j in json_files_cam if int (re .split (r'(\d+)' ,j )[- 2 ]) in range (* frames_cam )] for (json_files_cam , frames_cam ) in zip (json_files_names ,search_around_frames )]
@@ -1528,7 +1528,7 @@ def synchronize_cams_all(config_dict):
15281528 else :
15291529 selected_id_list = [None ] * cam_nb
15301530 if isinstance (approx_time_maxspeed , list ): # search around max speed
1531- logging .info (f'Synchronization is calculated around the times { approx_time_maxspeed } +/- { time_range_around_maxspeed } s.' )
1531+ logging .info (f'Synchronization is calculated at time { approx_time_maxspeed } ± { time_range_around_maxspeed } s.' )
15321532 elif approx_time_maxspeed == 'auto' : # search on the whole sequence (slower if long sequence)
15331533 logging .info ('Synchronization is calculated on the whole sequence. This may take a while.' )
15341534 else :
0 commit comments