From b8fdf2675012de7361d340d826c4b934b430ae80 Mon Sep 17 00:00:00 2001 From: Hunor Laczko Date: Sat, 28 Jan 2023 23:48:54 +0000 Subject: [PATCH] more runs --- convert_to_uv_local_single.py | 22 +++++++++++----------- run_parallel.py | 10 +++++----- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/convert_to_uv_local_single.py b/convert_to_uv_local_single.py index 75ad17c..207819b 100644 --- a/convert_to_uv_local_single.py +++ b/convert_to_uv_local_single.py @@ -384,7 +384,7 @@ def test(verts, faces, values): if __name__ == '__main__': parser = argparse.ArgumentParser() - parser.add_argument("-f", "--folder", help = "end of range", default='/home/workspace/data/dataset/local-cache/train_skirt') + parser.add_argument("-f", "--folder", help = "end of range", default='/home/workspace/data/dataset/test_skirt_ready_2') parser.add_argument("-s", "--start", help = "start of range", default=0) parser.add_argument("-e", "--end", help = "end of range", default=30000) parser.add_argument("-n", "--name", help = "end of range", default='lhunor') @@ -442,19 +442,19 @@ if __name__ == '__main__': folder = args.folder frames_file = 'frames' + skirt_modifier + '_10p.txt' - neighbourhood = 100 + neighbourhood = 10 - frames = [] - with open(os.path.join(folder, frames_file), 'r') as f: - lines = f.readlines() - lines = [line.strip() for line in lines] - frames = lines#[int(args.start):int(args.end)] - ids = [frame.split('_')[0] for frame in frames] + # frames = [] + # with open(os.path.join(folder, frames_file), 'r') as f: + # lines = f.readlines() + # lines = [line.strip() for line in lines] + # frames = lines#[int(args.start):int(args.end)] + # ids = [frame.split('_')[0] for frame in frames] print(f'params: -f {args.folder} -s {args.start} -e {args.end} -n {args.name} -skirt {args.skirt} -neigh {neighbourhood}') - # ids = os.listdir(os.path.join(local_folder, 'pose_shape')) - # ids = [id.split('_')[0] for id in ids] + ids = os.listdir(os.path.join(local_folder, 'pose_shape')) + ids = [id.split('_')[0] for id in ids] ids = sorted(list(set(ids)))[int(args.start):int(args.end)] for id in tqdm.tqdm(ids): @@ -478,7 +478,7 @@ if __name__ == '__main__': mask = np.load(os.path.join(local_folder, 'mesh_mask', id + '.npy')).astype(bool) # body = readPC2(os.path.join(folder, id, 'Body_posed.pc16'), True)['V'] # gt = readPC2(os.path.join(folder, id, garment + '_registered.pc16'), True)['V'] - curvature = np.stack([np.load(os.path.join(local_folder, f'mesh_curvature_{neighbourhood}', f'{id}_{i}.npz'))['mesh_curvature'] for i in range(frames_len)]) + curvature = np.stack([np.load(os.path.join(local_folder, f'mesh_curvature_{neighbourhood}_2', f'{id}_{i}.npz'))['mesh_curvature'] for i in range(frames_len)]) # mesh_unposed = [np.load(os.path.join(folder, id, 'mesh_unposed', id + '_' + str(i) + '.npz')) for i in range(gt.shape[0])] # mesh_unposed = np.stack([mesh_unposed[i]['mesh_unposed'] for i in range(gt.shape[0])]) # mesh_unposed_no_shape = [np.load(os.path.join(folder, id, 'mesh_unposed_no_shape', id + '_' + str(i) + '.npz')) for i in range(gt.shape[0])] diff --git a/run_parallel.py b/run_parallel.py index bc2ff88..540a940 100644 --- a/run_parallel.py +++ b/run_parallel.py @@ -4,8 +4,8 @@ import os if __name__ == '__main__': - folder = '/home/workspace/data/dataset/local-cache/train_skirt' - # folder = '/home/workspace/data/dataset/test_skirt_ready_2' + # folder = '/home/workspace/data/dataset/local-cache/train_skirt' + folder = '/home/workspace/data/dataset/test_skirt_ready_2' # folder = '/home/workspace/local-data/valid_skirt' # folder = '/home/workspace/local-data/cape_processed/train/male' # folder = '/home/workspace/local-data/valid_skirt' @@ -15,15 +15,15 @@ if __name__ == '__main__': skirt = 0 count = 0 - step = 10 + step = 20 # !!!!!!! change skirt parameter in script - while count < 80: + while count < 150: # os.system('nohup python convert_to_uv_cape.py -f ' + folder + ' -s ' + str(count) + ' -e ' + str(count + step) + ' -n ' + 'to_uv_2_cape_train_male_' + str(count) + '_' + str(count+step) + ' > nohup/to_uv_2_cape_train_male_' + str(count) + '_' + str(count+step) + '.out' + ' 2>&1 &') # os.system('nohup python convert_to_uv.py -f ' + folder + ' -s ' + str(count) + ' -e ' + str(count + step) + ' -n ' + 'to_uv_train_unposed_onehot_' + str(count) + '_' + str(count+step) + ' > nohup/to_uv_train_unposed_onehot_' + str(count) + '_' + str(count+step) + '.out' + ' 2>&1 &') # os.system('nohup python convert_to_uv_local.py -f ' + folder + ' -s ' + str(count) + ' -e ' + str(count + step) + ' -n ' + 'to_uv_train_local_unposed_onehot_' + str(count) + '_' + str(count+step) + ' > nohup/to_uv_train_local_unposed_onehot_' + str(count) + '_' + str(count+step) + '.out' + ' 2>&1 &') - os.system('nohup python convert_to_uv_local_single.py -f ' + folder + ' -s ' + str(count) + ' -e ' + str(count + step) + ' -n ' + 'to_uv_curv_2_100_train_skirt_' + str(count) + '_' + str(count+step) + ' > nohup/to_uv_curv_2_100_train_skirt_' + str(count) + '_' + str(count+step) + '.out' + ' 2>&1 &') + os.system('nohup python convert_to_uv_local_single.py -f ' + folder + ' -s ' + str(count) + ' -e ' + str(count + step) + ' -n ' + 'to_uv_curv_2_10_test_skirt_' + str(count) + '_' + str(count+step) + ' > nohup/to_uv_curv_2_10_test_skirt_' + str(count) + '_' + str(count+step) + '.out' + ' 2>&1 &') # os.system('nohup python convert_to_uv_local_single.py -f ' + folder + ' -s ' + str(count) + ' -e ' + str(count + step) + ' -n ' + 'to_uv_train_skirt_local_unposed_onehot_3_' + str(count) + '_' + str(count+step) + ' > nohup/to_uv_train_skirt_local_unposed_onehot_3_' + str(count) + '_' + str(count+step) + '.out' + ' 2>&1 &') # os.system('nohup python convert_to_uv_local_single.py -f ' + folder + ' -s ' + str(count) + ' -e ' + str(count + step) + ' -n ' + 'to_uv_valid_skirt_local_unposed_onehot_3_' + str(count) + '_' + str(count+step) + ' > nohup/to_uv_valid_skirt_local_unposed_onehot_' + str(count) + '_' + str(count+step) + '.out' + ' 2>&1 &') # os.system('nohup python downscale.py -f ' + folder + ' -s ' + str(count) + ' -e ' + str(count + step) + ' -n ' + 'downscale_valid_posed_no_orient_' + str(count) + '_' + str(count+step) + ' > nohup/downscale_valid_posed_no_orient_' + str(count) + '_' + str(count+step) + '.out' + ' 2>&1 &')