Beispiel #1
0
import numpy as np
import lasagne as nn
import utils_lung
import os

# TODO: IMPORT A CORRECT PATCH CLASSIFICATION MODEL HERE
seg_config_name = 'dsb_s2_p8a1'

# TODO: IMPORT A CORRECT PATCH CLASSIFICATION MODEL HERE
import configs_fpred_patch.luna_c3 as patch_class_config

p_transform = patch_class_config.p_transform

data_prep_function = patch_class_config.partial(
    patch_class_config.data_prep_function,
    p_transform_augment=None,
    p_transform=p_transform,
    world_coord_system=False,
    luna_origin=None)

rng = patch_class_config.rng

# candidates after segmentations path
predictions_dir = utils.get_dir_path('model-predictions',
                                     pathfinder.METADATA_PATH)
segmentation_outputs_path = predictions_dir + '/%s' % seg_config_name
id2candidates_path = utils_lung.get_candidates_paths(segmentation_outputs_path)

# filter our those, who are already generated
predictions_dir = utils.get_dir_path('model-predictions', pathfinder.METADATA_PATH) \
                  + '/' + utils.get_script_name(__file__)
exclude_pids = utils_lung.get_generated_pids(predictions_dir)
import numpy as np
import lasagne as nn
import utils_lung
import os

# TODO: IMPORT A CORRECT PATCH CLASSIFICATION MODEL HERE
seg_config_name = 'dsb_s2_p8a1_ls_elias'

# TODO: IMPORT A CORRECT PATCH CLASSIFICATION MODEL HERE
import configs_fpred_patch.luna_c3 as patch_class_config

p_transform = patch_class_config.p_transform

data_prep_function = patch_class_config.partial(patch_class_config.data_prep_function,
                                                p_transform_augment=None,
                                                p_transform=p_transform,
                                                world_coord_system=False,
                                                luna_origin=None)

rng = patch_class_config.rng

# candidates after segmentations path
predictions_dir = utils.get_dir_path('model-predictions', pathfinder.METADATA_PATH)
segmentation_outputs_path = predictions_dir + '/%s' % seg_config_name
id2candidates_path = utils_lung.get_candidates_paths(segmentation_outputs_path)

# filter our those, who are already generated
predictions_dir = utils.get_dir_path('model-predictions', pathfinder.METADATA_PATH)
outputs_path = predictions_dir + '/dsb_c3_s2_p8a1_ls_elias'  # TODO write it here correctly
exclude_pids = []
if os.path.isdir(outputs_path):