예제 #1
0
def run_tracker(tracker_name, tracker_param, run_id=None, dataset_name='otb', sequence=None, debug=0, threads=0):
    """Run tracker on sequence or dataset."""
    
    dataset = LaSOTDataset()
    if sequence is not None:
        dataset = [dataset[sequence]]

    trackers = [Tracker(tracker_name, tracker_param, run_id)]

    run_dataset(dataset, trackers, dataset_name,debug, threads)
예제 #2
0
def run_tracker(tracker_name,
                tracker_param,
                run_id=None,
                dataset_name='otb',
                sequence=None,
                debug=0,
                threads=0,
                visdom_info=None):
    """Run tracker on sequence or dataset.
    args:
        tracker_name: Name of tracking method.
        tracker_param: Name of parameter file.
        run_id: The run id.
        dataset_name: Name of dataset (otb, nfs, uav, tpl, vot, tn, gott, gotv, lasot).
        sequence: Sequence number or name.
        debug: Debug level.
        threads: Number of threads.
        visdom_info: Dict optionally containing 'use_visdom', 'server' and 'port' for Visdom visualization.
    """

    visdom_info = {} if visdom_info is None else visdom_info

    if dataset_name == 'otb':
        dataset = OTBDataset()
    elif dataset_name == 'nfs':
        dataset = NFSDataset()
    elif dataset_name == 'uav':
        dataset = UAVDataset()
    elif dataset_name == 'tpl':
        dataset = TPLDataset()
    elif dataset_name == 'tplnootb':
        dataset = TPLDatasetNoOtb()
    elif dataset_name == 'vot':
        dataset = VOTDataset()
    elif dataset_name == 'tn':
        dataset = TrackingNetDataset()
    elif dataset_name == 'gott':
        dataset = GOT10KDatasetTest()
    elif dataset_name == 'gotv':
        dataset = GOT10KDatasetVal()
    elif dataset_name == 'gotlv':
        dataset = GOT10KDatasetLTRVal()
    elif dataset_name == 'lasot':
        dataset = LaSOTDataset()
    else:
        raise ValueError('Unknown dataset name')

    if sequence is not None:
        dataset = [dataset[sequence]]

    trackers = [Tracker(tracker_name, tracker_param, run_id)]

    run_dataset(dataset, trackers, debug, threads, visdom_info=visdom_info)
예제 #3
0
def run_tracker(tracker_name,
                tracker_param,
                run_id=None,
                dataset_name='otb',
                sequence=None,
                debug=0,
                threads=0):
    """Run tracker on sequence or dataset.
    args:
        tracker_name: Name of tracking method.
        tracker_param: Name of parameter file.
        run_id: The run id.
        dataset_name: Name of dataset (otb, nfs, uav, tpl, vot, tn, gott, gotv, lasot).
        sequence: Sequence number or name.
        debug: Debug level.
        threads: Number of threads.
    """
    if dataset_name == 'otb':
        dataset = OTBDataset()
    elif dataset_name == 'nfs':
        dataset = NFSDataset()
    elif dataset_name == 'uav':
        dataset = UAVDataset()
    elif dataset_name == 'tpl':
        dataset = TPLDataset()
    elif dataset_name == 'vot':
        dataset = VOTDataset()
    elif dataset_name == 'vot18':
        dataset = VOT18Dataset()
    elif dataset_name == 'otb_vot':
        dataset = OTB100Dataset()
    elif dataset_name == 'tn':
        dataset = TrackingNetDataset()
    elif dataset_name == 'gott':
        dataset = GOT10KDatasetTest()
    elif dataset_name == 'gotv':
        dataset = GOT10KDatasetVal()
    elif dataset_name == 'gotlv':
        dataset = GOT10KDatasetLTRVal()
    elif dataset_name == 'lasot':
        dataset = LaSOTDataset()
    else:
        raise ValueError('Unknown dataset name')

    if sequence is not None:
        dataset = [dataset[sequence]]

    trackers = [Tracker(tracker_name, tracker_param, run_id)]

    run_dataset(dataset, trackers, debug, threads)
예제 #4
0
             precision_ret.update(ret)
     benchmark.show_result(success_ret,
                           precision_ret,
                           show_video_level=args.show_video_level)
     if args.vis:
         # for attr, videos in dataset.attr.items():
         video_list = [seq.name for seq in dataset]
         draw_success_precision(success_ret,
                                name=args.dataset,
                                videos=video_list,
                                attr='ALL',
                                precision_ret=precision_ret)
 elif 'LaSOT' == args.dataset:
     # dataset = LaSOTDataset(args.dataset, root)
     # dataset.set_tracker(tracker_dir, trackers)
     dataset = LaSOTDataset()
     benchmark = OPEBenchmark(dataset, tracker_name, tracker_params)
     success_ret = {}
     # success_ret = benchmark.eval_success(trackers)
     with Pool(processes=args.num) as pool:
         for ret in tqdm(pool.imap_unordered(benchmark.eval_success,
                                             tracker_params),
                         desc='eval success',
                         total=len(tracker_params),
                         ncols=100):
             success_ret.update(ret)
     precision_ret = {}
     with Pool(processes=args.num) as pool:
         for ret in tqdm(pool.imap_unordered(benchmark.eval_precision,
                                             tracker_params),
                         desc='eval precision',