def get_parser() -> CfgNode:
    """ """
    parser = argparse.ArgumentParser(
        description='PyTorch Semantic Segmentation')
    parser.add_argument(
        '--config',
        type=str,
        default=f'{_ROOT}/config/test/default_config_360_ss.yaml',
        help='config file')
    parser.add_argument(
        '--file_save',
        type=str,
        default='default',
        help='eval result to save, when lightweight option is on')
    parser.add_argument(
        'opts',
        help='see config/ade20k/ade20k_pspnet50.yaml for all options',
        default=None,
        nargs=argparse.REMAINDER)  # model path is passed in
    args = parser.parse_args()
    print(args)
    assert args.config is not None
    cfg = config.load_cfg_from_cfg_file(args.config)
    if args.opts is not None:
        cfg = config.merge_cfg_from_list(cfg, args.opts)
    return cfg
def get_parser() -> CfgNode:
    """
    TODO: add to library to avoid replication.
    """
    parser = argparse.ArgumentParser(
        description='PyTorch Semantic Segmentation')
    parser.add_argument('--config',
                        type=str,
                        default='config/wilddash_18/wilddash_18_flat.yaml',
                        help='config file')
    parser.add_argument(
        '--file_save',
        type=str,
        default='default',
        help='eval result to save, when lightweight option is on')
    # parser.add_argument('--file_load', type=str, default='', help='possible additional config')
    # parser.add_argument('--checkpoint_load', type=str, default='', help='possible checkpoint loading directly specified in argument')
    parser.add_argument(
        'opts',
        help='see config/ade20k/ade20k_pspnet50.yaml for all options',
        default=None,
        nargs=argparse.REMAINDER)  # model path is passed in
    args = parser.parse_args()
    assert args.config is not None
    cfg = config.load_cfg_from_cfg_file(args.config)
    if args.opts is not None:
        cfg = config.merge_cfg_from_list(cfg, args.opts)
    return cfg
Exemple #3
0
def get_parser():
    import argparse
    from mseg_semantic.utils import config

    parser = argparse.ArgumentParser(description='PyTorch Semantic Segmentation')
    parser.add_argument('--config', type=str, default='config/ade20k/ade20k_pspnet50.yaml', help='config file')
    parser.add_argument('opts', help='see config/ade20k/ade20k_pspnet50.yaml for all options', default=None, nargs=argparse.REMAINDER)
    args = parser.parse_args()
    assert args.config is not None
    cfg = config.load_cfg_from_cfg_file(args.config)
    if args.opts is not None:
        cfg = config.merge_cfg_from_list(cfg, args.opts)
    return cfg
Exemple #4
0
def get_parser() -> CfgNode:
    """
    TODO: add to library to avoid replication.
    """
    parser = argparse.ArgumentParser(description='PyTorch Semantic Segmentation')
    parser.add_argument('--config', type=str, default='config/wilddash_18/wilddash_18_flat.yaml', help='config file')
    parser.add_argument('--file_save', type=str, default='default', help='eval result to save, when lightweight option is on')
    parser.add_argument('opts', help='see mseg_semantic/config/test/default_config_360.yaml for all options, model path should be passed in', 
        default=None, nargs=argparse.REMAINDER)
    args = parser.parse_args()
    assert args.config is not None
    cfg = config.load_cfg_from_cfg_file(args.config)
    if args.opts is not None:
        cfg = config.merge_cfg_from_list(cfg, args.opts)
    return cfg