Пример #1
0
 def test_uav123(self):
     root_dir = os.path.join(self.data_dir, 'UAV123')
     for version in ['UAV123', 'UAV20L']:
         # run experiment
         experiment = ExperimentUAV123(root_dir, version)
         experiment.run(self.tracker, visualize=False)
         # report performance
         experiment.report([self.tracker.name])
Пример #2
0
def main_uav123():
    tracker = build_tracker()
    experiment = ExperimentUAV123(root_dir=UAV123_ROOT_DIR,
                                  result_dir=RESULT_DIR,
                                  report_dir=REPORT_DIR,
                                  start_idx=args.start_idx,
                                  end_idx=args.end_idx)
    experiment.run(tracker, visualize=args.visualize_experiment)
    experiment.report([tracker.name])
Пример #3
0
def init_experiment(
        dataset_type: DatasetType, dataset_dir_path: str, results_dir_path: str,
        reports_dir_path: str):
    params = dict(
        root_dir=dataset_dir_path, result_dir=results_dir_path,
        report_dir=reports_dir_path)
    
    if dataset_type == DatasetType.OTB13:
        return ExperimentOTB(version=2013, **params)
    elif dataset_type == DatasetType.OTB15:
        return ExperimentOTB(version=2015, **params)
    elif dataset_type == DatasetType.GOT10k:
        return ExperimentGOT10k(subset='val', **params)
    elif dataset_type == DatasetType.VOT15:
        return ExperimentVOT(version=2015, **params)
    elif dataset_type == DatasetType.UAV123:
        return ExperimentUAV123(**params)
    else:
        raise ValueError(f"unsupported dataset type {dataset_type}")
Пример #4
0
        self.dir_name = os.path.join(
            '/home/william/uav123_benchmark/results/samples', vid)
        if not os.path.exists(self.dir_name):
            os.mkdir(self.dir_name)
        return self.tracker.init(self.sess, im, box, self.dir_name)

    def update(self, image):
        im = np.array(image)
        return self.tracker.track(self.sess, im, self.dir_name)


if __name__ == '__main__':
    # setup tracker
    tracker = ISiamTracker()

    # run experiments
    experiment = ExperimentUAV123('/home/william/dataset/uav123/UAV123',
                                  version='UAV123')
    experiment.run(tracker, visualize=False)

    # report performance
    experiment.report([
        tracker.name,
        #'ISiamTracker_base',
        #'ISiamTracker_nodft',
        #'ISiamTracker_nofbgs_nodft',
        #'ISiamTracker_noibgs_nodft',
        #'ISiamTracker_nobgs_nodft',
        #'ISiamTracker_dense_nobgs_nodft',
    ])
Пример #5
0
TrTracker = Tracker(args.tracker_name, args.tracker_param, args.run_id)


class GOT_Tracker(GOT_Tracker):
    def __init__(self):
        super(GOT_Tracker, self).__init__(name='GOT_Tracker')
        self.tracker = TrTracker.tracker_class(TrTracker.get_parameters())

    def init(self, image, box):
        image = np.array(image)
        self.tracker.initialize(image, box)

    def update(self, image):
        image = np.array(image)
        self.box = self.tracker.track(image)
        return self.box


if __name__ == '__main__':
    # setup tracker
    tracker = GOT_Tracker()

    # run experiments on UAV
    experiment = ExperimentUAV123(
        '/data3/wangning/UAV123',
        version='UAV123')  ### version='UAV123' 'UAV20L'
    experiment.run(tracker, visualize=False)

    # report performance
    experiment.report([tracker.name])