def initialC(self): data = ConfigParser() data.read('validationData/initial_constants.ini') name = self.name + '-'\ + repr(self.index[0]) + '-' + repr(self.index[1]) C = [] for i in range(4): C.append((float)(data.get(name, 'C' + repr(i + 1)))) return C
def read_config(self): """ Read config from config file """ conf = ConfigParser() conf.read(self.configfile) self.host = conf.get("jobs", "host") self.queue = conf.get("jobs", "queue") self.username = conf.get("credentials", "username") self.password = conf.get("credentials", "password")
from help_functions import * # extract_patches.py from extract_patches import recompone from extract_patches import recompone_overlap from extract_patches import paint_border from extract_patches import kill_border from extract_patches import pred_only_FOV from extract_patches import get_data_testing from extract_patches import get_data_testing_overlap # pre_processing.py from pre_processing import my_PreProc #config file to read from config = ConfigParser() config.read('configuration.txt') #=========================================== #run the training on invariant or local path_data = config.get('data paths', 'path_local') #original test images (for FOV selection) DRIVE_test_imgs_original = path_data + config.get('data paths', 'test_imgs_original') test_imgs_orig = load_hdf5(DRIVE_test_imgs_original) full_img_height = test_imgs_orig.shape[2] full_img_width = test_imgs_orig.shape[3] #the border masks provided by the DRIVE DRIVE_test_border_masks = path_data + config.get('data paths', 'test_border_masks') test_border_masks = load_hdf5(DRIVE_test_border_masks) # dimension of the patches patch_height = config.getint('data attributes', 'patch_height') patch_width = config.getint('data attributes', 'patch_width')