In [1]:
%matplotlib inline
%pylab inline
Populating the interactive namespace from numpy and matplotlib
In [2]:
repeat = 1
In [3]:
import menpo.io as mio
from menpo.landmark import labeller, lfpw_face
from menpofast.utils import convert_from_menpo
path = '/data/'
group = 'lfpw_face'
test_images = []
for i in mio.import_images(path + 'PhD/DataBases/faces/cofw/testset/', verbose=True,
max_images=None):
# convert the image from menpo Image to menpofast Image (channels at front)
i = convert_from_menpo(i)
labeller(i, 'PTS', eval(group))
i.crop_to_landmarks_proportion_inplace(1, group='PTS')
if i.n_channels == 3:
i = i.as_greyscale(mode='average')
test_images.append(i)
- Loading 507 assets: [====================] 100%
In [4]:
from menpo.visualize import visualize_images
visualize_images(test_images)
In [5]:
from alabortcvpr2015.utils import pickle_load
aam = pickle_load(path + 'PhD/Models/aam_cofw_fast_dsift')
In [6]:
sampling_mask = np.require(np.zeros(aam.parts_shape), dtype=np.bool)
sampling_mask[3::7, 3::7] = True
imshow(sampling_mask)
Out[6]:
<matplotlib.image.AxesImage at 0x7fcdc4f49490>
In [13]:
from alabortcvpr2015.aam import PartsAAMFitter, AIC
from alabortcvpr2015.utils import pickle_dump
from alabortcvpr2015.result import SerializableResult
fitter = PartsAAMFitter(aam, algorithm_cls=AIC, n_shape=[3, 12],
n_appearance=[25, 50], sampling_mask=sampling_mask)
fitter_results = []
for seed in xrange(repeat):
np.random.seed(seed=seed)
for j, i in enumerate(test_images):
gt_s = i.landmarks[group].lms
s = fitter.perturb_shape(gt_s, noise_std=0.05)
fr = fitter.fit(i, s, gt_shape=gt_s, max_iters=20, prior=False)
fitter_results.append(fr)
fr.downscale = 0.5
print 'Image: ', j
print fr
results = [SerializableResult('none', fr.shapes(), fr.n_iters, 'AIC', fr.gt_shape)
for fr in fitter_results]
pickle_dump(results, path + 'PhD/Results/aam_aic_cofw_fast_dsift')
Image: 0
Initial error: 0.1455
Final error: 0.0618
Image: 1
Initial error: 0.1943
Final error: 0.0609
Image: 2
Initial error: 0.1043
Final error: 0.0289
Image: 3
Initial error: 0.0740
Final error: 0.0420
Image: 4
Initial error: 0.0568
Final error: 0.0369
Image: 5
Initial error: 0.0896
Final error: 0.0220
Image: 6
Initial error: 0.0515
Final error: 0.0276
Image: 7
Initial error: 0.0844
Final error: 0.0365
Image: 8
Initial error: 0.0743
Final error: 0.0363
Image: 9
Initial error: 0.0349
Final error: 0.0291
Image: 10
Initial error: 0.1329
Final error: 0.0373
Image: 11
Initial error: 0.0988
Final error: 0.0236
Image: 12
Initial error: 0.1064
Final error: 0.0462
Image: 13
Initial error: 0.0610
Final error: 0.0782
Image: 14
Initial error: 0.0597
Final error: 0.0353
Image: 15
Initial error: 0.1343
Final error: 0.0391
Image: 16
Initial error: 0.0953
Final error: 0.0242
Image: 17
Initial error: 0.0350
Final error: 0.0175
Image: 18
Initial error: 0.0438
Final error: 0.0428
Image: 19
Initial error: 0.0525
Final error: 0.0242
Image: 20
Initial error: 0.1728
Final error: 0.0867
Image: 21
Initial error: 0.0794
Final error: 0.0204
Image: 22
Initial error: 0.0570
Final error: 0.0267
Image: 23
Initial error: 0.0569
Final error: 0.0277
Image: 24
Initial error: 0.1400
Final error: 0.0219
Image: 25
Initial error: 0.0925
Final error: 0.0447
Image: 26
Initial error: 0.0780
Final error: 0.0355
Image: 27
Initial error: 0.1338
Final error: 0.0447
Image: 28
Initial error: 0.0598
Final error: 0.0245
Image: 29
Initial error: 0.0710
Final error: 0.0199
Image: 30
Initial error: 0.0756
Final error: 0.0393
Image: 31
Initial error: 0.0886
Final error: 0.0396
Image: 32
Initial error: 0.1199
Final error: 0.0283
Image: 33
Initial error: 0.0646
Final error: 0.0241
Image: 34
Initial error: 0.0666
Final error: 0.0310
Image: 35
Initial error: 0.0633
Final error: 0.0256
Image: 36
Initial error: 0.1225
Final error: 0.0393
Image: 37
Initial error: 0.1070
Final error: 0.0278
Image: 38
Initial error: 0.2081
Final error: 0.0444
Image: 39
Initial error: 0.1125
Final error: 0.0415
Image: 40
Initial error: 0.1040
Final error: 0.0266
Image: 41
Initial error: 0.1221
Final error: 0.0295
Image: 42
Initial error: 0.0702
Final error: 0.0231
Image: 43
Initial error: 0.0794
Final error: 0.0622
Image: 44
Initial error: 0.0574
Final error: 0.0253
Image: 45
Initial error: 0.1360
Final error: 0.0469
Image: 46
Initial error: 0.0614
Final error: 0.0321
Image: 47
Initial error: 0.1019
Final error: 0.0629
Image: 48
Initial error: 0.0547
Final error: 0.0497
Image: 49
Initial error: 0.1382
Final error: 0.0306
Image: 50
Initial error: 0.0935
Final error: 0.0386
Image: 51
Initial error: 0.0507
Final error: 0.0277
Image: 52
Initial error: 0.0813
Final error: 0.0565
Image: 53
Initial error: 0.0541
Final error: 0.0233
Image: 54
Initial error: 0.1199
Final error: 0.0375
Image: 55
Initial error: 0.0797
Final error: 0.0235
Image: 56
Initial error: 0.0550
Final error: 0.0581
Image: 57
Initial error: 0.2140
Final error: 0.2351
Image: 58
Initial error: 0.0827
Final error: 0.0250
Image: 59
Initial error: 0.2586
Final error: 0.2386
Image: 60
Initial error: 0.0609
Final error: 0.0464
Image: 61
Initial error: 0.0739
Final error: 0.0275
Image: 62
Initial error: 0.0645
Final error: 0.0374
Image: 63
Initial error: 0.1605
Final error: 0.0428
Image: 64
Initial error: 0.1035
Final error: 0.0225
Image: 65
Initial error: 0.1046
Final error: 0.0563
Image: 66
Initial error: 0.0749
Final error: 0.0419
Image: 67
Initial error: 0.1410
Final error: 0.0460
Image: 68
Initial error: 0.1158
Final error: 0.0504
Image: 69
Initial error: 0.1469
Final error: 0.0200
Image: 70
Initial error: 0.0782
Final error: 0.0224
Image: 71
Initial error: 0.0872
Final error: 0.0400
Image: 72
Initial error: 0.0511
Final error: 0.0363
Image: 73
Initial error: 0.0904
Final error: 0.0413
Image: 74
Initial error: 0.0529
Final error: 0.0264
Image: 75
Initial error: 0.0771
Final error: 0.0399
Image: 76
Initial error: 0.1009
Final error: 0.0219
Image: 77
Initial error: 0.0674
Final error: 0.0292
Image: 78
Initial error: 0.0708
Final error: 0.0361
Image: 79
Initial error: 0.0310
Final error: 0.0199
Image: 80
Initial error: 0.0736
Final error: 0.0432
Image: 81
Initial error: 0.1060
Final error: 0.0302
Image: 82
Initial error: 0.0856
Final error: 0.0456
Image: 83
Initial error: 0.1551
Final error: 0.0789
Image: 84
Initial error: 0.0984
Final error: 0.0311
Image: 85
Initial error: 0.0657
Final error: 0.0192
Image: 86
Initial error: 0.0528
Final error: 0.0240
Image: 87
Initial error: 0.0888
Final error: 0.0261
Image: 88
Initial error: 0.0645
Final error: 0.0353
Image: 89
Initial error: 0.0694
Final error: 0.0304
Image: 90
Initial error: 0.1102
Final error: 0.0734
Image: 91
Initial error: 0.0489
Final error: 0.0311
Image: 92
Initial error: 0.0618
Final error: 0.0288
Image: 93
Initial error: 0.0567
Final error: 0.0330
Image: 94
Initial error: 0.0565
Final error: 0.0237
Image: 95
Initial error: 0.1755
Final error: 0.0309
Image: 96
Initial error: 0.0939
Final error: 0.0678
Image: 97
Initial error: 0.0607
Final error: 0.0321
Image: 98
Initial error: 0.0642
Final error: 0.0399
Image: 99
Initial error: 0.1066
Final error: 0.0544
Image: 100
Initial error: 0.0566
Final error: 0.0542
Image: 101
Initial error: 0.0460
Final error: 0.0237
Image: 102
Initial error: 0.1414
Final error: 0.0676
Image: 103
Initial error: 0.0969
Final error: 0.0405
Image: 104
Initial error: 0.1130
Final error: 0.0208
Image: 105
Initial error: 0.1171
Final error: 0.0318
Image: 106
Initial error: 0.1626
Final error: 0.0461
Image: 107
Initial error: 0.0946
Final error: 0.0336
Image: 108
Initial error: 0.0640
Final error: 0.0274
Image: 109
Initial error: 0.0630
Final error: 0.0417
Image: 110
Initial error: 0.0563
Final error: 0.0471
Image: 111
Initial error: 0.0975
Final error: 0.0576
Image: 112
Initial error: 0.0880
Final error: 0.0429
Image: 113
Initial error: 0.0977
Final error: 0.0349
Image: 114
Initial error: 0.0317
Final error: 0.0292
Image: 115
Initial error: 0.0545
Final error: 0.0597
Image: 116
Initial error: 0.0892
Final error: 0.1000
Image: 117
Initial error: 0.1502
Final error: 0.0437
Image: 118
Initial error: 0.1312
Final error: 0.0579
Image: 119
Initial error: 0.0860
Final error: 0.0463
Image: 120
Initial error: 0.0807
Final error: 0.0328
Image: 121
Initial error: 0.1010
Final error: 0.0478
Image: 122
Initial error: 0.0853
Final error: 0.0263
Image: 123
Initial error: 0.1709
Final error: 0.0658
Image: 124
Initial error: 0.1103
Final error: 0.0426
Image: 125
Initial error: 0.1276
Final error: 0.1070
Image: 126
Initial error: 0.1330
Final error: 0.0159
Image: 127
Initial error: 0.0568
Final error: 0.0234
Image: 128
Initial error: 0.0784
Final error: 0.0388
Image: 129
Initial error: 0.0825
Final error: 0.0381
Image: 130
Initial error: 0.1277
Final error: 0.0430
Image: 131
Initial error: 0.0869
Final error: 0.0372
Image: 132
Initial error: 0.1745
Final error: 0.0415
Image: 133
Initial error: 0.0741
Final error: 0.0302
Image: 134
Initial error: 0.0380
Final error: 0.0216
Image: 135
Initial error: 0.0680
Final error: 0.0266
Image: 136
Initial error: 0.1427
Final error: 0.0398
Image: 137
Initial error: 0.0531
Final error: 0.0259
Image: 138
Initial error: 0.0824
Final error: 0.0205
Image: 139
Initial error: 0.1574
Final error: 0.0342
Image: 140
Initial error: 0.0859
Final error: 0.0474
Image: 141
Initial error: 0.1135
Final error: 0.0326
Image: 142
Initial error: 0.0967
Final error: 0.0503
Image: 143
Initial error: 0.0709
Final error: 0.0366
Image: 144
Initial error: 0.0746
Final error: 0.0628
Image: 145
Initial error: 0.0995
Final error: 0.0281
Image: 146
Initial error: 0.1562
Final error: 0.0629
Image: 147
Initial error: 0.0296
Final error: 0.0230
Image: 148
Initial error: 0.0746
Final error: 0.0303
Image: 149
Initial error: 0.0788
Final error: 0.0449
Image: 150
Initial error: 0.0865
Final error: 0.0330
Image: 151
Initial error: 0.1486
Final error: 0.0516
Image: 152
Initial error: 0.1261
Final error: 0.0384
Image: 153
Initial error: 0.0593
Final error: 0.0798
Image: 154
Initial error: 0.1148
Final error: 0.0409
Image: 155
Initial error: 0.0424
Final error: 0.0218
Image: 156
Initial error: 0.0696
Final error: 0.0285
Image: 157
Initial error: 0.0897
Final error: 0.0285
Image: 158
Initial error: 0.0709
Final error: 0.0388
Image: 159
Initial error: 0.0770
Final error: 0.0250
Image: 160
Initial error: 0.0896
Final error: 0.0331
Image: 161
Initial error: 0.0566
Final error: 0.0408
Image: 162
Initial error: 0.1261
Final error: 0.0195
Image: 163
Initial error: 0.0371
Final error: 0.0229
Image: 164
Initial error: 0.0896
Final error: 0.0502
Image: 165
Initial error: 0.1579
Final error: 0.0606
Image: 166
Initial error: 0.0461
Final error: 0.0202
Image: 167
Initial error: 0.1395
Final error: 0.0239
Image: 168
Initial error: 0.0635
Final error: 0.0347
Image: 169
Initial error: 0.0577
Final error: 0.0336
Image: 170
Initial error: 0.0677
Final error: 0.0261
Image: 171
Initial error: 0.1362
Final error: 0.0374
Image: 172
Initial error: 0.0548
Final error: 0.0261
Image: 173
Initial error: 0.0878
Final error: 0.0287
Image: 174
Initial error: 0.0631
Final error: 0.0235
Image: 175
Initial error: 0.1121
Final error: 0.0374
Image: 176
Initial error: 0.0838
Final error: 0.0402
Image: 177
Initial error: 0.0726
Final error: 0.0440
Image: 178
Initial error: 0.0756
Final error: 0.0460
Image: 179
Initial error: 0.1107
Final error: 0.0361
Image: 180
Initial error: 0.0490
Final error: 0.0407
Image: 181
Initial error: 0.0922
Final error: 0.0531
Image: 182
Initial error: 0.0570
Final error: 0.0332
Image: 183
Initial error: 0.2303
Final error: 0.1158
Image: 184
Initial error: 0.0729
Final error: 0.0204
Image: 185
Initial error: 0.0955
Final error: 0.0341
Image: 186
Initial error: 0.0428
Final error: 0.0336
Image: 187
Initial error: 0.1089
Final error: 0.0265
Image: 188
Initial error: 0.0475
Final error: 0.0201
Image: 189
Initial error: 0.0721
Final error: 0.0253
Image: 190
Initial error: 0.0402
Final error: 0.0214
Image: 191
Initial error: 0.1259
Final error: 0.0238
Image: 192
Initial error: 0.0933
Final error: 0.0346
Image: 193
Initial error: 0.1342
Final error: 0.0502
Image: 194
Initial error: 0.0999
Final error: 0.0185
Image: 195
Initial error: 0.0704
Final error: 0.0226
Image: 196
Initial error: 0.1382
Final error: 0.0681
Image: 197
Initial error: 0.0759
Final error: 0.0204
Image: 198
Initial error: 0.0925
Final error: 0.0308
Image: 199
Initial error: 0.2003
Final error: 0.0391
Image: 200
Initial error: 0.0296
Final error: 0.0347
Image: 201
Initial error: 0.0662
Final error: 0.0304
Image: 202
Initial error: 0.1082
Final error: 0.0481
Image: 203
Initial error: 0.1051
Final error: 0.0339
Image: 204
Initial error: 0.0694
Final error: 0.0217
Image: 205
Initial error: 0.0642
Final error: 0.0332
Image: 206
Initial error: 0.1591
Final error: 0.0680
Image: 207
Initial error: 0.0743
Final error: 0.0338
Image: 208
Initial error: 0.0834
Final error: 0.0731
Image: 209
Initial error: 0.0302
Final error: 0.0488
Image: 210
Initial error: 0.1182
Final error: 0.0312
Image: 211
Initial error: 0.1392
Final error: 0.0965
Image: 212
Initial error: 0.1727
Final error: 0.0576
Image: 213
Initial error: 0.0967
Final error: 0.0360
Image: 214
Initial error: 0.0693
Final error: 0.0207
Image: 215
Initial error: 0.0467
Final error: 0.0457
Image: 216
Initial error: 0.0462
Final error: 0.0238
Image: 217
Initial error: 0.0689
Final error: 0.0182
Image: 218
Initial error: 0.0753
Final error: 0.0265
Image: 219
Initial error: 0.0913
Final error: 0.0201
Image: 220
Initial error: 0.0454
Final error: 0.0221
Image: 221
Initial error: 0.0881
Final error: 0.0332
Image: 222
Initial error: 0.0522
Final error: 0.0308
Image: 223
Initial error: 0.1234
Final error: 0.0303
Image: 224
Initial error: 0.1384
Final error: 0.0444
Image: 225
Initial error: 0.0403
Final error: 0.0319
Image: 226
Initial error: 0.0928
Final error: 0.0317
Image: 227
Initial error: 0.0977
Final error: 0.0506
Image: 228
Initial error: 0.0862
Final error: 0.0228
Image: 229
Initial error: 0.0313
Final error: 0.0369
Image: 230
Initial error: 0.0766
Final error: 0.0409
Image: 231
Initial error: 0.0461
Final error: 0.0217
Image: 232
Initial error: 0.0966
Final error: 0.0316
Image: 233
Initial error: 0.0930
Final error: 0.0623
Image: 234
Initial error: 0.0836
Final error: 0.0392
Image: 235
Initial error: 0.1278
Final error: 0.0380
Image: 236
Initial error: 0.0792
Final error: 0.0309
Image: 237
Initial error: 0.0720
Final error: 0.0459
Image: 238
Initial error: 0.0644
Final error: 0.0320
Image: 239
Initial error: 0.1429
Final error: 0.0206
Image: 240
Initial error: 0.0946
Final error: 0.0237
Image: 241
Initial error: 0.0618
Final error: 0.0219
Image: 242
Initial error: 0.0744
Final error: 0.0269
Image: 243
Initial error: 0.1122
Final error: 0.0253
Image: 244
Initial error: 0.0575
Final error: 0.0613
Image: 245
Initial error: 0.0544
Final error: 0.0570
Image: 246
Initial error: 0.0538
Final error: 0.0387
Image: 247
Initial error: 0.0780
Final error: 0.0376
Image: 248
Initial error: 0.1808
Final error: 0.1044
Image: 249
Initial error: 0.1456
Final error: 0.0337
Image: 250
Initial error: 0.0451
Final error: 0.0447
Image: 251
Initial error: 0.1166
Final error: 0.0296
Image: 252
Initial error: 0.0973
Final error: 0.0265
Image: 253
Initial error: 0.0885
Final error: 0.0275
Image: 254
Initial error: 0.0466
Final error: 0.0353
Image: 255
Initial error: 0.0679
Final error: 0.0409
Image: 256
Initial error: 0.0830
Final error: 0.0476
Image: 257
Initial error: 0.0432
Final error: 0.0176
Image: 258
Initial error: 0.0673
Final error: 0.0361
Image: 259
Initial error: 0.0865
Final error: 0.0262
Image: 260
Initial error: 0.0908
Final error: 0.0240
Image: 261
Initial error: 0.0740
Final error: 0.0309
Image: 262
Initial error: 0.0900
Final error: 0.0462
Image: 263
Initial error: 0.1658
Final error: 0.0489
Image: 264
Initial error: 0.0854
Final error: 0.0252
Image: 265
Initial error: 0.0829
Final error: 0.0237
Image: 266
Initial error: 0.0311
Final error: 0.0154
Image: 267
Initial error: 0.1021
Final error: 0.0337
Image: 268
Initial error: 0.0379
Final error: 0.0265
Image: 269
Initial error: 0.0634
Final error: 0.0458
Image: 270
Initial error: 0.0793
Final error: 0.0297
Image: 271
Initial error: 0.0943
Final error: 0.0380
Image: 272
Initial error: 0.0656
Final error: 0.0188
Image: 273
Initial error: 0.1027
Final error: 0.0400
Image: 274
Initial error: 0.0564
Final error: 0.0189
Image: 275
Initial error: 0.1014
Final error: 0.0399
Image: 276
Initial error: 0.0445
Final error: 0.0279
Image: 277
Initial error: 0.0804
Final error: 0.0397
Image: 278
Initial error: 0.1770
Final error: 0.1953
Image: 279
Initial error: 0.0711
Final error: 0.0278
Image: 280
Initial error: 0.0745
Final error: 0.0240
Image: 281
Initial error: 0.0704
Final error: 0.0336
Image: 282
Initial error: 0.0894
Final error: 0.0212
Image: 283
Initial error: 0.1841
Final error: 0.0370
Image: 284
Initial error: 0.1010
Final error: 0.0206
Image: 285
Initial error: 0.1247
Final error: 0.0509
Image: 286
Initial error: 0.1321
Final error: 0.0759
Image: 287
Initial error: 0.0635
Final error: 0.0352
Image: 288
Initial error: 0.0757
Final error: 0.0387
Image: 289
Initial error: 0.1199
Final error: 0.0329
Image: 290
Initial error: 0.0550
Final error: 0.0239
Image: 291
Initial error: 0.1876
Final error: 0.1952
Image: 292
Initial error: 0.0652
Final error: 0.0377
Image: 293
Initial error: 0.1901
Final error: 0.1489
Image: 294
Initial error: 0.1188
Final error: 0.0290
Image: 295
Initial error: 0.0774
Final error: 0.0433
Image: 296
Initial error: 0.1737
Final error: 0.0449
Image: 297
Initial error: 0.0759
Final error: 0.0391
Image: 298
Initial error: 0.1079
Final error: 0.0520
Image: 299
Initial error: 0.1248
Final error: 0.0241
Image: 300
Initial error: 0.0788
Final error: 0.0336
Image: 301
Initial error: 0.0819
Final error: 0.0237
Image: 302
Initial error: 0.0746
Final error: 0.0294
Image: 303
Initial error: 0.1413
Final error: 0.0437
Image: 304
Initial error: 0.0938
Final error: 0.0314
Image: 305
Initial error: 0.0980
Final error: 0.0848
Image: 306
Initial error: 0.0504
Final error: 0.0241
Image: 307
Initial error: 0.0532
Final error: 0.0432
Image: 308
Initial error: 0.1361
Final error: 0.0544
Image: 309
Initial error: 0.0621
Final error: 0.0207
Image: 310
Initial error: 0.0880
Final error: 0.0337
Image: 311
Initial error: 0.1025
Final error: 0.0622
Image: 312
Initial error: 0.0863
Final error: 0.0394
Image: 313
Initial error: 0.1403
Final error: 0.0307
Image: 314
Initial error: 0.1173
Final error: 0.0311
Image: 315
Initial error: 0.0981
Final error: 0.0338
Image: 316
Initial error: 0.1342
Final error: 0.0315
Image: 317
Initial error: 0.1548
Final error: 0.0298
Image: 318
Initial error: 0.0686
Final error: 0.0296
Image: 319
Initial error: 0.0933
Final error: 0.0247
Image: 320
Initial error: 0.0571
Final error: 0.0269
Image: 321
Initial error: 0.0915
Final error: 0.0405
Image: 322
Initial error: 0.1291
Final error: 0.0474
Image: 323
Initial error: 0.1200
Final error: 0.0429
Image: 324
Initial error: 0.1173
Final error: 0.0510
Image: 325
Initial error: 0.0479
Final error: 0.0216
Image: 326
Initial error: 0.0901
Final error: 0.0482
Image: 327
Initial error: 0.0582
Final error: 0.0288
Image: 328
Initial error: 0.0629
Final error: 0.0242
Image: 329
Initial error: 0.1068
Final error: 0.0538
Image: 330
Initial error: 0.0460
Final error: 0.0254
Image: 331
Initial error: 0.0775
Final error: 0.0521
Image: 332
Initial error: 0.1022
Final error: 0.0432
Image: 333
Initial error: 0.1114
Final error: 0.0354
Image: 334
Initial error: 0.0993
Final error: 0.0754
Image: 335
Initial error: 0.0867
Final error: 0.0301
Image: 336
Initial error: 0.1043
Final error: 0.0512
Image: 337
Initial error: 0.1331
Final error: 0.0563
Image: 338
Initial error: 0.1272
Final error: 0.1068
Image: 339
Initial error: 0.1505
Final error: 0.0405
Image: 340
Initial error: 0.0650
Final error: 0.0350
Image: 341
Initial error: 0.0539
Final error: 0.0156
Image: 342
Initial error: 0.0597
Final error: 0.0307
Image: 343
Initial error: 0.0537
Final error: 0.0306
Image: 344
Initial error: 0.1059
Final error: 0.0934
Image: 345
Initial error: 0.0989
Final error: 0.0354
Image: 346
Initial error: 0.0600
Final error: 0.0308
Image: 347
Initial error: 0.0803
Final error: 0.0284
Image: 348
Initial error: 0.0658
Final error: 0.0295
Image: 349
Initial error: 0.0921
Final error: 0.0527
Image: 350
Initial error: 0.1167
Final error: 0.0224
Image: 351
Initial error: 0.0484
Final error: 0.0273
Image: 352
Initial error: 0.2006
Final error: 0.0452
Image: 353
Initial error: 0.1052
Final error: 0.0627
Image: 354
Initial error: 0.1507
Final error: 0.1618
Image: 355
Initial error: 0.0741
Final error: 0.0488
Image: 356
Initial error: 0.0456
Final error: 0.0316
Image: 357
Initial error: 0.1407
Final error: 0.0224
Image: 358
Initial error: 0.0921
Final error: 0.0291
Image: 359
Initial error: 0.0694
Final error: 0.0318
Image: 360
Initial error: 0.0620
Final error: 0.0319
Image: 361
Initial error: 0.2014
Final error: 0.1755
Image: 362
Initial error: 0.0626
Final error: 0.0420
Image: 363
Initial error: 0.0518
Final error: 0.0371
Image: 364
Initial error: 0.1218
Final error: 0.0288
Image: 365
Initial error: 0.1719
Final error: 0.0313
Image: 366
Initial error: 0.0540
Final error: 0.0480
Image: 367
Initial error: 0.0535
Final error: 0.0265
Image: 368
Initial error: 0.0548
Final error: 0.0470
Image: 369
Initial error: 0.0500
Final error: 0.0380
Image: 370
Initial error: 0.0747
Final error: 0.0376
Image: 371
Initial error: 0.1186
Final error: 0.0525
Image: 372
Initial error: 0.0511
Final error: 0.0545
Image: 373
Initial error: 0.1381
Final error: 0.0592
Image: 374
Initial error: 0.1155
Final error: 0.0493
Image: 375
Initial error: 0.0656
Final error: 0.0370
Image: 376
Initial error: 0.0362
Final error: 0.0267
Image: 377
Initial error: 0.0796
Final error: 0.0177
Image: 378
Initial error: 0.0965
Final error: 0.0514
Image: 379
Initial error: 0.0325
Final error: 0.0243
Image: 380
Initial error: 0.1028
Final error: 0.0332
Image: 381
Initial error: 0.0669
Final error: 0.0184
Image: 382
Initial error: 0.1142
Final error: 0.0179
Image: 383
Initial error: 0.0923
Final error: 0.0260
Image: 384
Initial error: 0.1341
Final error: 0.0624
Image: 385
Initial error: 0.0991
Final error: 0.0293
Image: 386
Initial error: 0.0708
Final error: 0.0348
Image: 387
Initial error: 0.0808
Final error: 0.0504
Image: 388
Initial error: 0.0820
Final error: 0.0310
Image: 389
Initial error: 0.0517
Final error: 0.0235
Image: 390
Initial error: 0.0833
Final error: 0.0477
Image: 391
Initial error: 0.1057
Final error: 0.0257
Image: 392
Initial error: 0.1076
Final error: 0.0430
Image: 393
Initial error: 0.0833
Final error: 0.0217
Image: 394
Initial error: 0.0985
Final error: 0.0294
Image: 395
Initial error: 0.2367
Final error: 0.2009
Image: 396
Initial error: 0.1140
Final error: 0.0228
Image: 397
Initial error: 0.0764
Final error: 0.0223
Image: 398
Initial error: 0.0722
Final error: 0.0586
Image: 399
Initial error: 0.1054
Final error: 0.0307
Image: 400
Initial error: 0.0707
Final error: 0.0246
Image: 401
Initial error: 0.0668
Final error: 0.0261
Image: 402
Initial error: 0.0947
Final error: 0.0637
Image: 403
Initial error: 0.1056
Final error: 0.0531
Image: 404
Initial error: 0.0834
Final error: 0.0671
Image: 405
Initial error: 0.0854
Final error: 0.0467
Image: 406
Initial error: 0.0551
Final error: 0.0307
Image: 407
Initial error: 0.0728
Final error: 0.0253
Image: 408
Initial error: 0.1235
Final error: 0.0718
Image: 409
Initial error: 0.0986
Final error: 0.0358
Image: 410
Initial error: 0.0460
Final error: 0.0255
Image: 411
Initial error: 0.0991
Final error: 0.0505
Image: 412
Initial error: 0.0797
Final error: 0.0516
Image: 413
Initial error: 0.1649
Final error: 0.0311
Image: 414
Initial error: 0.1265
Final error: 0.0356
Image: 415
Initial error: 0.1256
Final error: 0.0463
Image: 416
Initial error: 0.0618
Final error: 0.0307
Image: 417
Initial error: 0.0802
Final error: 0.0257
Image: 418
Initial error: 0.1200
Final error: 0.0396
Image: 419
Initial error: 0.1151
Final error: 0.0352
Image: 420
Initial error: 0.0941
Final error: 0.0273
Image: 421
Initial error: 0.0351
Final error: 0.0242
Image: 422
Initial error: 0.1277
Final error: 0.0257
Image: 423
Initial error: 0.0711
Final error: 0.0379
Image: 424
Initial error: 0.0544
Final error: 0.0547
Image: 425
Initial error: 0.0748
Final error: 0.0304
Image: 426
Initial error: 0.0720
Final error: 0.0634
Image: 427
Initial error: 0.0534
Final error: 0.0201
Image: 428
Initial error: 0.0944
Final error: 0.0363
Image: 429
Initial error: 0.1442
Final error: 0.0426
Image: 430
Initial error: 0.0964
Final error: 0.0206
Image: 431
Initial error: 0.0454
Final error: 0.0503
Image: 432
Initial error: 0.0835
Final error: 0.0223
Image: 433
Initial error: 0.1097
Final error: 0.0417
Image: 434
Initial error: 0.0814
Final error: 0.0377
Image: 435
Initial error: 0.1174
Final error: 0.0465
Image: 436
Initial error: 0.1477
Final error: 0.0336
Image: 437
Initial error: 0.1028
Final error: 0.0323
Image: 438
Initial error: 0.0591
Final error: 0.0289
Image: 439
Initial error: 0.0862
Final error: 0.0258
Image: 440
Initial error: 0.1783
Final error: 0.0924
Image: 441
Initial error: 0.0798
Final error: 0.0391
Image: 442
Initial error: 0.0752
Final error: 0.0411
Image: 443
Initial error: 0.0550
Final error: 0.0233
Image: 444
Initial error: 0.0726
Final error: 0.0283
Image: 445
Initial error: 0.1093
Final error: 0.0475
Image: 446
Initial error: 0.1518
Final error: 0.0766
Image: 447
Initial error: 0.0413
Final error: 0.0250
Image: 448
Initial error: 0.1061
Final error: 0.0205
Image: 449
Initial error: 0.0975
Final error: 0.0428
Image: 450
Initial error: 0.1098
Final error: 0.0209
Image: 451
Initial error: 0.1183
Final error: 0.0461
Image: 452
Initial error: 0.1048
Final error: 0.0558
Image: 453
Initial error: 0.0832
Final error: 0.0284
Image: 454
Initial error: 0.0677
Final error: 0.0392
Image: 455
Initial error: 0.1411
Final error: 0.1253
Image: 456
Initial error: 0.0604
Final error: 0.0261
Image: 457
Initial error: 0.0460
Final error: 0.0476
Image: 458
Initial error: 0.0678
Final error: 0.0270
Image: 459
Initial error: 0.1464
Final error: 0.0300
Image: 460
Initial error: 0.0678
Final error: 0.0222
Image: 461
Initial error: 0.1022
Final error: 0.0264
Image: 462
Initial error: 0.0524
Final error: 0.0443
Image: 463
Initial error: 0.1328
Final error: 0.0360
Image: 464
Initial error: 0.0723
Final error: 0.0442
Image: 465
Initial error: 0.1195
Final error: 0.0966
Image: 466
Initial error: 0.0531
Final error: 0.0288
Image: 467
Initial error: 0.0612
Final error: 0.0569
Image: 468
Initial error: 0.0657
Final error: 0.0301
Image: 469
Initial error: 0.0580
Final error: 0.0261
Image: 470
Initial error: 0.0975
Final error: 0.0432
Image: 471
Initial error: 0.1528
Final error: 0.0825
Image: 472
Initial error: 0.1286
Final error: 0.0346
Image: 473
Initial error: 0.0395
Final error: 0.0197
Image: 474
Initial error: 0.0824
Final error: 0.0338
Image: 475
Initial error: 0.0837
Final error: 0.0193
Image: 476
Initial error: 0.1259
Final error: 0.0420
Image: 477
Initial error: 0.1234
Final error: 0.0591
Image: 478
Initial error: 0.0774
Final error: 0.0216
Image: 479
Initial error: 0.0645
Final error: 0.0220
Image: 480
Initial error: 0.0331
Final error: 0.0215
Image: 481
Initial error: 0.0900
Final error: 0.0313
Image: 482
Initial error: 0.0747
Final error: 0.0244
Image: 483
Initial error: 0.1539
Final error: 0.0370
Image: 484
Initial error: 0.0653
Final error: 0.0185
Image: 485
Initial error: 0.0441
Final error: 0.0526
Image: 486
Initial error: 0.1087
Final error: 0.0737
Image: 487
Initial error: 0.1048
Final error: 0.0362
Image: 488
Initial error: 0.1061
Final error: 0.0365
Image: 489
Initial error: 0.0955
Final error: 0.0370
Image: 490
Initial error: 0.1140
Final error: 0.0271
Image: 491
Initial error: 0.0656
Final error: 0.0189
Image: 492
Initial error: 0.1318
Final error: 0.0388
Image: 493
Initial error: 0.0535
Final error: 0.0297
Image: 494
Initial error: 0.1124
Final error: 0.0469
Image: 495
Initial error: 0.0624
Final error: 0.0278
Image: 496
Initial error: 0.2569
Final error: 0.1500
Image: 497
Initial error: 0.1096
Final error: 0.0393
Image: 498
Initial error: 0.0572
Final error: 0.0397
Image: 499
Initial error: 0.0774
Final error: 0.0269
Image: 500
Initial error: 0.0876
Final error: 0.0407
Image: 501
Initial error: 0.0680
Final error: 0.0706
Image: 502
Initial error: 0.0600
Final error: 0.0265
Image: 503
Initial error: 0.0431
Final error: 0.0344
Image: 504
Initial error: 0.1788
Final error: 0.0560
Image: 505
Initial error: 0.0590
Final error: 0.0255
Image: 506
Initial error: 0.0460
Final error: 0.0247
In [8]:
np.mean([fr.final_error(error_type='rmse') for fr in fitter_results])
Out[8]:
3.7965750064465333
In [ ]:
from menpofit.visualize import visualize_fitting_results
visualize_fitting_results(fitter_results)
In [9]:
sampling_mask = np.require(np.zeros(aam.parts_shape), dtype=np.bool)
sampling_mask[3::7, 3::7] = True
imshow(sampling_mask)
Out[9]:
<matplotlib.image.AxesImage at 0x7fcdb6428190>
In [12]:
from alabortcvpr2015.aam import PartsAAMFitter, PIC
from alabortcvpr2015.utils import pickle_dump
from alabortcvpr2015.result import SerializableResult
fitter = PartsAAMFitter(aam, algorithm_cls=PIC, n_shape=[3, 12],
n_appearance=[25, 50], sampling_mask=sampling_mask)
fitter_results = []
for seed in xrange(repeat):
np.random.seed(seed=seed)
for j, i in enumerate(test_images):
gt_s = i.landmarks[group].lms
s = fitter.perturb_shape(gt_s, noise_std=0.05)
fr = fitter.fit(i, s, gt_shape=gt_s, max_iters=20, prior=False)
fitter_results.append(fr)
fr.downscale = 0.5
print 'Image: ', j
print fr
results = [SerializableResult('none', fr.shapes(), fr.n_iters, 'PIC', fr.gt_shape)
for fr in fitter_results]
pickle_dump(results, path + 'PhD/Results/aam_pic_cofw_fast_dsift')
Image: 0
Initial error: 0.1455
Final error: 0.0353
Image: 1
Initial error: 0.1943
Final error: 0.1424
Image: 2
Initial error: 0.1043
Final error: 0.0394
Image: 3
Initial error: 0.0740
Final error: 0.0459
Image: 4
Initial error: 0.0568
Final error: 0.0707
Image: 5
Initial error: 0.0896
Final error: 0.0464
Image: 6
Initial error: 0.0515
Final error: 0.0798
Image: 7
Initial error: 0.0844
Final error: 0.0890
Image: 8
Initial error: 0.0743
Final error: 0.0333
Image: 9
Initial error: 0.0349
Final error: 0.0315
Image: 10
Initial error: 0.1329
Final error: 0.0512
Image: 11
Initial error: 0.0988
Final error: 0.0602
Image: 12
Initial error: 0.1064
Final error: 0.1539
Image: 13
Initial error: 0.0610
Final error: 0.1095
Image: 14
Initial error: 0.0597
Final error: 0.0401
Image: 15
Initial error: 0.1343
Final error: 0.0537
Image: 16
Initial error: 0.0953
Final error: 0.0400
Image: 17
Initial error: 0.0350
Final error: 0.0220
Image: 18
Initial error: 0.0438
Final error: 0.0396
Image: 19
Initial error: 0.0525
Final error: 0.0364
Image: 20
Initial error: 0.1728
Final error: 0.1182
Image: 21
Initial error: 0.0794
Final error: 0.0196
Image: 22
Initial error: 0.0570
Final error: 0.0324
Image: 23
Initial error: 0.0569
Final error: 0.0935
Image: 24
Initial error: 0.1400
Final error: 0.0344
Image: 25
Initial error: 0.0925
Final error: 0.0722
Image: 26
Initial error: 0.0780
Final error: 0.0431
Image: 27
Initial error: 0.1338
Final error: 0.0972
Image: 28
Initial error: 0.0598
Final error: 0.0336
Image: 29
Initial error: 0.0710
Final error: 0.0248
Image: 30
Initial error: 0.0756
Final error: 0.1182
Image: 31
Initial error: 0.0886
Final error: 0.0673
Image: 32
Initial error: 0.1199
Final error: 0.0323
Image: 33
Initial error: 0.0646
Final error: 0.0236
Image: 34
Initial error: 0.0666
Final error: 0.0398
Image: 35
Initial error: 0.0633
Final error: 0.0454
Image: 36
Initial error: 0.1225
Final error: 0.0506
Image: 37
Initial error: 0.1070
Final error: 0.0288
Image: 38
Initial error: 0.2081
Final error: 0.0844
Image: 39
Initial error: 0.1125
Final error: 0.0765
Image: 40
Initial error: 0.1040
Final error: 0.0283
Image: 41
Initial error: 0.1221
Final error: 0.0332
Image: 42
Initial error: 0.0702
Final error: 0.0264
Image: 43
Initial error: 0.0794
Final error: 0.0570
Image: 44
Initial error: 0.0574
Final error: 0.0623
Image: 45
Initial error: 0.1360
Final error: 0.0816
Image: 46
Initial error: 0.0614
Final error: 0.0236
Image: 47
Initial error: 0.1019
Final error: 0.0244
Image: 48
Initial error: 0.0547
Final error: 0.0548
Image: 49
Initial error: 0.1382
Final error: 0.0370
Image: 50
Initial error: 0.0935
Final error: 0.0562
Image: 51
Initial error: 0.0507
Final error: 0.0318
Image: 52
Initial error: 0.0813
Final error: 0.0680
Image: 53
Initial error: 0.0541
Final error: 0.0237
Image: 54
Initial error: 0.1199
Final error: 0.1440
Image: 55
Initial error: 0.0797
Final error: 0.0218
Image: 56
Initial error: 0.0550
Final error: 0.0831
Image: 57
Initial error: 0.2140
Final error: 0.1106
Image: 58
Initial error: 0.0827
Final error: 0.0236
Image: 59
Initial error: 0.2586
Final error: 0.1447
Image: 60
Initial error: 0.0609
Final error: 0.0726
Image: 61
Initial error: 0.0739
Final error: 0.0522
Image: 62
Initial error: 0.0645
Final error: 0.0451
Image: 63
Initial error: 0.1605
Final error: 0.1350
Image: 64
Initial error: 0.1035
Final error: 0.0371
Image: 65
Initial error: 0.1046
Final error: 0.0888
Image: 66
Initial error: 0.0749
Final error: 0.0371
Image: 67
Initial error: 0.1410
Final error: 0.0560
Image: 68
Initial error: 0.1158
Final error: 0.0483
Image: 69
Initial error: 0.1469
Final error: 0.0242
Image: 70
Initial error: 0.0782
Final error: 0.0240
Image: 71
Initial error: 0.0872
Final error: 0.0340
Image: 72
Initial error: 0.0511
Final error: 0.0668
Image: 73
Initial error: 0.0904
Final error: 0.0492
Image: 74
Initial error: 0.0529
Final error: 0.0427
Image: 75
Initial error: 0.0771
Final error: 0.0343
Image: 76
Initial error: 0.1009
Final error: 0.0308
Image: 77
Initial error: 0.0674
Final error: 0.0298
Image: 78
Initial error: 0.0708
Final error: 0.0542
Image: 79
Initial error: 0.0310
Final error: 0.0293
Image: 80
Initial error: 0.0736
Final error: 0.0544
Image: 81
Initial error: 0.1060
Final error: 0.0340
Image: 82
Initial error: 0.0856
Final error: 0.0820
Image: 83
Initial error: 0.1551
Final error: 0.0294
Image: 84
Initial error: 0.0984
Final error: 0.0245
Image: 85
Initial error: 0.0657
Final error: 0.0367
Image: 86
Initial error: 0.0528
Final error: 0.0283
Image: 87
Initial error: 0.0888
Final error: 0.0425
Image: 88
Initial error: 0.0645
Final error: 0.0302
Image: 89
Initial error: 0.0694
Final error: 0.0321
Image: 90
Initial error: 0.1102
Final error: 0.0330
Image: 91
Initial error: 0.0489
Final error: 0.0836
Image: 92
Initial error: 0.0618
Final error: 0.0556
Image: 93
Initial error: 0.0567
Final error: 0.0511
Image: 94
Initial error: 0.0565
Final error: 0.0319
Image: 95
Initial error: 0.1755
Final error: 0.0324
Image: 96
Initial error: 0.0939
Final error: 0.0693
Image: 97
Initial error: 0.0607
Final error: 0.0403
Image: 98
Initial error: 0.0642
Final error: 0.0337
Image: 99
Initial error: 0.1066
Final error: 0.1123
Image: 100
Initial error: 0.0566
Final error: 0.0444
Image: 101
Initial error: 0.0460
Final error: 0.0274
Image: 102
Initial error: 0.1414
Final error: 0.0960
Image: 103
Initial error: 0.0969
Final error: 0.0626
Image: 104
Initial error: 0.1130
Final error: 0.0324
Image: 105
Initial error: 0.1171
Final error: 0.0802
Image: 106
Initial error: 0.1626
Final error: 0.0392
Image: 107
Initial error: 0.0946
Final error: 0.0456
Image: 108
Initial error: 0.0640
Final error: 0.0338
Image: 109
Initial error: 0.0630
Final error: 0.0507
Image: 110
Initial error: 0.0563
Final error: 0.0647
Image: 111
Initial error: 0.0975
Final error: 0.0746
Image: 112
Initial error: 0.0880
Final error: 0.0760
Image: 113
Initial error: 0.0977
Final error: 0.0380
Image: 114
Initial error: 0.0317
Final error: 0.0446
Image: 115
Initial error: 0.0545
Final error: 0.0674
Image: 116
Initial error: 0.0892
Final error: 0.1188
Image: 117
Initial error: 0.1502
Final error: 0.0345
Image: 118
Initial error: 0.1312
Final error: 0.0621
Image: 119
Initial error: 0.0860
Final error: 0.0732
Image: 120
Initial error: 0.0807
Final error: 0.0398
Image: 121
Initial error: 0.1010
Final error: 0.0814
Image: 122
Initial error: 0.0853
Final error: 0.0365
Image: 123
Initial error: 0.1709
Final error: 0.0224
Image: 124
Initial error: 0.1103
Final error: 0.0569
Image: 125
Initial error: 0.1276
Final error: 0.1086
Image: 126
Initial error: 0.1330
Final error: 0.0249
Image: 127
Initial error: 0.0568
Final error: 0.0493
Image: 128
Initial error: 0.0784
Final error: 0.0567
Image: 129
Initial error: 0.0825
Final error: 0.0723
Image: 130
Initial error: 0.1277
Final error: 0.0626
Image: 131
Initial error: 0.0869
Final error: 0.0442
Image: 132
Initial error: 0.1745
Final error: 0.1092
Image: 133
Initial error: 0.0741
Final error: 0.1157
Image: 134
Initial error: 0.0380
Final error: 0.0227
Image: 135
Initial error: 0.0680
Final error: 0.0342
Image: 136
Initial error: 0.1427
Final error: 0.0840
Image: 137
Initial error: 0.0531
Final error: 0.0397
Image: 138
Initial error: 0.0824
Final error: 0.0333
Image: 139
Initial error: 0.1574
Final error: 0.0757
Image: 140
Initial error: 0.0859
Final error: 0.0489
Image: 141
Initial error: 0.1135
Final error: 0.0521
Image: 142
Initial error: 0.0967
Final error: 0.0473
Image: 143
Initial error: 0.0709
Final error: 0.0396
Image: 144
Initial error: 0.0746
Final error: 0.0502
Image: 145
Initial error: 0.0995
Final error: 0.0301
Image: 146
Initial error: 0.1562
Final error: 0.0502
Image: 147
Initial error: 0.0296
Final error: 0.0200
Image: 148
Initial error: 0.0746
Final error: 0.0593
Image: 149
Initial error: 0.0788
Final error: 0.0392
Image: 150
Initial error: 0.0865
Final error: 0.0251
Image: 151
Initial error: 0.1486
Final error: 0.0660
Image: 152
Initial error: 0.1261
Final error: 0.0699
Image: 153
Initial error: 0.0593
Final error: 0.1780
Image: 154
Initial error: 0.1148
Final error: 0.0749
Image: 155
Initial error: 0.0424
Final error: 0.0236
Image: 156
Initial error: 0.0696
Final error: 0.0231
Image: 157
Initial error: 0.0897
Final error: 0.0767
Image: 158
Initial error: 0.0709
Final error: 0.0494
Image: 159
Initial error: 0.0770
Final error: 0.0203
Image: 160
Initial error: 0.0896
Final error: 0.0336
Image: 161
Initial error: 0.0566
Final error: 0.0794
Image: 162
Initial error: 0.1261
Final error: 0.0200
Image: 163
Initial error: 0.0371
Final error: 0.0383
Image: 164
Initial error: 0.0896
Final error: 0.0687
Image: 165
Initial error: 0.1579
Final error: 0.1055
Image: 166
Initial error: 0.0461
Final error: 0.0244
Image: 167
Initial error: 0.1395
Final error: 0.0297
Image: 168
Initial error: 0.0635
Final error: 0.0403
Image: 169
Initial error: 0.0577
Final error: 0.0304
Image: 170
Initial error: 0.0677
Final error: 0.0269
Image: 171
Initial error: 0.1362
Final error: 0.1308
Image: 172
Initial error: 0.0548
Final error: 0.0441
Image: 173
Initial error: 0.0878
Final error: 0.0369
Image: 174
Initial error: 0.0631
Final error: 0.0290
Image: 175
Initial error: 0.1121
Final error: 0.0712
Image: 176
Initial error: 0.0838
Final error: 0.0247
Image: 177
Initial error: 0.0726
Final error: 0.0429
Image: 178
Initial error: 0.0756
Final error: 0.1015
Image: 179
Initial error: 0.1107
Final error: 0.0421
Image: 180
Initial error: 0.0490
Final error: 0.0828
Image: 181
Initial error: 0.0922
Final error: 0.0381
Image: 182
Initial error: 0.0570
Final error: 0.0428
Image: 183
Initial error: 0.2303
Final error: 0.2697
Image: 184
Initial error: 0.0729
Final error: 0.0368
Image: 185
Initial error: 0.0955
Final error: 0.0751
Image: 186
Initial error: 0.0428
Final error: 0.0346
Image: 187
Initial error: 0.1089
Final error: 0.0515
Image: 188
Initial error: 0.0475
Final error: 0.0257
Image: 189
Initial error: 0.0721
Final error: 0.0326
Image: 190
Initial error: 0.0402
Final error: 0.0271
Image: 191
Initial error: 0.1259
Final error: 0.0452
Image: 192
Initial error: 0.0933
Final error: 0.0425
Image: 193
Initial error: 0.1342
Final error: 0.0400
Image: 194
Initial error: 0.0999
Final error: 0.0455
Image: 195
Initial error: 0.0704
Final error: 0.0375
Image: 196
Initial error: 0.1382
Final error: 0.0548
Image: 197
Initial error: 0.0759
Final error: 0.0361
Image: 198
Initial error: 0.0925
Final error: 0.0407
Image: 199
Initial error: 0.2003
Final error: 0.1566
Image: 200
Initial error: 0.0296
Final error: 0.0501
Image: 201
Initial error: 0.0662
Final error: 0.0302
Image: 202
Initial error: 0.1082
Final error: 0.0657
Image: 203
Initial error: 0.1051
Final error: 0.0972
Image: 204
Initial error: 0.0694
Final error: 0.0258
Image: 205
Initial error: 0.0642
Final error: 0.0629
Image: 206
Initial error: 0.1591
Final error: 0.0590
Image: 207
Initial error: 0.0743
Final error: 0.0311
Image: 208
Initial error: 0.0834
Final error: 0.0907
Image: 209
Initial error: 0.0302
Final error: 0.0422
Image: 210
Initial error: 0.1182
Final error: 0.0523
Image: 211
Initial error: 0.1392
Final error: 0.1078
Image: 212
Initial error: 0.1727
Final error: 0.1463
Image: 213
Initial error: 0.0967
Final error: 0.0543
Image: 214
Initial error: 0.0693
Final error: 0.0420
Image: 215
Initial error: 0.0467
Final error: 0.0692
Image: 216
Initial error: 0.0462
Final error: 0.0329
Image: 217
Initial error: 0.0689
Final error: 0.0270
Image: 218
Initial error: 0.0753
Final error: 0.0228
Image: 219
Initial error: 0.0913
Final error: 0.0255
Image: 220
Initial error: 0.0454
Final error: 0.0484
Image: 221
Initial error: 0.0881
Final error: 0.0395
Image: 222
Initial error: 0.0522
Final error: 0.0366
Image: 223
Initial error: 0.1234
Final error: 0.0568
Image: 224
Initial error: 0.1384
Final error: 0.0542
Image: 225
Initial error: 0.0403
Final error: 0.0919
Image: 226
Initial error: 0.0928
Final error: 0.0381
Image: 227
Initial error: 0.0977
Final error: 0.0574
Image: 228
Initial error: 0.0862
Final error: 0.0285
Image: 229
Initial error: 0.0313
Final error: 0.0392
Image: 230
Initial error: 0.0766
Final error: 0.0642
Image: 231
Initial error: 0.0461
Final error: 0.0233
Image: 232
Initial error: 0.0966
Final error: 0.0541
Image: 233
Initial error: 0.0930
Final error: 0.0596
Image: 234
Initial error: 0.0836
Final error: 0.0199
Image: 235
Initial error: 0.1278
Final error: 0.0581
Image: 236
Initial error: 0.0792
Final error: 0.0262
Image: 237
Initial error: 0.0720
Final error: 0.0983
Image: 238
Initial error: 0.0644
Final error: 0.0336
Image: 239
Initial error: 0.1429
Final error: 0.0319
Image: 240
Initial error: 0.0946
Final error: 0.0239
Image: 241
Initial error: 0.0618
Final error: 0.0290
Image: 242
Initial error: 0.0744
Final error: 0.0336
Image: 243
Initial error: 0.1122
Final error: 0.0257
Image: 244
Initial error: 0.0575
Final error: 0.0398
Image: 245
Initial error: 0.0544
Final error: 0.0885
Image: 246
Initial error: 0.0538
Final error: 0.0470
Image: 247
Initial error: 0.0780
Final error: 0.0445
Image: 248
Initial error: 0.1808
Final error: 0.0761
Image: 249
Initial error: 0.1456
Final error: 0.1029
Image: 250
Initial error: 0.0451
Final error: 0.0465
Image: 251
Initial error: 0.1166
Final error: 0.0355
Image: 252
Initial error: 0.0973
Final error: 0.0253
Image: 253
Initial error: 0.0885
Final error: 0.0325
Image: 254
Initial error: 0.0466
Final error: 0.0333
Image: 255
Initial error: 0.0679
Final error: 0.0351
Image: 256
Initial error: 0.0830
Final error: 0.0650
Image: 257
Initial error: 0.0432
Final error: 0.0221
Image: 258
Initial error: 0.0673
Final error: 0.0322
Image: 259
Initial error: 0.0865
Final error: 0.0302
Image: 260
Initial error: 0.0908
Final error: 0.0234
Image: 261
Initial error: 0.0740
Final error: 0.0934
Image: 262
Initial error: 0.0900
Final error: 0.0759
Image: 263
Initial error: 0.1658
Final error: 0.0878
Image: 264
Initial error: 0.0854
Final error: 0.1035
Image: 265
Initial error: 0.0829
Final error: 0.0209
Image: 266
Initial error: 0.0311
Final error: 0.0262
Image: 267
Initial error: 0.1021
Final error: 0.0449
Image: 268
Initial error: 0.0379
Final error: 0.0564
Image: 269
Initial error: 0.0634
Final error: 0.1074
Image: 270
Initial error: 0.0793
Final error: 0.0269
Image: 271
Initial error: 0.0943
Final error: 0.2170
Image: 272
Initial error: 0.0656
Final error: 0.0328
Image: 273
Initial error: 0.1027
Final error: 0.0584
Image: 274
Initial error: 0.0564
Final error: 0.0551
Image: 275
Initial error: 0.1014
Final error: 0.0482
Image: 276
Initial error: 0.0445
Final error: 0.0317
Image: 277
Initial error: 0.0804
Final error: 0.0938
Image: 278
Initial error: 0.1770
Final error: 0.0839
Image: 279
Initial error: 0.0711
Final error: 0.0277
Image: 280
Initial error: 0.0745
Final error: 0.0248
Image: 281
Initial error: 0.0704
Final error: 0.0329
Image: 282
Initial error: 0.0894
Final error: 0.0319
Image: 283
Initial error: 0.1841
Final error: 0.0405
Image: 284
Initial error: 0.1010
Final error: 0.0371
Image: 285
Initial error: 0.1247
Final error: 0.0861
Image: 286
Initial error: 0.1321
Final error: 0.1031
Image: 287
Initial error: 0.0635
Final error: 0.0755
Image: 288
Initial error: 0.0757
Final error: 0.0500
Image: 289
Initial error: 0.1199
Final error: 0.0612
Image: 290
Initial error: 0.0550
Final error: 0.0224
Image: 291
Initial error: 0.1876
Final error: 0.0691
Image: 292
Initial error: 0.0652
Final error: 0.0407
Image: 293
Initial error: 0.1901
Final error: 0.1909
Image: 294
Initial error: 0.1188
Final error: 0.0676
Image: 295
Initial error: 0.0774
Final error: 0.0388
Image: 296
Initial error: 0.1737
Final error: 0.0881
Image: 297
Initial error: 0.0759
Final error: 0.0345
Image: 298
Initial error: 0.1079
Final error: 0.1394
Image: 299
Initial error: 0.1248
Final error: 0.0269
Image: 300
Initial error: 0.0788
Final error: 0.0341
Image: 301
Initial error: 0.0819
Final error: 0.0529
Image: 302
Initial error: 0.0746
Final error: 0.0271
Image: 303
Initial error: 0.1413
Final error: 0.0790
Image: 304
Initial error: 0.0938
Final error: 0.0358
Image: 305
Initial error: 0.0980
Final error: 0.0265
Image: 306
Initial error: 0.0504
Final error: 0.0381
Image: 307
Initial error: 0.0532
Final error: 0.0518
Image: 308
Initial error: 0.1361
Final error: 0.0508
Image: 309
Initial error: 0.0621
Final error: 0.0263
Image: 310
Initial error: 0.0880
Final error: 0.0364
Image: 311
Initial error: 0.1025
Final error: 0.0479
Image: 312
Initial error: 0.0863
Final error: 0.0282
Image: 313
Initial error: 0.1403
Final error: 0.0686
Image: 314
Initial error: 0.1173
Final error: 0.0400
Image: 315
Initial error: 0.0981
Final error: 0.0422
Image: 316
Initial error: 0.1342
Final error: 0.0302
Image: 317
Initial error: 0.1548
Final error: 0.0527
Image: 318
Initial error: 0.0686
Final error: 0.0503
Image: 319
Initial error: 0.0933
Final error: 0.0290
Image: 320
Initial error: 0.0571
Final error: 0.0988
Image: 321
Initial error: 0.0915
Final error: 0.0777
Image: 322
Initial error: 0.1291
Final error: 0.0494
Image: 323
Initial error: 0.1200
Final error: 0.1061
Image: 324
Initial error: 0.1173
Final error: 0.0635
Image: 325
Initial error: 0.0479
Final error: 0.0228
Image: 326
Initial error: 0.0901
Final error: 0.0904
Image: 327
Initial error: 0.0582
Final error: 0.0281
Image: 328
Initial error: 0.0629
Final error: 0.0285
Image: 329
Initial error: 0.1068
Final error: 0.0874
Image: 330
Initial error: 0.0460
Final error: 0.0280
Image: 331
Initial error: 0.0775
Final error: 0.0899
Image: 332
Initial error: 0.1022
Final error: 0.0429
Image: 333
Initial error: 0.1114
Final error: 0.0900
Image: 334
Initial error: 0.0993
Final error: 0.1256
Image: 335
Initial error: 0.0867
Final error: 0.0334
Image: 336
Initial error: 0.1043
Final error: 0.0630
Image: 337
Initial error: 0.1331
Final error: 0.0752
Image: 338
Initial error: 0.1272
Final error: 0.0332
Image: 339
Initial error: 0.1505
Final error: 0.0399
Image: 340
Initial error: 0.0650
Final error: 0.0533
Image: 341
Initial error: 0.0539
Final error: 0.0266
Image: 342
Initial error: 0.0597
Final error: 0.0446
Image: 343
Initial error: 0.0537
Final error: 0.1370
Image: 344
Initial error: 0.1059
Final error: 0.0689
Image: 345
Initial error: 0.0989
Final error: 0.0449
Image: 346
Initial error: 0.0600
Final error: 0.0378
Image: 347
Initial error: 0.0803
Final error: 0.0488
Image: 348
Initial error: 0.0658
Final error: 0.0342
Image: 349
Initial error: 0.0921
Final error: 0.0557
Image: 350
Initial error: 0.1167
Final error: 0.0872
Image: 351
Initial error: 0.0484
Final error: 0.0447
Image: 352
Initial error: 0.2006
Final error: 0.0476
Image: 353
Initial error: 0.1052
Final error: 0.0827
Image: 354
Initial error: 0.1507
Final error: 0.2511
Image: 355
Initial error: 0.0741
Final error: 0.0567
Image: 356
Initial error: 0.0456
Final error: 0.0372
Image: 357
Initial error: 0.1407
Final error: 0.0348
Image: 358
Initial error: 0.0921
Final error: 0.0699
Image: 359
Initial error: 0.0694
Final error: 0.0940
Image: 360
Initial error: 0.0620
Final error: 0.0454
Image: 361
Initial error: 0.2014
Final error: 0.0854
Image: 362
Initial error: 0.0626
Final error: 0.0494
Image: 363
Initial error: 0.0518
Final error: 0.0423
Image: 364
Initial error: 0.1218
Final error: 0.0643
Image: 365
Initial error: 0.1719
Final error: 0.0836
Image: 366
Initial error: 0.0540
Final error: 0.0517
Image: 367
Initial error: 0.0535
Final error: 0.0368
Image: 368
Initial error: 0.0548
Final error: 0.0406
Image: 369
Initial error: 0.0500
Final error: 0.0409
Image: 370
Initial error: 0.0747
Final error: 0.0446
Image: 371
Initial error: 0.1186
Final error: 0.0791
Image: 372
Initial error: 0.0511
Final error: 0.0685
Image: 373
Initial error: 0.1381
Final error: 0.0429
Image: 374
Initial error: 0.1155
Final error: 0.0653
Image: 375
Initial error: 0.0656
Final error: 0.0497
Image: 376
Initial error: 0.0362
Final error: 0.0436
Image: 377
Initial error: 0.0796
Final error: 0.0286
Image: 378
Initial error: 0.0965
Final error: 0.0771
Image: 379
Initial error: 0.0325
Final error: 0.0277
Image: 380
Initial error: 0.1028
Final error: 0.0816
Image: 381
Initial error: 0.0669
Final error: 0.0344
Image: 382
Initial error: 0.1142
Final error: 0.0385
Image: 383
Initial error: 0.0923
Final error: 0.0405
Image: 384
Initial error: 0.1341
Final error: 0.0576
Image: 385
Initial error: 0.0991
Final error: 0.0247
Image: 386
Initial error: 0.0708
Final error: 0.0369
Image: 387
Initial error: 0.0808
Final error: 0.1426
Image: 388
Initial error: 0.0820
Final error: 0.0338
Image: 389
Initial error: 0.0517
Final error: 0.0411
Image: 390
Initial error: 0.0833
Final error: 0.0732
Image: 391
Initial error: 0.1057
Final error: 0.0322
Image: 392
Initial error: 0.1076
Final error: 0.0477
Image: 393
Initial error: 0.0833
Final error: 0.0210
Image: 394
Initial error: 0.0985
Final error: 0.0456
Image: 395
Initial error: 0.2367
Final error: 0.1462
Image: 396
Initial error: 0.1140
Final error: 0.0276
Image: 397
Initial error: 0.0764
Final error: 0.0364
Image: 398
Initial error: 0.0722
Final error: 0.0521
Image: 399
Initial error: 0.1054
Final error: 0.0370
Image: 400
Initial error: 0.0707
Final error: 0.0243
Image: 401
Initial error: 0.0668
Final error: 0.0685
Image: 402
Initial error: 0.0947
Final error: 0.0422
Image: 403
Initial error: 0.1056
Final error: 0.1028
Image: 404
Initial error: 0.0834
Final error: 0.0524
Image: 405
Initial error: 0.0854
Final error: 0.0417
Image: 406
Initial error: 0.0551
Final error: 0.0506
Image: 407
Initial error: 0.0728
Final error: 0.0274
Image: 408
Initial error: 0.1235
Final error: 0.0704
Image: 409
Initial error: 0.0986
Final error: 0.0320
Image: 410
Initial error: 0.0460
Final error: 0.0436
Image: 411
Initial error: 0.0991
Final error: 0.1091
Image: 412
Initial error: 0.0797
Final error: 0.0810
Image: 413
Initial error: 0.1649
Final error: 0.0906
Image: 414
Initial error: 0.1265
Final error: 0.0331
Image: 415
Initial error: 0.1256
Final error: 0.1198
Image: 416
Initial error: 0.0618
Final error: 0.0467
Image: 417
Initial error: 0.0802
Final error: 0.0215
Image: 418
Initial error: 0.1200
Final error: 0.0474
Image: 419
Initial error: 0.1151
Final error: 0.0850
Image: 420
Initial error: 0.0941
Final error: 0.0227
Image: 421
Initial error: 0.0351
Final error: 0.0570
Image: 422
Initial error: 0.1277
Final error: 0.0544
Image: 423
Initial error: 0.0711
Final error: 0.0477
Image: 424
Initial error: 0.0544
Final error: 0.0515
Image: 425
Initial error: 0.0748
Final error: 0.0326
Image: 426
Initial error: 0.0720
Final error: 0.0869
Image: 427
Initial error: 0.0534
Final error: 0.0352
Image: 428
Initial error: 0.0944
Final error: 0.0438
Image: 429
Initial error: 0.1442
Final error: 0.0554
Image: 430
Initial error: 0.0964
Final error: 0.0209
Image: 431
Initial error: 0.0454
Final error: 0.0699
Image: 432
Initial error: 0.0835
Final error: 0.0229
Image: 433
Initial error: 0.1097
Final error: 0.0537
Image: 434
Initial error: 0.0814
Final error: 0.0669
Image: 435
Initial error: 0.1174
Final error: 0.0554
Image: 436
Initial error: 0.1477
Final error: 0.1153
Image: 437
Initial error: 0.1028
Final error: 0.0438
Image: 438
Initial error: 0.0591
Final error: 0.0302
Image: 439
Initial error: 0.0862
Final error: 0.0413
Image: 440
Initial error: 0.1783
Final error: 0.1824
Image: 441
Initial error: 0.0798
Final error: 0.0437
Image: 442
Initial error: 0.0752
Final error: 0.0460
Image: 443
Initial error: 0.0550
Final error: 0.1008
Image: 444
Initial error: 0.0726
Final error: 0.0375
Image: 445
Initial error: 0.1093
Final error: 0.1422
Image: 446
Initial error: 0.1518
Final error: 0.0959
Image: 447
Initial error: 0.0413
Final error: 0.0331
Image: 448
Initial error: 0.1061
Final error: 0.0320
Image: 449
Initial error: 0.0975
Final error: 0.1071
Image: 450
Initial error: 0.1098
Final error: 0.0245
Image: 451
Initial error: 0.1183
Final error: 0.1157
Image: 452
Initial error: 0.1048
Final error: 0.0987
Image: 453
Initial error: 0.0832
Final error: 0.0631
Image: 454
Initial error: 0.0677
Final error: 0.0414
Image: 455
Initial error: 0.1411
Final error: 0.0906
Image: 456
Initial error: 0.0604
Final error: 0.0304
Image: 457
Initial error: 0.0460
Final error: 0.0810
Image: 458
Initial error: 0.0678
Final error: 0.0411
Image: 459
Initial error: 0.1464
Final error: 0.0329
Image: 460
Initial error: 0.0678
Final error: 0.0309
Image: 461
Initial error: 0.1022
Final error: 0.0294
Image: 462
Initial error: 0.0524
Final error: 0.0603
Image: 463
Initial error: 0.1328
Final error: 0.0359
Image: 464
Initial error: 0.0723
Final error: 0.1272
Image: 465
Initial error: 0.1195
Final error: 0.1484
Image: 466
Initial error: 0.0531
Final error: 0.0311
Image: 467
Initial error: 0.0612
Final error: 0.0611
Image: 468
Initial error: 0.0657
Final error: 0.0306
Image: 469
Initial error: 0.0580
Final error: 0.0728
Image: 470
Initial error: 0.0975
Final error: 0.0660
Image: 471
Initial error: 0.1528
Final error: 0.0941
Image: 472
Initial error: 0.1286
Final error: 0.0277
Image: 473
Initial error: 0.0395
Final error: 0.0346
Image: 474
Initial error: 0.0824
Final error: 0.0320
Image: 475
Initial error: 0.0837
Final error: 0.0231
Image: 476
Initial error: 0.1259
Final error: 0.0729
Image: 477
Initial error: 0.1234
Final error: 0.0598
Image: 478
Initial error: 0.0774
Final error: 0.0309
Image: 479
Initial error: 0.0645
Final error: 0.0460
Image: 480
Initial error: 0.0331
Final error: 0.0253
Image: 481
Initial error: 0.0900
Final error: 0.0625
Image: 482
Initial error: 0.0747
Final error: 0.0332
Image: 483
Initial error: 0.1539
Final error: 0.0437
Image: 484
Initial error: 0.0653
Final error: 0.0258
Image: 485
Initial error: 0.0441
Final error: 0.0539
Image: 486
Initial error: 0.1087
Final error: 0.0806
Image: 487
Initial error: 0.1048
Final error: 0.0542
Image: 488
Initial error: 0.1061
Final error: 0.0832
Image: 489
Initial error: 0.0955
Final error: 0.0528
Image: 490
Initial error: 0.1140
Final error: 0.0277
Image: 491
Initial error: 0.0656
Final error: 0.0247
Image: 492
Initial error: 0.1318
Final error: 0.0572
Image: 493
Initial error: 0.0535
Final error: 0.0371
Image: 494
Initial error: 0.1124
Final error: 0.0571
Image: 495
Initial error: 0.0624
Final error: 0.0354
Image: 496
Initial error: 0.2569
Final error: 0.1255
Image: 497
Initial error: 0.1096
Final error: 0.0383
Image: 498
Initial error: 0.0572
Final error: 0.0800
Image: 499
Initial error: 0.0774
Final error: 0.0282
Image: 500
Initial error: 0.0876
Final error: 0.0614
Image: 501
Initial error: 0.0680
Final error: 0.0828
Image: 502
Initial error: 0.0600
Final error: 0.0470
Image: 503
Initial error: 0.0431
Final error: 0.0328
Image: 504
Initial error: 0.1788
Final error: 0.0845
Image: 505
Initial error: 0.0590
Final error: 0.0478
Image: 506
Initial error: 0.0460
Final error: 0.0297
In [11]:
np.mean([fr.final_error(error_type='rmse') for fr in fitter_results])
Out[11]:
5.4382533925833316
In [ ]:
from menpofit.visualize import visualize_fitting_results
visualize_fitting_results(fitter_results)
Content source: jalabort/alabortcvpr2015
Similar notebooks: