33 lines
1.6 KiB
Python
33 lines
1.6 KiB
Python
import os
|
|
import tqdm
|
|
import shutil
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
folder_in = '/home/workspace/data/dataset/train_skirt_25'
|
|
folder_out = '/home/workspace/data/dataset/train_skirt_25_2'
|
|
|
|
ids = os.listdir(folder_in)
|
|
|
|
for id in tqdm.tqdm(ids):
|
|
garment_dir = os.path.join(folder_in, id)
|
|
|
|
if not os.path.isdir(garment_dir):
|
|
continue
|
|
|
|
garments = [f.replace('.pc16','') for f in os.listdir(garment_dir) if f.find('_') == -1 and f != 'info.mat' and not f.endswith('.obj')]
|
|
# assert len (garments) == 1
|
|
if len (garments) != 1:
|
|
continue
|
|
garment = garments[0]
|
|
|
|
# shutil.copytree(os.path.join(folder_in, id, 'mesh_unposed'), os.path.join(folder_out, id, 'mesh_unposed'), dirs_exist_ok=True)
|
|
# shutil.copytree(os.path.join(folder_in, id, 'mesh_unposed_no_shape'), os.path.join(folder_out, id, 'mesh_unposed_no_shape'), dirs_exist_ok=True)
|
|
# shutil.copytree(os.path.join(folder_in, id, 'mesh_posed_body_no_orient'), os.path.join(folder_out, id, 'mesh_posed_body_no_orient'), dirs_exist_ok=True)
|
|
shutil.copytree(os.path.join(folder_in, id, 'body_posed_uv'), os.path.join(folder_out, id, 'body_posed_uv'), dirs_exist_ok=True)
|
|
shutil.copytree(os.path.join(folder_in, id, 'uv_posed_body_no_orient'), os.path.join(folder_out, id, 'uv_posed_body_no_orient'), dirs_exist_ok=True)
|
|
# shutil.copy(os.path.join(folder_in, id, 'curvature_25_raw.npy'), os.path.join(folder_out, id, 'curvature_25_raw.npy'))
|
|
shutil.copy(os.path.join(folder_in, id, 'body_static_uv.npy'), os.path.join(folder_out, id, 'body_static_uv.npy'))
|