Commit
·
c4fa085
1
Parent(s):
a212503
Added COMET zoom factors
Browse files
COMET/Evaluate_network.py
CHANGED
@@ -216,9 +216,9 @@ if __name__ == '__main__':
|
|
216 |
# mov_centroids_isotropic = mov_centroids * upsample_scale
|
217 |
pred_centroids_isotropic = pred_centroids * upsample_scale
|
218 |
|
219 |
-
fix_centroids_isotropic = np.divide(fix_centroids_isotropic, C.
|
220 |
-
# mov_centroids_isotropic = np.divide(mov_centroids_isotropic, C.
|
221 |
-
pred_centroids_isotropic = np.divide(pred_centroids_isotropic, C.
|
222 |
# Now we can measure the TRE in mm
|
223 |
tre_array = target_registration_error(fix_centroids_isotropic, pred_centroids_isotropic, False).eval()
|
224 |
tre = np.mean([v for v in tre_array if not np.isnan(v)])
|
|
|
216 |
# mov_centroids_isotropic = mov_centroids * upsample_scale
|
217 |
pred_centroids_isotropic = pred_centroids * upsample_scale
|
218 |
|
219 |
+
fix_centroids_isotropic = np.divide(fix_centroids_isotropic, C.COMET_DATASET_iso_to_cubic_scales)
|
220 |
+
# mov_centroids_isotropic = np.divide(mov_centroids_isotropic, C.COMET_DATASET_iso_to_cubic_scales)
|
221 |
+
pred_centroids_isotropic = np.divide(pred_centroids_isotropic, C.COMET_DATASET_iso_to_cubic_scales)
|
222 |
# Now we can measure the TRE in mm
|
223 |
tre_array = target_registration_error(fix_centroids_isotropic, pred_centroids_isotropic, False).eval()
|
224 |
tre = np.mean([v for v in tre_array if not np.isnan(v)])
|
DeepDeformationMapRegistration/utils/constants.py
CHANGED
@@ -509,6 +509,8 @@ REG_MANUAL_W = [1.] * len(REG_PRIOR_W)
|
|
509 |
# .../T1/training/zoom_factors.csv contain the scale factors of all the training samples from isotropic to 128x128x128
|
510 |
# The augmentation values will be scaled using the average+std
|
511 |
IXI_DATASET_iso_to_cubic_scales = np.asarray([0.655491 + 0.039223, 0.496783 + 0.029349, 0.499691 + 0.028155])
|
|
|
|
|
512 |
MAX_AUG_DISP_ISOT = 30
|
513 |
MAX_AUG_DEF_ISOT = 6
|
514 |
MAX_AUG_DISP = np.max(MAX_AUG_DISP_ISOT * IXI_DATASET_iso_to_cubic_scales) # Scaled displacements
|
|
|
509 |
# .../T1/training/zoom_factors.csv contain the scale factors of all the training samples from isotropic to 128x128x128
|
510 |
# The augmentation values will be scaled using the average+std
|
511 |
IXI_DATASET_iso_to_cubic_scales = np.asarray([0.655491 + 0.039223, 0.496783 + 0.029349, 0.499691 + 0.028155])
|
512 |
+
# ...OSLO_COMET_CT/Formatted_128x128x128/zoom_factors.csv contain the scale factors of all the training samples from isotropic to 128x128x128
|
513 |
+
COMET_DATASET_iso_to_cubic_scales = np.asarray([0.455259 + 0.048027, 0.492012 + 0.044298, 0.577552 + 0.051708])
|
514 |
MAX_AUG_DISP_ISOT = 30
|
515 |
MAX_AUG_DEF_ISOT = 6
|
516 |
MAX_AUG_DISP = np.max(MAX_AUG_DISP_ISOT * IXI_DATASET_iso_to_cubic_scales) # Scaled displacements
|