replace frames_range by frame_range
This commit is contained in:
parent
6d54409bc2
commit
d10ab1cd34
@ -6,7 +6,7 @@
|
||||
|
||||
[project]
|
||||
project_dir = '' # BETWEEN SINGLE QUOTES! # If empty, project dir is current dir
|
||||
frames_range = [0,100] #For example [10,300], or [] if all frames.
|
||||
frame_range = [0,100] #For example [10,300], or [] if all frames.
|
||||
frame_rate = 60 #Hz
|
||||
|
||||
rawImg_folder_name = 'raw-2d'
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
[project]
|
||||
project_dir = '' # BETWEEN SINGLE QUOTES! # If empty, project dir is current dir
|
||||
frames_range = [0,100] #For example [10,300], or [] if all frames.
|
||||
frame_range = [0,100] #For example [10,300], or [] if all frames.
|
||||
frame_rate = 60 #Hz
|
||||
|
||||
rawImg_folder_name = 'raw-2d'
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
[project]
|
||||
project_dir = '' # BETWEEN SINGLE QUOTES! # If empty, project dir is current dir
|
||||
frames_range = [0,100] #For example [10,300], or [] if all frames.
|
||||
frame_range = [0,100] #For example [10,300], or [] if all frames.
|
||||
frame_rate = 60 #Hz
|
||||
|
||||
rawImg_folder_name = 'raw-2d'
|
||||
|
@ -76,9 +76,9 @@ def base_params(config_dict):
|
||||
|
||||
project_dir = config_dict.get('project').get('project_dir')
|
||||
if project_dir == '': project_dir = os.getcwd()
|
||||
frames_range = config_dict.get('project').get('frames_range')
|
||||
frame_range = config_dict.get('project').get('frame_range')
|
||||
seq_name = os.path.basename(project_dir)
|
||||
frames = ["all frames" if frames_range == [] else f"frames {frames_range[0]} to {frames_range[1]}"][0]
|
||||
frames = ["all frames" if frame_range == [] else f"frames {frame_range[0]} to {frame_range[1]}"][0]
|
||||
|
||||
return project_dir, seq_name, frames
|
||||
|
||||
|
@ -281,7 +281,7 @@ def filter_all(config):
|
||||
pose_folder_name = config.get('project').get('pose_folder_name')
|
||||
pose_dir = os.path.join(project_dir, pose_folder_name)
|
||||
json_folder_extension = config.get('project').get('pose_json_folder_extension')
|
||||
frames_range = config.get('project').get('frames_range')
|
||||
frame_range = config.get('project').get('frame_range')
|
||||
seq_name = os.path.basename(project_dir)
|
||||
pose3d_folder_name = config.get('project').get('pose3d_folder_name')
|
||||
pose3d_dir = os.path.join(project_dir, pose3d_folder_name)
|
||||
@ -292,7 +292,7 @@ def filter_all(config):
|
||||
pose_listdirs_names = next(os.walk(pose_dir))[1]
|
||||
json_dirs_names = [k for k in pose_listdirs_names if json_folder_extension in k]
|
||||
json_files_names = [fnmatch.filter(os.listdir(os.path.join(pose_dir, js_dir)), '*.json') for js_dir in json_dirs_names]
|
||||
f_range = [[0,min([len(j) for j in json_files_names])] if frames_range==[] else frames_range][0]
|
||||
f_range = [[0,min([len(j) for j in json_files_names])] if frame_range==[] else frame_range][0]
|
||||
|
||||
# Trc paths
|
||||
trc_f_in = f'{seq_name}_{f_range[0]}-{f_range[1]}.trc'
|
||||
|
@ -247,7 +247,7 @@ def track_2d_all(config):
|
||||
pose_model = config.get('pose-2d').get('pose_model')
|
||||
tracked_keypoint = config.get('2d-tracking').get('tracked_keypoint')
|
||||
json_folder_extension = config.get('project').get('pose_json_folder_extension')
|
||||
frames_range = config.get('project').get('frames_range')
|
||||
frame_range = config.get('project').get('frame_range')
|
||||
|
||||
calib_dir = os.path.join(project_dir, calib_folder_name)
|
||||
calib_file = glob.glob(os.path.join(calib_dir, '*.toml'))[0]
|
||||
@ -276,7 +276,7 @@ def track_2d_all(config):
|
||||
json_tracked_files = [[os.path.join(poseTracked_dir, j_dir, j_file) for j_file in json_files_names[j]] for j, j_dir in enumerate(json_dirs_names)]
|
||||
|
||||
# person's tracking
|
||||
f_range = [[min([len(j) for j in json_files])] if frames_range==[] else frames_range][0]
|
||||
f_range = [[min([len(j) for j in json_files])] if frame_range==[] else frame_range][0]
|
||||
n_cams = len(json_dirs_names)
|
||||
error_min_tot, cameras_off_tot = [], []
|
||||
|
||||
|
@ -362,7 +362,7 @@ def triangulate_all(config):
|
||||
pose_model = config.get('pose-2d').get('pose_model')
|
||||
pose_folder_name = config.get('project').get('pose_folder_name')
|
||||
json_folder_extension = config.get('project').get('pose_json_folder_extension')
|
||||
frames_range = config.get('project').get('frames_range')
|
||||
frame_range = config.get('project').get('frame_range')
|
||||
likelihood_threshold = config.get('3d-triangulation').get('likelihood_threshold')
|
||||
interpolation_kind = config.get('3d-triangulation').get('interpolation')
|
||||
pose_dir = os.path.join(project_dir, pose_folder_name)
|
||||
@ -394,7 +394,7 @@ def triangulate_all(config):
|
||||
json_tracked_files = [[os.path.join(pose_dir, j_dir, j_file) for j_file in json_files_names[j]] for j, j_dir in enumerate(json_dirs_names)]
|
||||
|
||||
# Triangulation
|
||||
f_range = [[0,min([len(j) for j in json_files_names])] if frames_range==[] else frames_range][0]
|
||||
f_range = [[0,min([len(j) for j in json_files_names])] if frame_range==[] else frame_range][0]
|
||||
|
||||
n_cams = len(json_dirs_names)
|
||||
Q_tot, error_tot, nb_cams_excluded_tot = [], [], []
|
||||
|
Loading…
Reference in New Issue
Block a user