Commit
·
f4c45ef
1
Parent(s):
4b5777a
Typo when calling the image shape in the constants.py file
Browse files- DeepDeformationMapRegistration/main.py +2 -2
- setup.py +1 -0
DeepDeformationMapRegistration/main.py
CHANGED
@@ -262,7 +262,7 @@ def main():
|
|
262 |
|
263 |
image_shape_crop = fixed_image.shape
|
264 |
# 2.3 Resize the images to the expected input size
|
265 |
-
zoom_factors = C.
|
266 |
fixed_image = zoom(fixed_image, zoom_factors)
|
267 |
moving_image = zoom(moving_image, zoom_factors)
|
268 |
fixed_image = min_max_norm(fixed_image)
|
@@ -310,7 +310,7 @@ def main():
|
|
310 |
enc_features = [32, 64, 128, 256, 512, 1024] # const.ENCODER_FILTERS
|
311 |
dec_features = enc_features[::-1] + [16, 16] # const.ENCODER_FILTERS[::-1]
|
312 |
nb_features = [enc_features, dec_features]
|
313 |
-
network = vxm.networks.VxmDense(inshape=C.
|
314 |
nb_unet_features=nb_features,
|
315 |
int_steps=0)
|
316 |
network.load_weights(MODEL_FILE, by_name=True)
|
|
|
262 |
|
263 |
image_shape_crop = fixed_image.shape
|
264 |
# 2.3 Resize the images to the expected input size
|
265 |
+
zoom_factors = np.asarray(C.IMG_SHAPE) / np.asarray(image_shape_crop)
|
266 |
fixed_image = zoom(fixed_image, zoom_factors)
|
267 |
moving_image = zoom(moving_image, zoom_factors)
|
268 |
fixed_image = min_max_norm(fixed_image)
|
|
|
310 |
enc_features = [32, 64, 128, 256, 512, 1024] # const.ENCODER_FILTERS
|
311 |
dec_features = enc_features[::-1] + [16, 16] # const.ENCODER_FILTERS[::-1]
|
312 |
nb_features = [enc_features, dec_features]
|
313 |
+
network = vxm.networks.VxmDense(inshape=C.IMG_SHAPE[:-1],
|
314 |
nb_unet_features=nb_features,
|
315 |
int_steps=0)
|
316 |
network.load_weights(MODEL_FILE, by_name=True)
|
setup.py
CHANGED
@@ -37,6 +37,7 @@ setup(
|
|
37 |
'tensorboard==1.14.0',
|
38 |
'nibabel==3.2.1',
|
39 |
'numpy==1.18.5',
|
|
|
40 |
],
|
41 |
entry_points={
|
42 |
'console_scripts': ['ddmr=DeepDeformationMapRegistration.main:main']
|
|
|
37 |
'tensorboard==1.14.0',
|
38 |
'nibabel==3.2.1',
|
39 |
'numpy==1.18.5',
|
40 |
+
'h5py==2.10'
|
41 |
],
|
42 |
entry_points={
|
43 |
'console_scripts': ['ddmr=DeepDeformationMapRegistration.main:main']
|