Skip to content

Commit

Permalink
small fix evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterBin-IIAU committed Mar 26, 2021
1 parent 4b3ac02 commit 822d1ee
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 124 deletions.
13 changes: 2 additions & 11 deletions lib/test/evaluation/tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from lib.utils.lmdb_utils import decode_img


def trackerlist(name: str, parameter_name: str, run_ids = None, display_name: str = None,
def trackerlist(name: str, parameter_name: str, dataset_name: str, run_ids = None, display_name: str = None,
result_only=False):
"""Generate list of trackers.
args:
Expand All @@ -19,7 +19,7 @@ def trackerlist(name: str, parameter_name: str, run_ids = None, display_name: st
"""
if run_ids is None or isinstance(run_ids, int):
run_ids = [run_ids]
return [Tracker(name, parameter_name, run_id, display_name, result_only) for run_id in run_ids]
return [Tracker(name, parameter_name, dataset_name, run_id, display_name, result_only) for run_id in run_ids]


class Tracker:
Expand Down Expand Up @@ -129,15 +129,6 @@ def _store_outputs(tracker_out: dict, defaults=None):
_store_outputs(out, init_default)

for frame_num, frame_path in enumerate(seq.frames[1:], start=1):
while True:
if not self.pause_mode:
break
elif self.step:
self.step = False
break
else:
time.sleep(0.1)

image = self._read_image(frame_path)

start_time = time.time()
Expand Down
11 changes: 5 additions & 6 deletions tracking/analysis_results.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import _init_paths
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = [14, 8]
plt.rcParams['figure.figsize'] = [8, 8]

from lib.test.analysis.plot_results import plot_results, print_results, print_per_sequence_results
from lib.test.evaluation import Tracker, get_dataset, trackerlist
from lib.test.evaluation import get_dataset, trackerlist

trackers = []


trackers.extend(trackerlist(name='stark_s', parameter_name='baseline',
run_ids=None, display_name='STARK-ST50'))
trackers.extend(trackerlist(name='stark_st', parameter_name='baseline_R101', dataset_name='lasot',
run_ids=None, display_name='STARK-ST101'))

dataset = get_dataset('lasot')
# dataset = get_dataset('otb')
plot_results(trackers, dataset, 'LaSOT', merge_results=True, plot_types=('success'),
plot_results(trackers, dataset, 'LaSOT', merge_results=True, plot_types=('success', 'norm_prec'),
skip_missing_seq=False, force_evaluation=True, plot_bin_gap=0.05)
print_results(trackers, dataset, 'LaSOT', merge_results=True, plot_types=('success', 'prec', 'norm_prec'))
# print_per_sequence_results(trackers, dataset, report_name="debug")
28 changes: 0 additions & 28 deletions tracking/analysis_results_ITP.py

This file was deleted.

79 changes: 0 additions & 79 deletions tracking/pre_read_datasets.py

This file was deleted.

0 comments on commit 822d1ee

Please sign in to comment.