コード例 #1
0
def mergefolds(config_path):
    # 03a
    conf = u.load_config(config_path)
    u.set_filehandler(conf)

    logger.info('ARGV: {}'.format(str(sys.argv)))
    merge_folds(conf, nfolds=conf.num_folds)
コード例 #2
0
def evaltest(config_path, fold):
    # 02
    conf = u.load_config(config_path)
    u.set_filehandler(conf)

    logger.info('ARGV: {}'.format(str(sys.argv)))
    eval_test(conf, fold, nfolds=1)
コード例 #3
0
def ensemble_th06(config_path):
    # 03a
    conf = u.load_config(config_path)
    u.set_filehandler(conf)

    logger.info('ARGV: {}'.format(str(sys.argv)))

    conf.modelname = conf.modelname + '_th06'
    conf.skeleton_thresh = 0.6

    run_skeletonize(conf)
    cleaning_graph(conf)
    infer_speed(conf)
    make_sub(conf)
    make_sub_debug(conf)
コード例 #4
0
def makegraph(config_path):
    # 04, 05, 06, 07: skelton, simplify, infer_speed, sub
    conf = u.load_config(config_path)
    u.set_filehandler(conf)

    logger.info('ARGV: {}'.format(str(sys.argv)))

    # Output: ske, sknw_gpickle, wkt
    # Required time with single process: 30min -> (multiproc: 5min)
    run_skeletonize(conf)

    # Output: graphs
    # Required time with single process: 7min -> (multiproc: 2min)
    cleaning_graph(conf)

    # Output: graphs_speed
    # Required time with single process: 2min
    infer_speed(conf)

    # Output: solution
    # Required time with single process: 0min
    make_sub(conf)
    make_sub_debug(conf)
コード例 #5
0
def ensemble(config_path):
    # 03a
    conf = u.load_config(config_path)
    u.set_filehandler(conf)

    logger.info('ARGV: {}'.format(str(sys.argv)))
    ensemble_merge_folds(conf)

    # Output: ske, sknw_gpickle, wkt
    # Required time with single process: 30min -> (multiproc: 5min)
    run_skeletonize(conf)

    # Output: graphs
    # Required time with single process: 7min -> (multiproc: 2min)
    cleaning_graph(conf)

    # Output: graphs_speed
    # Required time with single process: 2min
    infer_speed(conf)

    # Output: solution
    # Required time with single process: 0min
    make_sub(conf)
    make_sub_debug(conf)
コード例 #6
0
def main(config_path, fold):
    conf = u.load_config(config_path)
    u.set_filehandler(conf)

    logger.info('ARGV: {}'.format(str(sys.argv)))
    train(conf, fold)