os.makedirs(model_path) print((pad("Generating network run folder"))) else: print((pad("Network run folder already exits"))) exp_cfg_fn = os.path.split(exp_cfg_path)[-1] env_cfg_fn = os.path.split(env_cfg_path)[-1] exp, env = move_dataset_to_ssd(env, exp) exp, env = move_background(env, exp) dic = {'exp': exp, 'env': env} model = TrackNet6D(**dic) early_stop_callback = EarlyStopping( monitor='avg_val_disparity', patience=exp.get('early_stopping_cfg', {}).get('patience', 100), strict=False, verbose=True, mode='min', min_delta=exp.get('early_stopping_cfg', {}).get('min_delta', -0.1)) checkpoint_callback = ModelCheckpoint( filepath=exp['model_path'] + '/{epoch}-{avg_val_disparity_float:.4f}', verbose=True, monitor="avg_val_disparity", mode="min", prefix="", save_last=True, save_top_k=10, )
exp_cfg_fn = os.path.split(exp_cfg_path)[-1] env_cfg_fn = os.path.split(env_cfg_path)[-1] print(pad(f'Copy {env_cfg_path} to {model_path}/{exp_cfg_fn}')) shutil.copy(exp_cfg_path, f'{model_path}/{exp_cfg_fn}') shutil.copy(env_cfg_path, f'{model_path}/{env_cfg_fn}') exp, env = move_dataset_to_ssd(env, exp) exp, env = move_background(env, exp) dic = {'exp': exp, 'env': env} model = TrackNet6D(**dic) early_stop_callback = EarlyStopping( monitor='avg_val_disparity', patience=exp.get('early_stopping_cfg', {}).get('patience', 100), strict=False, verbose=True, mode='min', min_delta=exp.get('early_stopping_cfg', {}).get('min_delta', -0.1)) checkpoint_callback = ModelCheckpoint( filepath=exp['model_path'] + '/{epoch}-{avg_val_disparity_float:.4f}', verbose=True, monitor="avg_val_disparity", mode="min", prefix="", save_last=True, save_top_k=10, ) if exp.get('checkpoint_restore', False):