Пример #1
0
def build_siamfcpp_tester(task_cfg):
    # build model
    model = model_builder.build("track", task_cfg.model)
    # build pipeline
    pipeline = pipeline_builder.build("track", task_cfg.pipeline, model)
    # build tester
    testers = tester_builder("track", task_cfg.tester, "tester", pipeline)
    return testers
Пример #2
0
def build_siamfcpp_tester(task_cfg):
    parsed_args = parser.parse_args()
    # build model
    model = model_builder.build("track", task_cfg.model)
    # build pipeline
    pipeline = pipeline_builder.build("track", task_cfg.pipeline, model)
    # build tester
    testers = tester_builder(parsed_args.video, "track", task_cfg.tester,
                             "tester", pipeline)
    return testers
Пример #3
0
def build_sat_tester(task_cfg):
    # build model
    tracker_model = model_builder.build("track", task_cfg.tracker_model)
    tracker = pipeline_builder.build("track",
                                     task_cfg.tracker_pipeline,
                                     model=tracker_model)
    segmenter = model_builder.build('vos', task_cfg.segmenter)
    # build pipeline
    pipeline = pipeline_builder.build('vos',
                                      task_cfg.pipeline,
                                      segmenter=segmenter,
                                      tracker=tracker)
    # build tester
    testers = tester_builder('vos', task_cfg.tester, "tester", pipeline)
    return testers
Пример #4
0
                        help='experiment configuration')

    return parser


if __name__ == '__main__':
    # parsing
    parser = make_parser()
    parsed_args = parser.parse_args()

    # experiment config
    exp_cfg_path = osp.realpath(parsed_args.config)
    root_cfg.merge_from_file(exp_cfg_path)
    logger.info("Load experiment config. at: %s" % exp_cfg_path)

    # resolve config
    task, task_cfg = specify_task(root_cfg)
    task_cfg.freeze()

    # build model
    model = model_builder.build_model(task, task_cfg.model)
    # build pipeline
    pipeline = pipeline_builder.build_pipeline('track', task_cfg.pipeline)
    pipeline.set_model(model)

    # build tester
    testers = tester_builder(task, task_cfg, "tester", pipeline=pipeline)
    # start engine
    for tester in testers:
        tester.test()
Пример #5
0
    # resolve config
    root_cfg = complete_path_wt_root_in_cfg(root_cfg, ROOT_PATH)
    root_cfg = root_cfg.test
    task, task_cfg = specify_task(root_cfg)
    task_cfg.freeze()

    if task == 'track':
        # build model
        model = model_builder.build(task, task_cfg.model)
        # build pipeline
        pipeline = pipeline_builder.build('track',
                                          task_cfg.pipeline,
                                          model=model)
        # build tester
        testers = tester_builder(task, task_cfg.tester, "tester", pipeline)

    elif task == 'vos':
        # build model
        tracker = model_builder.build("track_vos", task_cfg.tracker)
        segmenter = model_builder.build('vos', task_cfg.segmenter)
        # build pipeline
        pipeline = pipeline_builder.build('vos',
                                          task_cfg.pipeline,
                                          segmenter=segmenter,
                                          tracker=tracker)
        # build tester
        testers = tester_builder(task, task_cfg.tester, "tester", pipeline)

    for tester in testers:
        tester.test()