예제 #1
0
def test_consistency_uncertainty():
    print 'here'
    pass
    contracts.disable_all()
    symdds = 'sym-dpchain1-120'
    print('instancing dds %s' % symdds)
    dds = get_conftools_discdds().instance(symdds)
    shape = dds.get_shape()
    d1f = dds.actions[0].get_diffeo2d_forward()
    d1b = dds.actions[0].get_diffeo2d_backward()
    
    fb = Diffeomorphism2D.compose(d1f, d1b)
    bf = Diffeomorphism2D.compose(d1b, d1f)
    identity = Diffeomorphism2D.identity(shape)
    print Diffeomorphism2D.distance_L2_infow(d1f, identity)
    print Diffeomorphism2D.distance_L2_infow(d1b, identity)
    print Diffeomorphism2D.distance_L2_infow(fb, identity)
    print Diffeomorphism2D.distance_L2_infow(bf, identity)

    action = dds.actions[0]
    action2 = consistency_based_uncertainty(action, None)

    r = Report(symdds)
    r.text('symdds', symdds)
    with r.subsection('action') as sub:
        action.display(sub)
    with r.subsection('action2') as sub:
        action2.display(sub)
#         
#     with r.subsection('misc') as sub:
#         d = d1f.get_discretized_diffeo()
#         f = sub.figure()
#         f.array_as_image('d0', d[:, :, 0])
#         f.array_as_image('d1', d[:, :, 1])
#         
        
#     with r.subsection('d1f') as sub:
#         d1f.display(sub)
#     with r.subsection('d1b') as sub:
#         d1b.display(sub)
# 
#     with r.subsection('fb') as sub:
#         fb.display(sub)
#     with r.subsection('bf') as sub:
#         bf.display(sub)
    
    r.to_html('test_consistency_uncertainty.html')
예제 #2
0
from comptests.registrar import comptests_for_all, comptests_for_all_pairs
from diffeo2dds.configuration.config_master import (
    get_conftools_discdds, get_conftools_symdds,
    get_conftools_uncertain_image_distances, get_conftools_uncertain_images,
    get_conftools_diffeo_action_distances)

for_all_diffeo_systems = comptests_for_all(get_conftools_discdds())
for_all_sym_diffeo_systems = comptests_for_all(get_conftools_symdds())
for_all_uncertain_images = comptests_for_all(get_conftools_uncertain_images())
for_all_uncertain_images_distances = comptests_for_all(
    get_conftools_uncertain_image_distances())
for_all_diffeo_action_distances = comptests_for_all(
    get_conftools_diffeo_action_distances())

dad = get_conftools_diffeo_action_distances()
discdds = get_conftools_discdds()

for_all_pairs_discdds_distances = comptests_for_all_pairs(discdds, dad)
예제 #3
0
from comptests.registrar import comptests_for_all, comptests_for_all_pairs
from diffeo2dds.configuration.config_master import (get_conftools_discdds,
    get_conftools_symdds, get_conftools_uncertain_image_distances,
    get_conftools_uncertain_images, get_conftools_diffeo_action_distances)


for_all_diffeo_systems = comptests_for_all(get_conftools_discdds())
for_all_sym_diffeo_systems = comptests_for_all(get_conftools_symdds())
for_all_uncertain_images = comptests_for_all(get_conftools_uncertain_images())
for_all_uncertain_images_distances = comptests_for_all(get_conftools_uncertain_image_distances())
for_all_diffeo_action_distances = comptests_for_all(get_conftools_diffeo_action_distances())

dad = get_conftools_diffeo_action_distances()
discdds = get_conftools_discdds() 

for_all_pairs_discdds_distances = comptests_for_all_pairs(discdds, dad)