Demonstration of mermaid’s simple registration interface¶
[3]:
%load_ext autoreload
%autoreload 2
%matplotlib inline
[4]:
from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt
import mermaid.simple_interface as SI
import mermaid.example_generation as EG
import mermaid.module_parameters as pars
Will read from /Users/rkwitt/Remote/mermaid/mermaid/../settings/compute_settings.json
Will read from /Users/rkwitt/Remote/mermaid/mermaid/../settings/compute_settings_comments.json
Will read from /Users/rkwitt/Remote/mermaid/mermaid/../settings/baseconf_settings.json
Will read from /Users/rkwitt/Remote/mermaid/mermaid/../settings/baseconf_settings_comments.json
Will read from /Users/rkwitt/Remote/mermaid/mermaid/../settings/algconf_settings.json
Will read from /Users/rkwitt/Remote/mermaid/mermaid/../settings/algconf_settings_comments.json
Will read from /Users/rkwitt/Remote/mermaid/mermaid/../settings/democonf_settings.json
Will read from /Users/rkwitt/Remote/mermaid/mermaid/../settings/democonf_settings_comments.json
Will read from /Users/rkwitt/Remote/mermaid/mermaid/../settings/datapro_settings.json
Will read from /Users/rkwitt/Remote/mermaid/mermaid/../settings/datapro_settings_comments.json
Will read from /Users/rkwitt/Remote/mermaid/mermaid/../settings/respro_settings.json
Will read from /Users/rkwitt/Remote/mermaid/mermaid/../settings/respro_settings_comments.json
WARNING: nn_interpolation could not be imported (only supported in CUDA at the moment). Some functionality may not be available.
First, we create an empty parameter dictionary ….
[5]:
params = pars.ParameterDict()
Next, we create a synthetic image pair in 2D to register. We will also be adding noise to the background of these images.
[6]:
use_synthetic_test_case = True
add_noise_to_bg = True
dim = 2
sz = 64
szEx = np.tile(sz, dim)
I0_syn, I1_syn, spacing_syn = EG.CreateSquares(dim, add_noise_to_bg).create_image_pair(szEx, params)
Creating new category: root.square_example_images
Using default value = 10 for key = len_s of category = root.square_example_images
Using default value = 16 for key = len_l of category = root.square_example_images
I0
and I1
effectively constitute a batch of size 1. Hence, the numpy array is of shape 1x1x64x64
.
[7]:
print('Size I0:', I0_syn.shape)
print('Size I1:', I1_syn.shape)
plt.figure(figsize=(10,4))
plt.subplot(121)
plt.imshow(I0_syn[0,0,:,:],cmap='gray')
plt.title('Source')
plt.axis('off');
plt.subplot(122)
plt.imshow(I1_syn[0,0,:,:],cmap='gray')
plt.title('Target')
plt.axis('off');
Size I0: (1, 1, 64, 64)
Size I1: (1, 1, 64, 64)

Alternatively, we can also create an example pair of realistic 2D MRI slices with spacing normalized to \([0,1]\). In that case, images are of size 1x1x128x128
.
[8]:
I0_real, I1_real, spacing_real = EG.CreateRealExampleImages(dim).create_image_pair()
INFO: Image WAS intensity normalized when loading: [0.0,1.367119]
INFO: Normalizing the spacing to [0,1] in the largest dimension. (Turn normalize_spacing off if this is not desired.)
Normalize spacing: [2. 2. 2.] -> [0.00787402 0.00787402 0.00787402]
Normalize spacing, extent: [ 0. 254. 254.] -> [0. 1. 1.]
Normalize spacing: [2. 2.] -> [0.00787402 0.00787402]
Normalize spacing, extent: [254. 254.] -> [1. 1.]
INFO: Image WAS intensity normalized when loading: [0.0,1.4618253]
INFO: Normalizing the spacing to [0,1] in the largest dimension. (Turn normalize_spacing off if this is not desired.)
Normalize spacing: [2. 2. 2.] -> [0.00787402 0.00787402 0.00787402]
Normalize spacing, extent: [ 0. 254. 254.] -> [0. 1. 1.]
Normalize spacing: [2. 2.] -> [0.00787402 0.00787402]
Normalize spacing, extent: [254. 254.] -> [1. 1.]
[9]:
print('Size I0:', I0_real.shape)
print('Size I1:', I1_real.shape)
plt.figure(figsize=(10,4))
plt.subplot(121)
plt.imshow(I0_real[0,0,:,:],cmap='gray')
plt.title('Source')
plt.axis('off');
plt.subplot(122)
plt.imshow(I1_real[0,0,:,:],cmap='gray')
plt.title('Target')
plt.axis('off');
Size I0: (1, 1, 128, 128)
Size I1: (1, 1, 128, 128)

[10]:
def show_image(I, title):
plt.imshow(I[0,0,:,:], cmap='gray')
plt.axis('off')
plt.title(title)
Next, we are ready to create an instance of SI.RegisterImagePair
and show all available registration models to select from.
[11]:
si = SI.RegisterImagePair()
si.print_available_models()
Known registration models are:
------------------------------
affine_map: map-based affine registration
diffusion_map: displacement-based diffusion registration
curvature_map: displacement-based curvature registration
total_variation_map: displacement-based total variation registration
svf_map: map-based stationary velocity field
svf_image: image-based stationary velocity field
svf_scalar_momentum_image: image-based stationary velocity field using the scalar momentum
svf_scalar_momentum_map: map-based stationary velocity field using the scalar momentum
svf_vector_momentum_image: image-based stationary velocity field using the vector momentum
svf_vector_momentum_map: map-based stationary velocity field using the vector momentum
lddmm_shooting_map: map-based shooting-based LDDMM using the vector momentum
lddmm_shooting_image: image-based shooting-based LDDMM using the vector momentum
lddmm_shooting_scalar_momentum_map: map-based shooting-based LDDMM using the scalar momentum
lddmm_shooting_scalar_momentum_image: image-based shooting-based LDDMM using the scalar momentum
svf_quasi_momentum_image: EXPERIMENTAL: Image-based SVF version which estimates velcocity based on a smoothed vetor field
lddmm_adapt_smoother_map: map-based shooting-based Region specific diffemorphic mapping, with a spatio-temporal regularizer
svf_adapt_smoother_map: map-based shooting-based vSVF, with a spatio regularizer
one_step_map: map based displacement field
That’s basically it. We can now simply use the register_images
method of SI.RegisterImagePair
with appropriate parameters.
In the following examples of different registration models, we will always keep track of all intermediate results by setting the recording_step
to 1, i.e., we record the intermediate results in each optimization iteration and turn visualization off, as we will visualize the results later by hand. You can also set recording_step
to None
in which case nothing is recorded.
Also, you can set visualization_step
to a non-zero value which will produce an overview plot of the intermediate registration results at the given visualization steps.
Affine registration¶
[12]:
si.register_images(I0_syn, I1_syn, spacing_syn, model_name='affine_map',
nr_of_iterations=200,
use_multi_scale=False,
visualize_step=None,
optimizer_name='sgd',
learning_rate=0.001,
rel_ftol=1e-7,
json_config_out_filename=('test2d_tst.json', 'test2d_tst_with_comments.json'),
params='test2d_tst.json',
recording_step=1)
Loading parameter file = test2d_tst.json
Overwriting key = use_map; category = root.model.deformation; value = True -> True
Overwriting key = type; category = root.model.registration_model; value = svf_scalar_momentum_map -> affine_map
Overwriting key = name; category = root.optimizer; value = sgd -> sgd
Overwriting key = nr_of_iterations; category = root.optimizer.single_scale; value = 50 -> 200
Overwriting key = rel_ftol; category = root.optimizer.single_scale; value = 1e-07 -> 1e-07
mapLowResFactor = 1: performing computations at original resolution.
Overwriting key = use_map; category = root.model.deformation; value = True -> True
Overwriting key = map_low_res_factor; category = root.model.deformation; value = 1.0 -> 1.0
Overwriting key = type; category = root.model.registration_model; value = affine_map -> affine_map
Overwriting key = type; category = root.model.registration_model; value = affine_map -> affine_map
Using map-based affine_map model
works in mermaid iter mode
AffineMapNet()
Overwriting key = lr; category = root.optimizer.sgd.individual; value = 0.01 -> 0.001
Overwriting key = lr; category = root.optimizer.sgd.shared; value = 0.01 -> 0.001
Using ssd similarity measure
0-Tot: E=013.2236 | simE=013.2236 | regE=000.0000 | optParE=000.0000 | relF= n/a |
0-Img: E=013.2236 | simE=013.2236 | regE=000.0000 |
1-Tot: E=020.9573 | simE=020.9573 | regE=000.0000 | optParE=000.0000 | relF=000.3522 |
1-Img: E=020.9573 | simE=020.9573 | regE=000.0000 |
2-Tot: E=021.1981 | simE=021.1981 | regE=000.0000 | optParE=000.0000 | relF=000.0108 |
2-Img: E=021.1981 | simE=021.1981 | regE=000.0000 |
3-Tot: E=019.1027 | simE=019.1027 | regE=000.0000 | optParE=000.0000 | relF=000.1042 |
3-Img: E=019.1027 | simE=019.1027 | regE=000.0000 |
4-Tot: E=013.9994 | simE=013.9994 | regE=000.0000 | optParE=000.0000 | relF=000.3402 |
4-Img: E=013.9994 | simE=013.9994 | regE=000.0000 |
5-Tot: E=013.7488 | simE=013.7488 | regE=000.0000 | optParE=000.0000 | relF=000.0170 |
5-Img: E=013.7488 | simE=013.7488 | regE=000.0000 |
6-Tot: E=013.4589 | simE=013.4589 | regE=000.0000 | optParE=000.0000 | relF=000.0201 |
6-Img: E=013.4589 | simE=013.4589 | regE=000.0000 |
7-Tot: E=012.9524 | simE=012.9524 | regE=000.0000 | optParE=000.0000 | relF=000.0363 |
7-Img: E=012.9524 | simE=012.9524 | regE=000.0000 |
8-Tot: E=012.3559 | simE=012.3559 | regE=000.0000 | optParE=000.0000 | relF=000.0447 |
8-Img: E=012.3559 | simE=012.3559 | regE=000.0000 |
9-Tot: E=012.5054 | simE=012.5054 | regE=000.0000 | optParE=000.0000 | relF=000.0111 |
9-Img: E=012.5054 | simE=012.5054 | regE=000.0000 |
10-Tot: E=014.0539 | simE=014.0539 | regE=000.0000 | optParE=000.0000 | relF=000.1029 |
10-Img: E=014.0539 | simE=014.0539 | regE=000.0000 |
11-Tot: E=012.1940 | simE=012.1940 | regE=000.0000 | optParE=000.0000 | relF=000.1410 |
11-Img: E=012.1940 | simE=012.1940 | regE=000.0000 |
12-Tot: E=013.6777 | simE=013.6777 | regE=000.0000 | optParE=000.0000 | relF=000.1011 |
12-Img: E=013.6777 | simE=013.6777 | regE=000.0000 |
13-Tot: E=010.3363 | simE=010.3363 | regE=000.0000 | optParE=000.0000 | relF=000.2947 |
13-Img: E=010.3363 | simE=010.3363 | regE=000.0000 |
14-Tot: E=008.9969 | simE=008.9969 | regE=000.0000 | optParE=000.0000 | relF=000.1340 |
14-Img: E=008.9969 | simE=008.9969 | regE=000.0000 |
15-Tot: E=007.8503 | simE=007.8503 | regE=000.0000 | optParE=000.0000 | relF=000.1296 |
15-Img: E=007.8503 | simE=007.8503 | regE=000.0000 |
16-Tot: E=007.8507 | simE=007.8507 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
16-Img: E=007.8507 | simE=007.8507 | regE=000.0000 |
17-Tot: E=022.9407 | simE=022.9407 | regE=000.0000 | optParE=000.0000 | relF=000.6303 |
17-Img: E=022.9407 | simE=022.9407 | regE=000.0000 |
18-Tot: E=017.6973 | simE=017.6973 | regE=000.0000 | optParE=000.0000 | relF=000.2804 |
18-Img: E=017.6973 | simE=017.6973 | regE=000.0000 |
19-Tot: E=019.8869 | simE=019.8869 | regE=000.0000 | optParE=000.0000 | relF=000.1048 |
19-Img: E=019.8869 | simE=019.8869 | regE=000.0000 |
20-Tot: E=011.6989 | simE=011.6989 | regE=000.0000 | optParE=000.0000 | relF=000.6448 |
20-Img: E=011.6989 | simE=011.6989 | regE=000.0000 |
21-Tot: E=014.3670 | simE=014.3670 | regE=000.0000 | optParE=000.0000 | relF=000.1736 |
21-Img: E=014.3670 | simE=014.3670 | regE=000.0000 |
22-Tot: E=017.1848 | simE=017.1848 | regE=000.0000 | optParE=000.0000 | relF=000.1550 |
22-Img: E=017.1848 | simE=017.1848 | regE=000.0000 |
23-Tot: E=012.2393 | simE=012.2393 | regE=000.0000 | optParE=000.0000 | relF=000.3735 |
23-Img: E=012.2393 | simE=012.2393 | regE=000.0000 |
24-Tot: E=013.8287 | simE=013.8287 | regE=000.0000 | optParE=000.0000 | relF=000.1072 |
24-Img: E=013.8287 | simE=013.8287 | regE=000.0000 |
25-Tot: E=014.4630 | simE=014.4630 | regE=000.0000 | optParE=000.0000 | relF=000.0410 |
25-Img: E=014.4630 | simE=014.4630 | regE=000.0000 |
Epoch 26: reducing learning rate of group 0 to 5.0000e-04.
Epoch 26: reducing learning rate of group 1 to 5.0000e-04.
26-Tot: E=011.0662 | simE=011.0662 | regE=000.0000 | optParE=000.0000 | relF=000.2815 |
26-Img: E=011.0662 | simE=011.0662 | regE=000.0000 |
27-Tot: E=012.9243 | simE=012.9243 | regE=000.0000 | optParE=000.0000 | relF=000.1334 |
27-Img: E=012.9243 | simE=012.9243 | regE=000.0000 |
28-Tot: E=011.4257 | simE=011.4257 | regE=000.0000 | optParE=000.0000 | relF=000.1206 |
28-Img: E=011.4257 | simE=011.4257 | regE=000.0000 |
29-Tot: E=011.3729 | simE=011.3729 | regE=000.0000 | optParE=000.0000 | relF=000.0043 |
29-Img: E=011.3729 | simE=011.3729 | regE=000.0000 |
30-Tot: E=011.2301 | simE=011.2301 | regE=000.0000 | optParE=000.0000 | relF=000.0117 |
30-Img: E=011.2301 | simE=011.2301 | regE=000.0000 |
31-Tot: E=010.9019 | simE=010.9019 | regE=000.0000 | optParE=000.0000 | relF=000.0276 |
31-Img: E=010.9019 | simE=010.9019 | regE=000.0000 |
32-Tot: E=010.4260 | simE=010.4260 | regE=000.0000 | optParE=000.0000 | relF=000.0417 |
32-Img: E=010.4260 | simE=010.4260 | regE=000.0000 |
33-Tot: E=009.7560 | simE=009.7560 | regE=000.0000 | optParE=000.0000 | relF=000.0623 |
33-Img: E=009.7560 | simE=009.7560 | regE=000.0000 |
34-Tot: E=009.0476 | simE=009.0476 | regE=000.0000 | optParE=000.0000 | relF=000.0705 |
34-Img: E=009.0476 | simE=009.0476 | regE=000.0000 |
35-Tot: E=008.2595 | simE=008.2595 | regE=000.0000 | optParE=000.0000 | relF=000.0851 |
35-Img: E=008.2595 | simE=008.2595 | regE=000.0000 |
36-Tot: E=007.1774 | simE=007.1774 | regE=000.0000 | optParE=000.0000 | relF=000.1323 |
36-Img: E=007.1774 | simE=007.1774 | regE=000.0000 |
37-Tot: E=006.0097 | simE=006.0097 | regE=000.0000 | optParE=000.0000 | relF=000.1666 |
37-Img: E=006.0097 | simE=006.0097 | regE=000.0000 |
38-Tot: E=007.3250 | simE=007.3250 | regE=000.0000 | optParE=000.0000 | relF=000.1580 |
38-Img: E=007.3250 | simE=007.3250 | regE=000.0000 |
39-Tot: E=015.7316 | simE=015.7316 | regE=000.0000 | optParE=000.0000 | relF=000.5024 |
39-Img: E=015.7316 | simE=015.7316 | regE=000.0000 |
40-Tot: E=013.5287 | simE=013.5287 | regE=000.0000 | optParE=000.0000 | relF=000.1516 |
40-Img: E=013.5287 | simE=013.5287 | regE=000.0000 |
41-Tot: E=008.9899 | simE=008.9899 | regE=000.0000 | optParE=000.0000 | relF=000.4543 |
41-Img: E=008.9899 | simE=008.9899 | regE=000.0000 |
42-Tot: E=019.7038 | simE=019.7038 | regE=000.0000 | optParE=000.0000 | relF=000.5175 |
42-Img: E=019.7038 | simE=019.7038 | regE=000.0000 |
43-Tot: E=007.0539 | simE=007.0539 | regE=000.0000 | optParE=000.0000 | relF=001.5707 |
43-Img: E=007.0539 | simE=007.0539 | regE=000.0000 |
44-Tot: E=025.5353 | simE=025.5353 | regE=000.0000 | optParE=000.0000 | relF=000.6965 |
44-Img: E=025.5353 | simE=025.5353 | regE=000.0000 |
45-Tot: E=018.4514 | simE=018.4514 | regE=000.0000 | optParE=000.0000 | relF=000.3642 |
45-Img: E=018.4514 | simE=018.4514 | regE=000.0000 |
46-Tot: E=014.4022 | simE=014.4022 | regE=000.0000 | optParE=000.0000 | relF=000.2629 |
46-Img: E=014.4022 | simE=014.4022 | regE=000.0000 |
47-Tot: E=006.9669 | simE=006.9669 | regE=000.0000 | optParE=000.0000 | relF=000.9333 |
47-Img: E=006.9669 | simE=006.9669 | regE=000.0000 |
Epoch 48: reducing learning rate of group 0 to 2.5000e-04.
Epoch 48: reducing learning rate of group 1 to 2.5000e-04.
48-Tot: E=024.7832 | simE=024.7832 | regE=000.0000 | optParE=000.0000 | relF=000.6910 |
48-Img: E=024.7832 | simE=024.7832 | regE=000.0000 |
49-Tot: E=019.5329 | simE=019.5329 | regE=000.0000 | optParE=000.0000 | relF=000.2557 |
49-Img: E=019.5329 | simE=019.5329 | regE=000.0000 |
50-Tot: E=011.5676 | simE=011.5676 | regE=000.0000 | optParE=000.0000 | relF=000.6338 |
50-Img: E=011.5676 | simE=011.5676 | regE=000.0000 |
51-Tot: E=005.9451 | simE=005.9451 | regE=000.0000 | optParE=000.0000 | relF=000.8096 |
51-Img: E=005.9451 | simE=005.9451 | regE=000.0000 |
52-Tot: E=007.5563 | simE=007.5563 | regE=000.0000 | optParE=000.0000 | relF=000.1883 |
52-Img: E=007.5563 | simE=007.5563 | regE=000.0000 |
53-Tot: E=006.3398 | simE=006.3398 | regE=000.0000 | optParE=000.0000 | relF=000.1657 |
53-Img: E=006.3398 | simE=006.3398 | regE=000.0000 |
54-Tot: E=006.4094 | simE=006.4094 | regE=000.0000 | optParE=000.0000 | relF=000.0094 |
54-Img: E=006.4094 | simE=006.4094 | regE=000.0000 |
55-Tot: E=006.1746 | simE=006.1746 | regE=000.0000 | optParE=000.0000 | relF=000.0327 |
55-Img: E=006.1746 | simE=006.1746 | regE=000.0000 |
56-Tot: E=005.8178 | simE=005.8178 | regE=000.0000 | optParE=000.0000 | relF=000.0523 |
56-Img: E=005.8178 | simE=005.8178 | regE=000.0000 |
57-Tot: E=005.2904 | simE=005.2904 | regE=000.0000 | optParE=000.0000 | relF=000.0839 |
57-Img: E=005.2904 | simE=005.2904 | regE=000.0000 |
58-Tot: E=006.2699 | simE=006.2699 | regE=000.0000 | optParE=000.0000 | relF=000.1347 |
58-Img: E=006.2699 | simE=006.2699 | regE=000.0000 |
59-Tot: E=004.5827 | simE=004.5827 | regE=000.0000 | optParE=000.0000 | relF=000.3022 |
59-Img: E=004.5827 | simE=004.5827 | regE=000.0000 |
60-Tot: E=006.7536 | simE=006.7536 | regE=000.0000 | optParE=000.0000 | relF=000.2800 |
60-Img: E=006.7536 | simE=006.7536 | regE=000.0000 |
61-Tot: E=004.3073 | simE=004.3073 | regE=000.0000 | optParE=000.0000 | relF=000.4609 |
61-Img: E=004.3073 | simE=004.3073 | regE=000.0000 |
62-Tot: E=009.1613 | simE=009.1613 | regE=000.0000 | optParE=000.0000 | relF=000.4777 |
62-Img: E=009.1613 | simE=009.1613 | regE=000.0000 |
63-Tot: E=007.1950 | simE=007.1950 | regE=000.0000 | optParE=000.0000 | relF=000.2399 |
63-Img: E=007.1950 | simE=007.1950 | regE=000.0000 |
64-Tot: E=006.4788 | simE=006.4788 | regE=000.0000 | optParE=000.0000 | relF=000.0958 |
64-Img: E=006.4788 | simE=006.4788 | regE=000.0000 |
65-Tot: E=007.3137 | simE=007.3137 | regE=000.0000 | optParE=000.0000 | relF=000.1004 |
65-Img: E=007.3137 | simE=007.3137 | regE=000.0000 |
66-Tot: E=007.6215 | simE=007.6215 | regE=000.0000 | optParE=000.0000 | relF=000.0357 |
66-Img: E=007.6215 | simE=007.6215 | regE=000.0000 |
67-Tot: E=008.2021 | simE=008.2021 | regE=000.0000 | optParE=000.0000 | relF=000.0631 |
67-Img: E=008.2021 | simE=008.2021 | regE=000.0000 |
68-Tot: E=007.0299 | simE=007.0299 | regE=000.0000 | optParE=000.0000 | relF=000.1460 |
68-Img: E=007.0299 | simE=007.0299 | regE=000.0000 |
69-Tot: E=007.6136 | simE=007.6136 | regE=000.0000 | optParE=000.0000 | relF=000.0678 |
69-Img: E=007.6136 | simE=007.6136 | regE=000.0000 |
70-Tot: E=006.5765 | simE=006.5765 | regE=000.0000 | optParE=000.0000 | relF=000.1369 |
70-Img: E=006.5765 | simE=006.5765 | regE=000.0000 |
71-Tot: E=009.2278 | simE=009.2278 | regE=000.0000 | optParE=000.0000 | relF=000.2592 |
71-Img: E=009.2278 | simE=009.2278 | regE=000.0000 |
72-Tot: E=003.1484 | simE=003.1484 | regE=000.0000 | optParE=000.0000 | relF=001.4654 |
72-Img: E=003.1484 | simE=003.1484 | regE=000.0000 |
73-Tot: E=014.2395 | simE=014.2395 | regE=000.0000 | optParE=000.0000 | relF=000.7278 |
73-Img: E=014.2395 | simE=014.2395 | regE=000.0000 |
74-Tot: E=005.3620 | simE=005.3620 | regE=000.0000 | optParE=000.0000 | relF=001.3954 |
74-Img: E=005.3620 | simE=005.3620 | regE=000.0000 |
75-Tot: E=011.2567 | simE=011.2567 | regE=000.0000 | optParE=000.0000 | relF=000.4809 |
75-Img: E=011.2567 | simE=011.2567 | regE=000.0000 |
76-Tot: E=003.9892 | simE=003.9892 | regE=000.0000 | optParE=000.0000 | relF=001.4566 |
76-Img: E=003.9892 | simE=003.9892 | regE=000.0000 |
77-Tot: E=010.5021 | simE=010.5021 | regE=000.0000 | optParE=000.0000 | relF=000.5662 |
77-Img: E=010.5021 | simE=010.5021 | regE=000.0000 |
78-Tot: E=005.7813 | simE=005.7813 | regE=000.0000 | optParE=000.0000 | relF=000.6961 |
78-Img: E=005.7813 | simE=005.7813 | regE=000.0000 |
79-Tot: E=004.6732 | simE=004.6732 | regE=000.0000 | optParE=000.0000 | relF=000.1953 |
79-Img: E=004.6732 | simE=004.6732 | regE=000.0000 |
80-Tot: E=005.9160 | simE=005.9160 | regE=000.0000 | optParE=000.0000 | relF=000.1797 |
80-Img: E=005.9160 | simE=005.9160 | regE=000.0000 |
81-Tot: E=004.5572 | simE=004.5572 | regE=000.0000 | optParE=000.0000 | relF=000.2445 |
81-Img: E=004.5572 | simE=004.5572 | regE=000.0000 |
82-Tot: E=008.2272 | simE=008.2272 | regE=000.0000 | optParE=000.0000 | relF=000.3977 |
82-Img: E=008.2272 | simE=008.2272 | regE=000.0000 |
Epoch 83: reducing learning rate of group 0 to 1.2500e-04.
Epoch 83: reducing learning rate of group 1 to 1.2500e-04.
83-Tot: E=005.4178 | simE=005.4178 | regE=000.0000 | optParE=000.0000 | relF=000.4378 |
83-Img: E=005.4178 | simE=005.4178 | regE=000.0000 |
84-Tot: E=005.8283 | simE=005.8283 | regE=000.0000 | optParE=000.0000 | relF=000.0601 |
84-Img: E=005.8283 | simE=005.8283 | regE=000.0000 |
85-Tot: E=003.9225 | simE=003.9225 | regE=000.0000 | optParE=000.0000 | relF=000.3872 |
85-Img: E=003.9225 | simE=003.9225 | regE=000.0000 |
86-Tot: E=005.1337 | simE=005.1337 | regE=000.0000 | optParE=000.0000 | relF=000.1975 |
86-Img: E=005.1337 | simE=005.1337 | regE=000.0000 |
87-Tot: E=004.1200 | simE=004.1200 | regE=000.0000 | optParE=000.0000 | relF=000.1980 |
87-Img: E=004.1200 | simE=004.1200 | regE=000.0000 |
88-Tot: E=004.1852 | simE=004.1852 | regE=000.0000 | optParE=000.0000 | relF=000.0126 |
88-Img: E=004.1852 | simE=004.1852 | regE=000.0000 |
89-Tot: E=003.5298 | simE=003.5298 | regE=000.0000 | optParE=000.0000 | relF=000.1447 |
89-Img: E=003.5298 | simE=003.5298 | regE=000.0000 |
90-Tot: E=003.5741 | simE=003.5741 | regE=000.0000 | optParE=000.0000 | relF=000.0097 |
90-Img: E=003.5741 | simE=003.5741 | regE=000.0000 |
91-Tot: E=004.6154 | simE=004.6154 | regE=000.0000 | optParE=000.0000 | relF=000.1854 |
91-Img: E=004.6154 | simE=004.6154 | regE=000.0000 |
92-Tot: E=002.2712 | simE=002.2712 | regE=000.0000 | optParE=000.0000 | relF=000.7166 |
92-Img: E=002.2712 | simE=002.2712 | regE=000.0000 |
93-Tot: E=001.9037 | simE=001.9037 | regE=000.0000 | optParE=000.0000 | relF=000.1266 |
93-Img: E=001.9037 | simE=001.9037 | regE=000.0000 |
94-Tot: E=002.2968 | simE=002.2968 | regE=000.0000 | optParE=000.0000 | relF=000.1192 |
94-Img: E=002.2968 | simE=002.2968 | regE=000.0000 |
95-Tot: E=006.1827 | simE=006.1827 | regE=000.0000 | optParE=000.0000 | relF=000.5410 |
95-Img: E=006.1827 | simE=006.1827 | regE=000.0000 |
96-Tot: E=004.3438 | simE=004.3438 | regE=000.0000 | optParE=000.0000 | relF=000.3441 |
96-Img: E=004.3438 | simE=004.3438 | regE=000.0000 |
97-Tot: E=005.0088 | simE=005.0088 | regE=000.0000 | optParE=000.0000 | relF=000.1107 |
97-Img: E=005.0088 | simE=005.0088 | regE=000.0000 |
98-Tot: E=005.5938 | simE=005.5938 | regE=000.0000 | optParE=000.0000 | relF=000.0887 |
98-Img: E=005.5938 | simE=005.5938 | regE=000.0000 |
99-Tot: E=002.5876 | simE=002.5876 | regE=000.0000 | optParE=000.0000 | relF=000.8380 |
99-Img: E=002.5876 | simE=002.5876 | regE=000.0000 |
100-Tot: E=003.6892 | simE=003.6892 | regE=000.0000 | optParE=000.0000 | relF=000.2349 |
100-Img: E=003.6892 | simE=003.6892 | regE=000.0000 |
101-Tot: E=003.7319 | simE=003.7319 | regE=000.0000 | optParE=000.0000 | relF=000.0090 |
101-Img: E=003.7319 | simE=003.7319 | regE=000.0000 |
102-Tot: E=003.5575 | simE=003.5575 | regE=000.0000 | optParE=000.0000 | relF=000.0383 |
102-Img: E=003.5575 | simE=003.5575 | regE=000.0000 |
103-Tot: E=003.6540 | simE=003.6540 | regE=000.0000 | optParE=000.0000 | relF=000.0207 |
103-Img: E=003.6540 | simE=003.6540 | regE=000.0000 |
Epoch 104: reducing learning rate of group 0 to 6.2500e-05.
Epoch 104: reducing learning rate of group 1 to 6.2500e-05.
104-Tot: E=003.2122 | simE=003.2122 | regE=000.0000 | optParE=000.0000 | relF=000.1049 |
104-Img: E=003.2122 | simE=003.2122 | regE=000.0000 |
105-Tot: E=004.2998 | simE=004.2998 | regE=000.0000 | optParE=000.0000 | relF=000.2052 |
105-Img: E=004.2998 | simE=004.2998 | regE=000.0000 |
106-Tot: E=001.2616 | simE=001.2616 | regE=000.0000 | optParE=000.0000 | relF=001.3434 |
106-Img: E=001.2616 | simE=001.2616 | regE=000.0000 |
107-Tot: E=001.6095 | simE=001.6095 | regE=000.0000 | optParE=000.0000 | relF=000.1333 |
107-Img: E=001.6095 | simE=001.6095 | regE=000.0000 |
108-Tot: E=001.1994 | simE=001.1994 | regE=000.0000 | optParE=000.0000 | relF=000.1864 |
108-Img: E=001.1994 | simE=001.1994 | regE=000.0000 |
109-Tot: E=001.2216 | simE=001.2216 | regE=000.0000 | optParE=000.0000 | relF=000.0100 |
109-Img: E=001.2216 | simE=001.2216 | regE=000.0000 |
110-Tot: E=001.3448 | simE=001.3448 | regE=000.0000 | optParE=000.0000 | relF=000.0525 |
110-Img: E=001.3448 | simE=001.3448 | regE=000.0000 |
111-Tot: E=001.4939 | simE=001.4939 | regE=000.0000 | optParE=000.0000 | relF=000.0598 |
111-Img: E=001.4939 | simE=001.4939 | regE=000.0000 |
112-Tot: E=000.8310 | simE=000.8310 | regE=000.0000 | optParE=000.0000 | relF=000.3621 |
112-Img: E=000.8310 | simE=000.8310 | regE=000.0000 |
113-Tot: E=000.8712 | simE=000.8712 | regE=000.0000 | optParE=000.0000 | relF=000.0215 |
113-Img: E=000.8712 | simE=000.8712 | regE=000.0000 |
114-Tot: E=001.0961 | simE=001.0961 | regE=000.0000 | optParE=000.0000 | relF=000.1073 |
114-Img: E=001.0961 | simE=001.0961 | regE=000.0000 |
115-Tot: E=001.2494 | simE=001.2494 | regE=000.0000 | optParE=000.0000 | relF=000.0682 |
115-Img: E=001.2494 | simE=001.2494 | regE=000.0000 |
116-Tot: E=001.5184 | simE=001.5184 | regE=000.0000 | optParE=000.0000 | relF=000.1068 |
116-Img: E=001.5184 | simE=001.5184 | regE=000.0000 |
117-Tot: E=002.0468 | simE=002.0468 | regE=000.0000 | optParE=000.0000 | relF=000.1734 |
117-Img: E=002.0468 | simE=002.0468 | regE=000.0000 |
118-Tot: E=002.8258 | simE=002.8258 | regE=000.0000 | optParE=000.0000 | relF=000.2036 |
118-Img: E=002.8258 | simE=002.8258 | regE=000.0000 |
119-Tot: E=000.9048 | simE=000.9048 | regE=000.0000 | optParE=000.0000 | relF=001.0085 |
119-Img: E=000.9048 | simE=000.9048 | regE=000.0000 |
120-Tot: E=000.8803 | simE=000.8803 | regE=000.0000 | optParE=000.0000 | relF=000.0130 |
120-Img: E=000.8803 | simE=000.8803 | regE=000.0000 |
121-Tot: E=001.1421 | simE=001.1421 | regE=000.0000 | optParE=000.0000 | relF=000.1222 |
121-Img: E=001.1421 | simE=001.1421 | regE=000.0000 |
122-Tot: E=001.2982 | simE=001.2982 | regE=000.0000 | optParE=000.0000 | relF=000.0679 |
122-Img: E=001.2982 | simE=001.2982 | regE=000.0000 |
Epoch 123: reducing learning rate of group 0 to 3.1250e-05.
Epoch 123: reducing learning rate of group 1 to 3.1250e-05.
123-Tot: E=001.7958 | simE=001.7958 | regE=000.0000 | optParE=000.0000 | relF=000.1780 |
123-Img: E=001.7958 | simE=001.7958 | regE=000.0000 |
124-Tot: E=002.4916 | simE=002.4916 | regE=000.0000 | optParE=000.0000 | relF=000.1993 |
124-Img: E=002.4916 | simE=002.4916 | regE=000.0000 |
125-Tot: E=000.7670 | simE=000.7670 | regE=000.0000 | optParE=000.0000 | relF=000.9760 |
125-Img: E=000.7670 | simE=000.7670 | regE=000.0000 |
126-Tot: E=000.8301 | simE=000.8301 | regE=000.0000 | optParE=000.0000 | relF=000.0345 |
126-Img: E=000.8301 | simE=000.8301 | regE=000.0000 |
127-Tot: E=000.6840 | simE=000.6840 | regE=000.0000 | optParE=000.0000 | relF=000.0868 |
127-Img: E=000.6840 | simE=000.6840 | regE=000.0000 |
128-Tot: E=000.6126 | simE=000.6126 | regE=000.0000 | optParE=000.0000 | relF=000.0443 |
128-Img: E=000.6126 | simE=000.6126 | regE=000.0000 |
129-Tot: E=000.6030 | simE=000.6030 | regE=000.0000 | optParE=000.0000 | relF=000.0060 |
129-Img: E=000.6030 | simE=000.6030 | regE=000.0000 |
130-Tot: E=000.5925 | simE=000.5925 | regE=000.0000 | optParE=000.0000 | relF=000.0066 |
130-Img: E=000.5925 | simE=000.5925 | regE=000.0000 |
131-Tot: E=000.5859 | simE=000.5859 | regE=000.0000 | optParE=000.0000 | relF=000.0042 |
131-Img: E=000.5859 | simE=000.5859 | regE=000.0000 |
132-Tot: E=000.5814 | simE=000.5814 | regE=000.0000 | optParE=000.0000 | relF=000.0028 |
132-Img: E=000.5814 | simE=000.5814 | regE=000.0000 |
133-Tot: E=000.5789 | simE=000.5789 | regE=000.0000 | optParE=000.0000 | relF=000.0016 |
133-Img: E=000.5789 | simE=000.5789 | regE=000.0000 |
134-Tot: E=000.5780 | simE=000.5780 | regE=000.0000 | optParE=000.0000 | relF=000.0006 |
134-Img: E=000.5780 | simE=000.5780 | regE=000.0000 |
135-Tot: E=000.5785 | simE=000.5785 | regE=000.0000 | optParE=000.0000 | relF=000.0003 |
135-Img: E=000.5785 | simE=000.5785 | regE=000.0000 |
136-Tot: E=000.5797 | simE=000.5797 | regE=000.0000 | optParE=000.0000 | relF=000.0008 |
136-Img: E=000.5797 | simE=000.5797 | regE=000.0000 |
137-Tot: E=000.5813 | simE=000.5813 | regE=000.0000 | optParE=000.0000 | relF=000.0010 |
137-Img: E=000.5813 | simE=000.5813 | regE=000.0000 |
138-Tot: E=000.5826 | simE=000.5826 | regE=000.0000 | optParE=000.0000 | relF=000.0009 |
138-Img: E=000.5826 | simE=000.5826 | regE=000.0000 |
139-Tot: E=000.5836 | simE=000.5836 | regE=000.0000 | optParE=000.0000 | relF=000.0006 |
139-Img: E=000.5836 | simE=000.5836 | regE=000.0000 |
140-Tot: E=000.5840 | simE=000.5840 | regE=000.0000 | optParE=000.0000 | relF=000.0003 |
140-Img: E=000.5840 | simE=000.5840 | regE=000.0000 |
141-Tot: E=000.5839 | simE=000.5839 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
141-Img: E=000.5839 | simE=000.5839 | regE=000.0000 |
142-Tot: E=000.5835 | simE=000.5835 | regE=000.0000 | optParE=000.0000 | relF=000.0003 |
142-Img: E=000.5835 | simE=000.5835 | regE=000.0000 |
143-Tot: E=000.5826 | simE=000.5826 | regE=000.0000 | optParE=000.0000 | relF=000.0005 |
143-Img: E=000.5826 | simE=000.5826 | regE=000.0000 |
144-Tot: E=000.5816 | simE=000.5816 | regE=000.0000 | optParE=000.0000 | relF=000.0007 |
144-Img: E=000.5816 | simE=000.5816 | regE=000.0000 |
Epoch 145: reducing learning rate of group 0 to 1.5625e-05.
Epoch 145: reducing learning rate of group 1 to 1.5625e-05.
145-Tot: E=000.5803 | simE=000.5803 | regE=000.0000 | optParE=000.0000 | relF=000.0008 |
145-Img: E=000.5803 | simE=000.5803 | regE=000.0000 |
146-Tot: E=000.5791 | simE=000.5791 | regE=000.0000 | optParE=000.0000 | relF=000.0007 |
146-Img: E=000.5791 | simE=000.5791 | regE=000.0000 |
147-Tot: E=000.5786 | simE=000.5786 | regE=000.0000 | optParE=000.0000 | relF=000.0003 |
147-Img: E=000.5786 | simE=000.5786 | regE=000.0000 |
148-Tot: E=000.5781 | simE=000.5781 | regE=000.0000 | optParE=000.0000 | relF=000.0003 |
148-Img: E=000.5781 | simE=000.5781 | regE=000.0000 |
149-Tot: E=000.5777 | simE=000.5777 | regE=000.0000 | optParE=000.0000 | relF=000.0003 |
149-Img: E=000.5777 | simE=000.5777 | regE=000.0000 |
150-Tot: E=000.5773 | simE=000.5773 | regE=000.0000 | optParE=000.0000 | relF=000.0002 |
150-Img: E=000.5773 | simE=000.5773 | regE=000.0000 |
151-Tot: E=000.5770 | simE=000.5770 | regE=000.0000 | optParE=000.0000 | relF=000.0002 |
151-Img: E=000.5770 | simE=000.5770 | regE=000.0000 |
152-Tot: E=000.5768 | simE=000.5768 | regE=000.0000 | optParE=000.0000 | relF=000.0001 |
152-Img: E=000.5768 | simE=000.5768 | regE=000.0000 |
153-Tot: E=000.5766 | simE=000.5766 | regE=000.0000 | optParE=000.0000 | relF=000.0001 |
153-Img: E=000.5766 | simE=000.5766 | regE=000.0000 |
154-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0001 |
154-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
155-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
155-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
156-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
156-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
157-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
157-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
158-Tot: E=000.5766 | simE=000.5766 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
158-Img: E=000.5766 | simE=000.5766 | regE=000.0000 |
159-Tot: E=000.5766 | simE=000.5766 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
159-Img: E=000.5766 | simE=000.5766 | regE=000.0000 |
160-Tot: E=000.5766 | simE=000.5766 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
160-Img: E=000.5766 | simE=000.5766 | regE=000.0000 |
161-Tot: E=000.5767 | simE=000.5767 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
161-Img: E=000.5767 | simE=000.5767 | regE=000.0000 |
162-Tot: E=000.5767 | simE=000.5767 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
162-Img: E=000.5767 | simE=000.5767 | regE=000.0000 |
163-Tot: E=000.5767 | simE=000.5767 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
163-Img: E=000.5767 | simE=000.5767 | regE=000.0000 |
164-Tot: E=000.5767 | simE=000.5767 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
164-Img: E=000.5767 | simE=000.5767 | regE=000.0000 |
Epoch 165: reducing learning rate of group 0 to 7.8125e-06.
Epoch 165: reducing learning rate of group 1 to 7.8125e-06.
165-Tot: E=000.5767 | simE=000.5767 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
165-Img: E=000.5767 | simE=000.5767 | regE=000.0000 |
166-Tot: E=000.5767 | simE=000.5767 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
166-Img: E=000.5767 | simE=000.5767 | regE=000.0000 |
167-Tot: E=000.5767 | simE=000.5767 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
167-Img: E=000.5767 | simE=000.5767 | regE=000.0000 |
168-Tot: E=000.5766 | simE=000.5766 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
168-Img: E=000.5766 | simE=000.5766 | regE=000.0000 |
169-Tot: E=000.5766 | simE=000.5766 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
169-Img: E=000.5766 | simE=000.5766 | regE=000.0000 |
170-Tot: E=000.5766 | simE=000.5766 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
170-Img: E=000.5766 | simE=000.5766 | regE=000.0000 |
171-Tot: E=000.5766 | simE=000.5766 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
171-Img: E=000.5766 | simE=000.5766 | regE=000.0000 |
172-Tot: E=000.5766 | simE=000.5766 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
172-Img: E=000.5766 | simE=000.5766 | regE=000.0000 |
173-Tot: E=000.5766 | simE=000.5766 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
173-Img: E=000.5766 | simE=000.5766 | regE=000.0000 |
174-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
174-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
175-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
175-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
Epoch 176: reducing learning rate of group 0 to 3.9063e-06.
Epoch 176: reducing learning rate of group 1 to 3.9063e-06.
176-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
176-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
177-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
177-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
178-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
178-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
179-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
179-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
180-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
180-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
181-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
181-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
182-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
182-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
183-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
183-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
184-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
184-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
185-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
185-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
186-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
186-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
187-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
187-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
188-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
188-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
189-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
189-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
190-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
190-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
191-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
191-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
192-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
192-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
193-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
193-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
Epoch 194: reducing learning rate of group 0 to 1.9531e-06.
Epoch 194: reducing learning rate of group 1 to 1.9531e-06.
194-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
194-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
195-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
195-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
196-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
196-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
197-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
197-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
198-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
198-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
199-Tot: E=000.5765 | simE=000.5765 | regE=000.0000 | optParE=000.0000 | relF=000.0000 |
199-Img: E=000.5765 | simE=000.5765 | regE=000.0000 |
-->Elapsed time 0.49161[s]
Writing parameter file = test2d_tst.json
Writing parameter file = test2d_tst_with_comments.json
We now fetch our registration history to access all intermediate results.
[13]:
h = si.get_history()
First, we plot the source/target as well as the warped result. For this, we simply access the last optimization iteration and collect the source/target and warped image which are stored in h['recording'][-1]
and can be accessed via the keys iS
, iT
and iW
.
[14]:
plt.figure(figsize=(15,5))
plt.subplot(131); show_image(h['recording'][-1]['iS'], 'Source image')
plt.subplot(132); show_image(h['recording'][-1]['iT'], 'Target image')
plt.subplot(133); show_image(h['recording'][-1]['iW'], 'Warped image')

We can also show a simple checkerboard plot using mermaid.visualize_registration_results.checkerboard_2d
as follows:
[15]:
from mermaid.visualize_registration_results import checkerboard_2d
iT = h['recording'][-1]['iT'][0,0,:,:]
iW = h['recording'][-1]['iW'][0,0,:,:]
cb_img = checkerboard_2d(iT,iW)
plt.imshow(cb_img ,cmap='gray')
plt.axis('off')
plt.title('Checkerboard (Target vs. Warped)');

It’s also quite simple to plot the corresponding deformation grid (i.e., at the final optimization iteration) as follows:
[16]:
def show_warped_with_grid(I, phi, title):
plt.imshow(I[0,0,:,:] ,cmap='gray')
plt.contour(phi[0, 0, :, :],
np.linspace(-1, 1, 20),
colors='r',
linestyles='solid',
linewidths=0.5)
plt.contour(phi[0, 1, :, :],
np.linspace(-1, 1, 20),
colors='r',
linestyles='solid',
linewidths=0.5)
[17]:
i = 130
plt.figure(figsize=(10,5))
plt.subplot(121); show_warped_with_grid(h['recording'][i]['iW'],
h['recording'][i]['phiWarped'],
'Deformation (at iteration {})'.format(i))
plt.subplot(122); show_warped_with_grid(h['recording'][-1]['iW'],
h['recording'][-1]['phiWarped'],
'Deformation (at convergence)')

Additionally, lets show the energy terms over the optimization iterations …
[18]:
e_p, = plt.plot(h['energy'], label='energy')
s_p, = plt.plot(h['similarity_energy'], label='similarity_energy')
r_p, = plt.plot(h['regularization_energy'], label='regularization_energy')
plt.legend(handles=[e_p,s_p,r_p])
plt.show()

Using mermaids visualization¶
[19]:
import torch
import mermaid.utils as utils
import mermaid.visualize_registration_results as vizreg
I_0 = torch.from_numpy(I0_syn)
I_1 = torch.from_numpy(I1_syn)
phi = si.get_map()
I_W = utils.compute_warped_image_multiNC(I_0,
phi,
spacing_syn,
spline_order=1)
vizreg.show_current_images(len(si.get_history()['energy']),
I_0,
I_1,
I_W,
phiWarped=phi)

<Figure size 432x288 with 0 Axes>
SVF scalar momentum¶
Now lets switch the model to a stationary velocity field (SVF) with a scalar momentum parametrization.
[20]:
si.register_images(I0_syn, I1_syn, spacing_syn, model_name='svf_scalar_momentum_map',
nr_of_iterations=50,
use_multi_scale=False,
visualize_step=None,
optimizer_name='sgd',
learning_rate=0.01,
rel_ftol=1e-7,
json_config_out_filename=('test2d_tst.json', 'test2d_tst_with_comments.json'),
params='test2d_tst.json',
recording_step=1)
h = si.get_history()
Loading parameter file = test2d_tst.json
Overwriting key = use_map; category = root.model.deformation; value = True -> True
Overwriting key = type; category = root.model.registration_model; value = affine_map -> svf_scalar_momentum_map
Overwriting key = name; category = root.optimizer; value = sgd -> sgd
Overwriting key = nr_of_iterations; category = root.optimizer.single_scale; value = 200 -> 50
Overwriting key = rel_ftol; category = root.optimizer.single_scale; value = 1e-07 -> 1e-07
mapLowResFactor = 1: performing computations at original resolution.
Overwriting key = use_map; category = root.model.deformation; value = True -> True
Overwriting key = map_low_res_factor; category = root.model.deformation; value = 1.0 -> 1.0
Overwriting key = type; category = root.model.registration_model; value = svf_scalar_momentum_map -> svf_scalar_momentum_map
Overwriting key = type; category = root.model.registration_model; value = svf_scalar_momentum_map -> svf_scalar_momentum_map
Using map-based svf_scalar_momentum_map model
Using default value = True for key = use_CFL_clamping of category = root.model.registration_model
Using default value = True for key = use_odeint of category = root.model.registration_model.env
Creating new category: root.model.registration_model.forward_model
Creating new category: root.model.registration_model.forward_model.smoother
Using default value = multiGaussian for key = type of category = root.model.registration_model.forward_model.smoother
Using default value = [0.05, 0.1, 0.15, 0.2, 0.25] for key = multi_gaussian_stds of category = root.model.registration_model.forward_model.smoother
Using default value = [0.06666666666666667, 0.13333333333333333, 0.19999999999999998, 0.26666666666666666, 0.3333333333333333] for key = multi_gaussian_weights of category = root.model.registration_model.forward_model.smoother
Using default value = rk4 for key = solver of category = root.model.registration_model.forward_model
Using default value = True for key = adjoin_on of category = root.model.registration_model.forward_model
Using default value = 1e-05 for key = rtol of category = root.model.registration_model.forward_model
Using default value = 1e-05 for key = atol of category = root.model.registration_model.forward_model
Using default value = 20 for key = number_of_time_steps of category = root.model.registration_model.forward_model
works in mermaid iter mode
Using default value = False for key = develop_mod_on of category = root.model.registration_model.similarity_measure
SVFScalarMomentumMapNet(
(integrator): ODEBlock()
)
Overwriting key = lr; category = root.optimizer.sgd.individual; value = 0.001 -> 0.01
Overwriting key = lr; category = root.optimizer.sgd.shared; value = 0.001 -> 0.01
Using ssd similarity measure
0-Tot: E=013.2236 | simE=013.2236 | regE=000.0000 | optParE=000.0000 | relF= n/a |
0-Img: E=013.2236 | simE=013.2236 | regE=000.0000 |
1-Tot: E=010.7812 | simE=010.7795 | regE=000.0017 | optParE=000.0000 | relF=000.2073 |
1-Img: E=010.7812 | simE=010.7795 | regE=000.0017 |
2-Tot: E=008.2245 | simE=008.2192 | regE=000.0053 | optParE=000.0000 | relF=000.2772 |
2-Img: E=008.2245 | simE=008.2192 | regE=000.0053 |
3-Tot: E=005.4371 | simE=005.4287 | regE=000.0084 | optParE=000.0000 | relF=000.4330 |
3-Img: E=005.4371 | simE=005.4287 | regE=000.0084 |
4-Tot: E=002.8132 | simE=002.7993 | regE=000.0138 | optParE=000.0000 | relF=000.6881 |
4-Img: E=002.8132 | simE=002.7993 | regE=000.0138 |
5-Tot: E=003.3459 | simE=003.3275 | regE=000.0184 | optParE=000.0000 | relF=000.1226 |
5-Img: E=003.3459 | simE=003.3275 | regE=000.0184 |
6-Tot: E=004.0146 | simE=003.9933 | regE=000.0213 | optParE=000.0000 | relF=000.1333 |
6-Img: E=004.0146 | simE=003.9933 | regE=000.0213 |
7-Tot: E=004.1425 | simE=004.1206 | regE=000.0219 | optParE=000.0000 | relF=000.0249 |
7-Img: E=004.1425 | simE=004.1206 | regE=000.0219 |
8-Tot: E=004.0319 | simE=004.0107 | regE=000.0212 | optParE=000.0000 | relF=000.0220 |
8-Img: E=004.0319 | simE=004.0107 | regE=000.0212 |
9-Tot: E=003.2384 | simE=003.2193 | regE=000.0190 | optParE=000.0000 | relF=000.1872 |
9-Img: E=003.2384 | simE=003.2193 | regE=000.0190 |
10-Tot: E=002.7957 | simE=002.7797 | regE=000.0160 | optParE=000.0000 | relF=000.1166 |
10-Img: E=002.7957 | simE=002.7797 | regE=000.0160 |
11-Tot: E=002.2485 | simE=002.2353 | regE=000.0131 | optParE=000.0000 | relF=000.1685 |
11-Img: E=002.2485 | simE=002.2353 | regE=000.0131 |
12-Tot: E=001.7732 | simE=001.7612 | regE=000.0119 | optParE=000.0000 | relF=000.1714 |
12-Img: E=001.7732 | simE=001.7612 | regE=000.0119 |
13-Tot: E=002.1557 | simE=002.1453 | regE=000.0103 | optParE=000.0000 | relF=000.1212 |
13-Img: E=002.1557 | simE=002.1453 | regE=000.0103 |
14-Tot: E=002.4819 | simE=002.4723 | regE=000.0096 | optParE=000.0000 | relF=000.0937 |
14-Img: E=002.4819 | simE=002.4723 | regE=000.0096 |
15-Tot: E=002.1805 | simE=002.1700 | regE=000.0105 | optParE=000.0000 | relF=000.0948 |
15-Img: E=002.1805 | simE=002.1700 | regE=000.0105 |
16-Tot: E=001.6638 | simE=001.6511 | regE=000.0127 | optParE=000.0000 | relF=000.1940 |
16-Img: E=001.6638 | simE=001.6511 | regE=000.0127 |
17-Tot: E=001.5347 | simE=001.5233 | regE=000.0114 | optParE=000.0000 | relF=000.0509 |
17-Img: E=001.5347 | simE=001.5233 | regE=000.0114 |
18-Tot: E=001.9058 | simE=001.8941 | regE=000.0117 | optParE=000.0000 | relF=000.1277 |
18-Img: E=001.9058 | simE=001.8941 | regE=000.0117 |
19-Tot: E=002.7771 | simE=002.7654 | regE=000.0117 | optParE=000.0000 | relF=000.2307 |
19-Img: E=002.7771 | simE=002.7654 | regE=000.0117 |
20-Tot: E=001.5134 | simE=001.5007 | regE=000.0127 | optParE=000.0000 | relF=000.5028 |
20-Img: E=001.5134 | simE=001.5007 | regE=000.0127 |
21-Tot: E=002.0265 | simE=002.0142 | regE=000.0123 | optParE=000.0000 | relF=000.1695 |
21-Img: E=002.0265 | simE=002.0142 | regE=000.0123 |
22-Tot: E=001.7689 | simE=001.7538 | regE=000.0151 | optParE=000.0000 | relF=000.0931 |
22-Img: E=001.7689 | simE=001.7538 | regE=000.0151 |
23-Tot: E=002.0870 | simE=002.0694 | regE=000.0175 | optParE=000.0000 | relF=000.1030 |
23-Img: E=002.0870 | simE=002.0694 | regE=000.0175 |
24-Tot: E=002.4263 | simE=002.4088 | regE=000.0175 | optParE=000.0000 | relF=000.0990 |
24-Img: E=002.4263 | simE=002.4088 | regE=000.0175 |
25-Tot: E=001.3701 | simE=001.3545 | regE=000.0156 | optParE=000.0000 | relF=000.4456 |
25-Img: E=001.3701 | simE=001.3545 | regE=000.0156 |
26-Tot: E=001.8955 | simE=001.8820 | regE=000.0136 | optParE=000.0000 | relF=000.1815 |
26-Img: E=001.8955 | simE=001.8820 | regE=000.0136 |
27-Tot: E=001.6345 | simE=001.6214 | regE=000.0131 | optParE=000.0000 | relF=000.0991 |
27-Img: E=001.6345 | simE=001.6214 | regE=000.0131 |
28-Tot: E=001.0328 | simE=001.0197 | regE=000.0131 | optParE=000.0000 | relF=000.2960 |
28-Img: E=001.0328 | simE=001.0197 | regE=000.0131 |
29-Tot: E=000.7934 | simE=000.7789 | regE=000.0145 | optParE=000.0000 | relF=000.1335 |
29-Img: E=000.7934 | simE=000.7789 | regE=000.0145 |
30-Tot: E=000.8707 | simE=000.8570 | regE=000.0137 | optParE=000.0000 | relF=000.0413 |
30-Img: E=000.8707 | simE=000.8570 | regE=000.0137 |
31-Tot: E=001.0736 | simE=001.0591 | regE=000.0144 | optParE=000.0000 | relF=000.0978 |
31-Img: E=001.0736 | simE=001.0591 | regE=000.0144 |
32-Tot: E=002.2076 | simE=002.1934 | regE=000.0142 | optParE=000.0000 | relF=000.3535 |
32-Img: E=002.2076 | simE=002.1934 | regE=000.0142 |
33-Tot: E=001.0371 | simE=001.0226 | regE=000.0145 | optParE=000.0000 | relF=000.5746 |
33-Img: E=001.0371 | simE=001.0226 | regE=000.0145 |
34-Tot: E=001.8524 | simE=001.8380 | regE=000.0144 | optParE=000.0000 | relF=000.2858 |
34-Img: E=001.8524 | simE=001.8380 | regE=000.0144 |
35-Tot: E=001.0368 | simE=001.0220 | regE=000.0148 | optParE=000.0000 | relF=000.4004 |
35-Img: E=001.0368 | simE=001.0220 | regE=000.0148 |
36-Tot: E=001.3257 | simE=001.3123 | regE=000.0134 | optParE=000.0000 | relF=000.1242 |
36-Img: E=001.3257 | simE=001.3123 | regE=000.0134 |
37-Tot: E=001.0771 | simE=001.0624 | regE=000.0148 | optParE=000.0000 | relF=000.1197 |
37-Img: E=001.0771 | simE=001.0624 | regE=000.0148 |
38-Tot: E=001.3931 | simE=001.3785 | regE=000.0146 | optParE=000.0000 | relF=000.1320 |
38-Img: E=001.3931 | simE=001.3785 | regE=000.0146 |
39-Tot: E=001.1441 | simE=001.1300 | regE=000.0142 | optParE=000.0000 | relF=000.1161 |
39-Img: E=001.1441 | simE=001.1300 | regE=000.0142 |
Epoch 40: reducing learning rate of group 0 to 5.0000e-03.
Epoch 40: reducing learning rate of group 1 to 5.0000e-03.
40-Tot: E=001.4341 | simE=001.4203 | regE=000.0138 | optParE=000.0000 | relF=000.1191 |
40-Img: E=001.4341 | simE=001.4203 | regE=000.0138 |
41-Tot: E=001.3062 | simE=001.2907 | regE=000.0155 | optParE=000.0000 | relF=000.0555 |
41-Img: E=001.3062 | simE=001.2907 | regE=000.0155 |
42-Tot: E=000.9926 | simE=000.9770 | regE=000.0156 | optParE=000.0000 | relF=000.1574 |
42-Img: E=000.9926 | simE=000.9770 | regE=000.0156 |
43-Tot: E=000.6188 | simE=000.6039 | regE=000.0148 | optParE=000.0000 | relF=000.2310 |
43-Img: E=000.6188 | simE=000.6039 | regE=000.0148 |
44-Tot: E=000.6223 | simE=000.6080 | regE=000.0143 | optParE=000.0000 | relF=000.0022 |
44-Img: E=000.6223 | simE=000.6080 | regE=000.0143 |
45-Tot: E=000.5898 | simE=000.5753 | regE=000.0145 | optParE=000.0000 | relF=000.0204 |
45-Img: E=000.5898 | simE=000.5753 | regE=000.0145 |
46-Tot: E=000.5722 | simE=000.5575 | regE=000.0146 | optParE=000.0000 | relF=000.0112 |
46-Img: E=000.5722 | simE=000.5575 | regE=000.0146 |
47-Tot: E=000.5674 | simE=000.5528 | regE=000.0147 | optParE=000.0000 | relF=000.0030 |
47-Img: E=000.5674 | simE=000.5528 | regE=000.0147 |
48-Tot: E=000.5627 | simE=000.5480 | regE=000.0146 | optParE=000.0000 | relF=000.0031 |
48-Img: E=000.5627 | simE=000.5480 | regE=000.0146 |
49-Tot: E=000.5584 | simE=000.5438 | regE=000.0146 | optParE=000.0000 | relF=000.0027 |
49-Img: E=000.5584 | simE=000.5438 | regE=000.0146 |
-->Elapsed time 14.31553[s]
Writing parameter file = test2d_tst.json
Writing parameter file = test2d_tst_with_comments.json
[21]:
plt.figure(figsize=(15,10))
plt.subplot(231); show_image(h['recording'][-1]['iS'], 'Source image')
plt.subplot(232); show_image(h['recording'][-1]['iT'], 'Target image')
plt.subplot(233); show_image(h['recording'][-1]['iW'], 'Warped image')
plt.subplot(234); show_warped_with_grid(h['recording'][-1]['iW'],h['recording'][-1]['phiWarped'], 'Deformation (at convergence)')

[22]:
e_p, = plt.plot(h['energy'], label='energy')
s_p, = plt.plot(h['similarity_energy'], label='similarity_energy')
r_p, = plt.plot(h['regularization_energy'], label='regularization_energy')
plt.legend(handles=[e_p,s_p,r_p])
plt.show()

LDDDM (shooting, scalar momentum)¶
[23]:
si.register_images(I0_syn, I1_syn, spacing_syn, model_name='lddmm_shooting_scalar_momentum_map',
nr_of_iterations=50,
use_multi_scale=False,
visualize_step=None,
optimizer_name='sgd',
learning_rate=0.01,
rel_ftol=1e-7,
json_config_out_filename=('test2d_tst.json', 'test2d_tst_with_comments.json'),
params='test2d_tst.json',
recording_step=1)
h = si.get_history()
Loading parameter file = test2d_tst.json
Overwriting key = use_map; category = root.model.deformation; value = True -> True
Overwriting key = type; category = root.model.registration_model; value = svf_scalar_momentum_map -> lddmm_shooting_scalar_momentum_map
Overwriting key = name; category = root.optimizer; value = sgd -> sgd
Overwriting key = nr_of_iterations; category = root.optimizer.single_scale; value = 50 -> 50
Overwriting key = rel_ftol; category = root.optimizer.single_scale; value = 1e-07 -> 1e-07
mapLowResFactor = 1: performing computations at original resolution.
Overwriting key = use_map; category = root.model.deformation; value = True -> True
Overwriting key = map_low_res_factor; category = root.model.deformation; value = 1.0 -> 1.0
Overwriting key = type; category = root.model.registration_model; value = lddmm_shooting_scalar_momentum_map -> lddmm_shooting_scalar_momentum_map
Overwriting key = type; category = root.model.registration_model; value = lddmm_shooting_scalar_momentum_map -> lddmm_shooting_scalar_momentum_map
Using map-based lddmm_shooting_scalar_momentum_map model
works in mermaid iter mode
LDDMMShootingScalarMomentumMapNet(
(integrator): ODEBlock()
)
Overwriting key = lr; category = root.optimizer.sgd.individual; value = 0.01 -> 0.01
Overwriting key = lr; category = root.optimizer.sgd.shared; value = 0.01 -> 0.01
Using ssd similarity measure
0-Tot: E=013.2236 | simE=013.2236 | regE=000.0000 | optParE=000.0000 | relF= n/a |
0-Img: E=013.2236 | simE=013.2236 | regE=000.0000 |
1-Tot: E=010.3573 | simE=010.3556 | regE=000.0017 | optParE=000.0000 | relF=000.2524 |
1-Img: E=010.3573 | simE=010.3556 | regE=000.0017 |
2-Tot: E=009.1353 | simE=009.1295 | regE=000.0057 | optParE=000.0000 | relF=000.1206 |
2-Img: E=009.1353 | simE=009.1295 | regE=000.0057 |
3-Tot: E=006.2139 | simE=006.2074 | regE=000.0066 | optParE=000.0000 | relF=000.4050 |
3-Img: E=006.2139 | simE=006.2074 | regE=000.0066 |
4-Tot: E=001.7078 | simE=001.6987 | regE=000.0091 | optParE=000.0000 | relF=001.6641 |
4-Img: E=001.7078 | simE=001.6987 | regE=000.0091 |
5-Tot: E=001.8305 | simE=001.8202 | regE=000.0103 | optParE=000.0000 | relF=000.0433 |
5-Img: E=001.8305 | simE=001.8202 | regE=000.0103 |
6-Tot: E=002.3340 | simE=002.3250 | regE=000.0089 | optParE=000.0000 | relF=000.1510 |
6-Img: E=002.3340 | simE=002.3250 | regE=000.0089 |
7-Tot: E=001.5296 | simE=001.5201 | regE=000.0095 | optParE=000.0000 | relF=000.3180 |
7-Img: E=001.5296 | simE=001.5201 | regE=000.0095 |
8-Tot: E=002.2336 | simE=002.2227 | regE=000.0109 | optParE=000.0000 | relF=000.2177 |
8-Img: E=002.2336 | simE=002.2227 | regE=000.0109 |
9-Tot: E=003.1966 | simE=003.1855 | regE=000.0111 | optParE=000.0000 | relF=000.2295 |
9-Img: E=003.1966 | simE=003.1855 | regE=000.0111 |
10-Tot: E=002.8776 | simE=002.8691 | regE=000.0085 | optParE=000.0000 | relF=000.0823 |
10-Img: E=002.8776 | simE=002.8691 | regE=000.0085 |
11-Tot: E=002.5881 | simE=002.5772 | regE=000.0109 | optParE=000.0000 | relF=000.0807 |
11-Img: E=002.5881 | simE=002.5772 | regE=000.0109 |
12-Tot: E=001.8616 | simE=001.8496 | regE=000.0120 | optParE=000.0000 | relF=000.2539 |
12-Img: E=001.8616 | simE=001.8496 | regE=000.0120 |
13-Tot: E=002.3493 | simE=002.3403 | regE=000.0091 | optParE=000.0000 | relF=000.1456 |
13-Img: E=002.3493 | simE=002.3403 | regE=000.0091 |
14-Tot: E=002.9250 | simE=002.9165 | regE=000.0084 | optParE=000.0000 | relF=000.1467 |
14-Img: E=002.9250 | simE=002.9165 | regE=000.0084 |
15-Tot: E=002.2011 | simE=002.1908 | regE=000.0103 | optParE=000.0000 | relF=000.2261 |
15-Img: E=002.2011 | simE=002.1908 | regE=000.0103 |
16-Tot: E=002.8462 | simE=002.8358 | regE=000.0104 | optParE=000.0000 | relF=000.1677 |
16-Img: E=002.8462 | simE=002.8358 | regE=000.0104 |
17-Tot: E=001.2547 | simE=001.2452 | regE=000.0095 | optParE=000.0000 | relF=000.7059 |
17-Img: E=001.2547 | simE=001.2452 | regE=000.0095 |
18-Tot: E=002.7015 | simE=002.6897 | regE=000.0118 | optParE=000.0000 | relF=000.3909 |
18-Img: E=002.7015 | simE=002.6897 | regE=000.0118 |
19-Tot: E=001.2665 | simE=001.2574 | regE=000.0091 | optParE=000.0000 | relF=000.6332 |
19-Img: E=001.2665 | simE=001.2574 | regE=000.0091 |
20-Tot: E=002.4549 | simE=002.4433 | regE=000.0116 | optParE=000.0000 | relF=000.3440 |
20-Img: E=002.4549 | simE=002.4433 | regE=000.0116 |
21-Tot: E=003.4108 | simE=003.3974 | regE=000.0134 | optParE=000.0000 | relF=000.2167 |
21-Img: E=003.4108 | simE=003.3974 | regE=000.0134 |
22-Tot: E=001.9938 | simE=001.9813 | regE=000.0125 | optParE=000.0000 | relF=000.4733 |
22-Img: E=001.9938 | simE=001.9813 | regE=000.0125 |
23-Tot: E=001.8990 | simE=001.8893 | regE=000.0097 | optParE=000.0000 | relF=000.0327 |
23-Img: E=001.8990 | simE=001.8893 | regE=000.0097 |
24-Tot: E=001.5328 | simE=001.5235 | regE=000.0094 | optParE=000.0000 | relF=000.1446 |
24-Img: E=001.5328 | simE=001.5235 | regE=000.0094 |
25-Tot: E=002.7811 | simE=002.7739 | regE=000.0072 | optParE=000.0000 | relF=000.3301 |
25-Img: E=002.7811 | simE=002.7739 | regE=000.0072 |
26-Tot: E=003.6842 | simE=003.6760 | regE=000.0082 | optParE=000.0000 | relF=000.1928 |
26-Img: E=003.6842 | simE=003.6760 | regE=000.0082 |
27-Tot: E=001.5822 | simE=001.5727 | regE=000.0095 | optParE=000.0000 | relF=000.8141 |
27-Img: E=001.5822 | simE=001.5727 | regE=000.0095 |
Epoch 28: reducing learning rate of group 0 to 5.0000e-03.
Epoch 28: reducing learning rate of group 1 to 5.0000e-03.
28-Tot: E=002.6234 | simE=002.6115 | regE=000.0119 | optParE=000.0000 | relF=000.2874 |
28-Img: E=002.6234 | simE=002.6115 | regE=000.0119 |
29-Tot: E=002.4052 | simE=002.3925 | regE=000.0128 | optParE=000.0000 | relF=000.0641 |
29-Img: E=002.4052 | simE=002.3925 | regE=000.0128 |
30-Tot: E=001.5716 | simE=001.5600 | regE=000.0116 | optParE=000.0000 | relF=000.3242 |
30-Img: E=001.5716 | simE=001.5600 | regE=000.0116 |
31-Tot: E=001.9166 | simE=001.9070 | regE=000.0096 | optParE=000.0000 | relF=000.1183 |
31-Img: E=001.9166 | simE=001.9070 | regE=000.0096 |
32-Tot: E=001.5140 | simE=001.5045 | regE=000.0095 | optParE=000.0000 | relF=000.1601 |
32-Img: E=001.5140 | simE=001.5045 | regE=000.0095 |
33-Tot: E=001.5110 | simE=001.5019 | regE=000.0091 | optParE=000.0000 | relF=000.0012 |
33-Img: E=001.5110 | simE=001.5019 | regE=000.0091 |
34-Tot: E=001.2756 | simE=001.2663 | regE=000.0093 | optParE=000.0000 | relF=000.1035 |
34-Img: E=001.2756 | simE=001.2663 | regE=000.0093 |
35-Tot: E=001.0605 | simE=001.0508 | regE=000.0097 | optParE=000.0000 | relF=000.1044 |
35-Img: E=001.0605 | simE=001.0508 | regE=000.0097 |
36-Tot: E=000.7230 | simE=000.7134 | regE=000.0096 | optParE=000.0000 | relF=000.1959 |
36-Img: E=000.7230 | simE=000.7134 | regE=000.0096 |
37-Tot: E=000.8094 | simE=000.7985 | regE=000.0109 | optParE=000.0000 | relF=000.0477 |
37-Img: E=000.8094 | simE=000.7985 | regE=000.0109 |
38-Tot: E=000.5643 | simE=000.5538 | regE=000.0105 | optParE=000.0000 | relF=000.1567 |
38-Img: E=000.5643 | simE=000.5538 | regE=000.0105 |
39-Tot: E=000.5870 | simE=000.5768 | regE=000.0102 | optParE=000.0000 | relF=000.0143 |
39-Img: E=000.5870 | simE=000.5768 | regE=000.0102 |
40-Tot: E=000.5880 | simE=000.5777 | regE=000.0103 | optParE=000.0000 | relF=000.0007 |
40-Img: E=000.5880 | simE=000.5777 | regE=000.0103 |
41-Tot: E=000.7338 | simE=000.7234 | regE=000.0104 | optParE=000.0000 | relF=000.0841 |
41-Img: E=000.7338 | simE=000.7234 | regE=000.0104 |
42-Tot: E=001.0815 | simE=001.0713 | regE=000.0102 | optParE=000.0000 | relF=000.1670 |
42-Img: E=001.0815 | simE=001.0713 | regE=000.0102 |
43-Tot: E=001.0800 | simE=001.0701 | regE=000.0098 | optParE=000.0000 | relF=000.0007 |
43-Img: E=001.0800 | simE=001.0701 | regE=000.0098 |
44-Tot: E=000.9331 | simE=000.9237 | regE=000.0094 | optParE=000.0000 | relF=000.0760 |
44-Img: E=000.9331 | simE=000.9237 | regE=000.0094 |
45-Tot: E=000.9812 | simE=000.9700 | regE=000.0112 | optParE=000.0000 | relF=000.0243 |
45-Img: E=000.9812 | simE=000.9700 | regE=000.0112 |
46-Tot: E=000.5073 | simE=000.4966 | regE=000.0107 | optParE=000.0000 | relF=000.3144 |
46-Img: E=000.5073 | simE=000.4966 | regE=000.0107 |
47-Tot: E=000.4907 | simE=000.4808 | regE=000.0100 | optParE=000.0000 | relF=000.0111 |
47-Img: E=000.4907 | simE=000.4808 | regE=000.0100 |
48-Tot: E=000.4557 | simE=000.4455 | regE=000.0103 | optParE=000.0000 | relF=000.0241 |
48-Img: E=000.4557 | simE=000.4455 | regE=000.0103 |
49-Tot: E=000.4437 | simE=000.4332 | regE=000.0105 | optParE=000.0000 | relF=000.0083 |
49-Img: E=000.4437 | simE=000.4332 | regE=000.0105 |
-->Elapsed time 40.96299[s]
Writing parameter file = test2d_tst.json
Writing parameter file = test2d_tst_with_comments.json
[24]:
plt.figure(figsize=(15,10))
plt.subplot(231); show_image(h['recording'][-1]['iS'], 'Source image')
plt.subplot(232); show_image(h['recording'][-1]['iT'], 'Target image')
plt.subplot(233); show_image(h['recording'][-1]['iW'], 'Warped image')
plt.subplot(234); show_warped_with_grid(h['recording'][-1]['iW'],h['recording'][-1]['phiWarped'], 'Deformation (at convergence)')

[25]:
e_p, = plt.plot(h['energy'], label='energy')
s_p, = plt.plot(h['similarity_energy'], label='similarity_energy')
r_p, = plt.plot(h['regularization_energy'], label='regularization_energy')
plt.legend(handles=[e_p,s_p,r_p])
plt.show()

[ ]: