def configure_generator(config: Configuration, args: argparse.Namespace) -> bool: if args.generator: config.generator = True if args.room_size: if not arg_valid("generator", args): return False config.generator_min_room_size = args.room_size[0] config.generator_max_room_size = args.room_size[1] if args.fill_rate: if not arg_valid("generator", args): return False config.generator_obstacle_fill_min = args.fill_rate[0] config.generator_obstacle_fill_max = args.fill_rate[1] if args.generatortype: if not arg_valid("generator", args): return False config.generator_gen_type = args.generatortype if args.num_maps: if not arg_valid("generator", args): return False config.generator_nr_of_examples = args.num_maps return True
config.simulator_key_frame_speed, config.simulator_key_frame_skip = ani config.simulator_write_debug_level = debug # These are for training config.generator_labelling_features = labelling[training_algo][0] config.generator_labelling_labels = labelling[training_algo][1] config.generator_single_labelling_features = labelling[training_algo][2] config.generator_single_labelling_labels = labelling[training_algo][3] config.generator_aug_labelling_features = [] config.generator_aug_labelling_labels = [] config.generator_aug_single_labelling_features = [] config.generator_aug_single_labelling_labels = [] config.generator_modify = None config.generator_show_gen_sample = show_sample_map config.generator_nr_of_examples = nbr_ex if args.full_train: config.generator = True for m in gen_maps.values(): config.generator_gen_type = m config.generator_labelling_atlases = [m + '_' + str(nbr_ex)] MainRunner(config).run() config.generator_labelling_atlases = [ m + '_' + str(nbr_ex) for m in gen_maps.values() ] # Generator config.generator = gen_start if config.generator_house_expo: