Skip to content

Commit

Permalink
Merge pull request #2233 from SCIInstitute/2230-deepssm-aug-meshes
Browse files Browse the repository at this point in the history
Fixes for #2230
  • Loading branch information
akenmorris committed Apr 10, 2024
2 parents 3224d58 + 80f9198 commit 002714b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 3 additions & 0 deletions Examples/Python/deep_ssm.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,11 @@ def Run_Pipeline(args):
planes=test_planes)
print("Test mean mesh surface-to-surface distance: " + str(mean_dist))

DeepSSMUtils.process_test_predictions(project, config_file)

# If tiny test or verify, check results and exit
check_results(args, mean_dist)

open(status_dir + "step_12.txt", 'w').close()

print("All steps complete")
Expand Down
2 changes: 1 addition & 1 deletion Python/DeepSSMUtilsPackage/DeepSSMUtils/run_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def process_test_predictions(project, config_file):
if not os.path.exists(world_predictions_dir):
os.makedirs(world_predictions_dir)

reference_index = DeepSSMUtils.get_reference_index(project)
reference_index = sw.utils.get_reference_index(project)
template_mesh = project_path + subjects[reference_index].get_groomed_filenames()[0]
template_particles = project_path + subjects[reference_index].get_local_particle_filenames()[0]

Expand Down
8 changes: 1 addition & 7 deletions Python/DeepSSMUtilsPackage/DeepSSMUtils/train_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ def write_examples(pred_particles, true_particles, filenames, out_dir):

# reshape pred to be 1D
pred = pred.flatten()

# print type of pred
print(f"pred type: {type(pred)}")
print(f"pred shape: {pred.shape}")
print(f"scalars type: {type(scalars)}")
print(f"scalars shape: {scalars.shape}")

# interpolate scalars to mesh
mesh.interpolate_scalars_to_mesh("deepssm_error", pred, scalars)
out_mesh_file = out_dir + names[i] + ".vtk"
mesh.write(out_mesh_file)

0 comments on commit 002714b

Please sign in to comment.