def start(self): env_path = self.config['path'] sys_data_path = f"{env_path['predictions']}{self.config['predictions']}/" image_ref_csv_path, ref_data_path, _, _ = PathUtils.get_paths( self.config) starting_index, ending_index = JsonLoader.get_data_size(self.config) irb = ImgRefBuilder(image_ref_csv_path) img_refs = irb.get_img_ref(starting_index, ending_index) data = MediforData.get_data(img_refs, sys_data_path, ref_data_path) self.model_scoring(data)
def start(self): img_ref_csv_path, ref_data_path, targets_path, indicators_path = PathUtils.get_paths( self.config) irb = ImgRefBuilder(img_ref_csv_path) starting_index, ending_index = JsonLoader.get_data_size(self.config) img_refs = irb.get_img_ref(starting_index, ending_index) patches_folder = self.config['path']['outputs'] + "patches/" output_dir = FolderUtils.create_patch_output_folder( self.patch_shape, self.img_downscale_factor, patches_folder, PathUtils.get_indicator_directories(indicators_path), self.config['tuning'], self.config['data_year'], self.config['data_prefix']) LogUtils.init_log(output_dir) pg = PatchGenerator(output_dir=output_dir, indicators_path=indicators_path, img_downscale_factor=self.img_downscale_factor, patch_shape=self.patch_shape, tuning=self.config["tuning"]) pg.create_img_patches(img_refs, targets_path)
def __init__(self, config, model_name=None, output_dir=None): super().__init__(config, model_name, output_dir) img_ref_csv_path, self.ref_data_path, self.targets_path, self.indicators_path = PathUtils.get_paths(self.config) self.indicator_directories = PathUtils.get_indicator_directories(self.indicators_path) self.image_downscale_factor = config['image_downscale_factor'] self._prepare_img_refs(img_ref_csv_path)