prepare to train

This commit is contained in:
2023-01-28 12:40:28 +00:00
parent 8c0436cea8
commit 0543657e4e
3 changed files with 138 additions and 6 deletions
+4 -3
View File
@@ -194,7 +194,8 @@ class DatasetFactory():
use_one_hot=False,
use_no_orient=True,
testing=False,
frames_file=None):
frames_file=None,
curv_neighbourhood=25):
assert set(resolutions).issubset(set([32, 64, 128, 256, 512]))
dataset_idx = DatasetIdx(folder, shuffle, is_cape=is_cape, testing=testing, frames_file=frames_file)
@@ -260,7 +261,7 @@ class DatasetFactory():
if 'mesh_curvature' in signature.keys():
mesh_curvature = np.load(os.path.join(folder, 'mesh_curvature', id + separator + frame_nr + '.npz')); mesh_curvature = mesh_curvature['mesh_curvature']
mesh_curvature = np.load(os.path.join(folder, f'mesh_curvature_{curv_neighbourhood}', id + separator + frame_nr + '.npz')); mesh_curvature = mesh_curvature['mesh_curvature']
item['mesh_curvature'] = mesh_curvature.astype(np.int32)
@@ -270,7 +271,7 @@ class DatasetFactory():
res_string = '_' + str(res)
if 'uv_curvature' + res_string in signature.keys():
uv_curvature = np.load(os.path.join(folder, 'uv_curvature' + res_string, id + separator + frame_nr + '.npz'));
uv_curvature = np.load(os.path.join(folder, f'uv_curvature_{curv_neighbourhood}' + res_string, id + separator + frame_nr + '.npz'));
if res_string != '':
uv_curvature = uv_curvature['uv_curvature']
else: