Skip to content
Snippets Groups Projects
Commit 0fe98db5 authored by Cribellier, Antoine's avatar Cribellier, Antoine
Browse files

Change condition for overwriting previous

parent 69cbcc94
Branches
No related tags found
No related merge requests found
......@@ -897,7 +897,10 @@ class BatchProcessing:
if not overwrite_previous and os.path.exists(os.path.join(save_process_path, 'process_history.yaml')):
if fn_name not in ['enhance_contrast', 'enhance_brightness', 'enhance_sharpness', 'enhance_color',
'autocontrast', 'equalize', 'load_dlc', 'fit_skeleton']:
'autocontrast', 'equalize', 'load_dlc', 'fit_skeleton']\
or (fn_name == 'load_dlc' and len(glob.glob(os.path.join(save_process_path, '*' + model_name + '_full.pickle'))) >= 1)\
or (fn_name == 'fit_skeleton' and len(glob.glob(os.path.join(save_process_path, '*' + model_name + '-3d_points.csv'))) >= 1):
print('>> {0} has been skipped because already processed and overwrite_previous = False'.format(main_rec_name))
continue
......@@ -1163,8 +1166,15 @@ class BatchProcessing:
frames = {camn: recording.get(camn).get_numbers() for camn in range(1, self.nb_cam + 1)}
if not overwrite_previous and os.path.exists(os.path.join(save_process_path, 'process_history.yaml')):
print('>> {0} had already been processed, and thus as been skipped (overwrite_previous = False)')
continue
if fn_name not in ['enhance_contrast', 'enhance_brightness', 'enhance_sharpness', 'enhance_color',
'autocontrast', 'equalize', 'load_dlc', 'fit_skeleton'] \
or (fn_name == 'load_dlc' and len(
glob.glob(os.path.join(save_process_path, '*' + model_name + '_full.pickle'))) >= 1) \
or (fn_name == 'fit_skeleton' and len(
glob.glob(os.path.join(save_process_path, '*' + model_name + '-3d_points.csv'))) >= 1):
print('>> {0} had already been processed, and thus as been skipped (overwrite_previous = False)')
continue
if not os.path.exists(save_process_path):
os.makedirs(save_process_path)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment