IMPL = 'astra_cuda'
DATASET = 'ellipses'

np.random.seed(0)

# %% data
dataset = get_standard_dataset(DATASET, impl=IMPL)
ray_trafo = dataset.get_ray_trafo(impl=IMPL)
reco_space = ray_trafo.domain
test_data = dataset.get_data_pairs('test', 100)

# %% task table and reconstructors
eval_tt = TaskTable()

fbp_reconstructor = get_reference_reconstructor('fbp', DATASET)
tvadam_reconstructor = get_reference_reconstructor('tvadam', DATASET)
fbpunet_reconstructor = get_reference_reconstructor('fbpunet', DATASET)
iradonmap_reconstructor = get_reference_reconstructor('iradonmap', DATASET)
learnedgd_reconstructor = get_reference_reconstructor('learnedgd', DATASET)
learnedpd_reconstructor = get_reference_reconstructor('learnedpd', DATASET)

reconstructors = [
    fbp_reconstructor, fbpunet_reconstructor, iradonmap_reconstructor,
    learnedgd_reconstructor, learnedpd_reconstructor
]

options = {'skip_training': True}
eval_tt.append_all_combinations(reconstructors=reconstructors,
                                test_data=[test_data],
                                options=options)
Beispiel #2
0
os.environ['CUDA_VISIBLE_DEVICES'] = '0'

IMPL = 'astra_cuda'

np.random.seed(0)

# %% data
dataset = get_standard_dataset('lodopab', impl=IMPL)
ray_trafo = dataset.get_ray_trafo(impl=IMPL)
reco_space = ray_trafo.domain
test_data = dataset.get_data_pairs('test', 100)

# %% task table and reconstructors
eval_tt = TaskTable()

fbpunet_reconstructor = get_reference_reconstructor('fbpunet', 'lodopab')
iradonmap_reconstructor = get_reference_reconstructor('iradonmap', 'lodopab')
learnedgd_reconstructor = get_reference_reconstructor('learnedgd', 'lodopab')
learnedpd_reconstructor = get_reference_reconstructor('learnedpd', 'lodopab')

reconstructors = [
    fbpunet_reconstructor, iradonmap_reconstructor, learnedgd_reconstructor,
    learnedpd_reconstructor
]

options = {'skip_training': True}
eval_tt.append_all_combinations(reconstructors=reconstructors,
                                test_data=[test_data],
                                options=options)

# %% run task table