train encoder on raw curvature values
This commit is contained in:
+6
-4
@@ -179,7 +179,7 @@ if __name__ == '__main__':
|
||||
start = time.perf_counter()
|
||||
# offsets_static = sio.loadmat(os.path.join(folder, id, garment + '_offsets_static.mat'))['label'][:,:3]
|
||||
# body_static = sio.loadmat(os.path.join(garment_dir, 'info_body.mat'))['B']
|
||||
# mask = np.squeeze(sio.loadmat(os.path.join(garment_dir, garment + '_mask.mat'))['mask'].astype(bool))
|
||||
mask = np.squeeze(sio.loadmat(os.path.join(garment_dir, garment + '_mask.mat'))['mask'].astype(bool))
|
||||
# verts_static = (body_static + offsets_static) * mask[:, np.newaxis]
|
||||
# # dfassert verts_static.min() > -1 and verts_static.max() < 1
|
||||
|
||||
@@ -257,10 +257,12 @@ if __name__ == '__main__':
|
||||
# for i in range(body_posed.shape[0]):
|
||||
# shutil.copyfile(os.path.join(garment_dir, 'curvature_uv', garment + '_' + str(i) + '.npz'), os.path.join(output_folder, 'uv_curvature', id + '_' + str(i) + '.npz'))
|
||||
|
||||
os.makedirs(os.path.join(output_folder, 'mesh_curvature'), exist_ok=True)
|
||||
mesh_curvature = np.load(os.path.join(garment_dir, 'curvature_label_6_25.npy'))
|
||||
os.makedirs(os.path.join(output_folder, 'mesh_curvature_raw'), exist_ok=True)
|
||||
data = np.load(os.path.join(garment_dir, 'curvature_25_raw.npy'))
|
||||
mesh_curvature_raw = np.zeros((data.shape[0], 14475), dtype=np.float32)
|
||||
mesh_curvature_raw[:, mask] = data
|
||||
for i in range(pose.shape[1]):
|
||||
np.savez_compressed(os.path.join(output_folder, 'mesh_curvature', id + '_' + str(i) + '.npz'), mesh_curvature=mesh_curvature[i])
|
||||
np.savez_compressed(os.path.join(output_folder, 'mesh_curvature_raw', id + '_' + str(i) + '.npz'), mesh_curvature_raw=mesh_curvature_raw[i])
|
||||
|
||||
|
||||
# os.makedirs(os.path.join(output_folder, 'uv_posed_body_no_orient'), exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user