Skip to content

Commit

Permalink
added avist evaluation scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
2006pmach committed Aug 28, 2022
1 parent def333e commit da789d1
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pytracking/analysis/extract_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ def calc_seq_err_robust(pred_bb, anno_bb, dataset, target_visible=None):

if target_visible is not None:
target_visible = target_visible.bool()
valid = ((anno_bb[:, 2:] > 0.0).sum(1) == 2) & target_visible
valid = ((anno_bb > 0.0).sum(1) == 4) & target_visible
else:
valid = ((anno_bb[:, 2:] > 0.0).sum(1) == 2)
valid = ((anno_bb > 0.0).sum(1) == 4)

err_center = calc_err_center(pred_bb, anno_bb)
err_center_normalized = calc_err_center(pred_bb, anno_bb, normalized=True)
Expand Down
7 changes: 6 additions & 1 deletion pytracking/analysis/plot_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ def get_plot_draw_styles():
{'color': (0.6, 0.3, 0.9), 'line_style': '-'},
{'color': (0.4, 0.7, 0.1), 'line_style': '-'},
{'color': (0.2, 0.1, 0.7), 'line_style': '-'},
{'color': (0.7, 0.6, 0.2), 'line_style': '-'}]
{'color': (0.7, 0.6, 0.2), 'line_style': '-'},
{'color': (255.0 / 255.0, 102.0 / 255.0, 102.0 / 255.0), 'line_style': '-'},
{'color': (153.0 / 255.0, 255.0 / 255.0, 153.0 / 255.0), 'line_style': '-'},
{'color': (102.0 / 255.0, 102.0 / 255.0, 255.0 / 255.0), 'line_style': '-'},
{'color': (255.0 / 255.0, 192.0 / 255.0, 203.0 / 255.0), 'line_style': '-'},
]

return plot_draw_style

Expand Down
142 changes: 142 additions & 0 deletions pytracking/notebooks/analyze_avist_results.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Generating Results on Datasets\n",
"\n",
"Please download the results from [here](https://drive.google.com/open?id=1Sacgh5TZVjfpanmwCFvKkpnOA7UHZCY0) and the AVisT dataset from [here](https://sites.google.com/view/avist-benchmark) and adapt the file `pytracking/evaluation/local.py`."
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
}
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%load_ext autoreload\n",
"%autoreload 2\n",
"%matplotlib inline\n",
"import sys\n",
"import matplotlib.pyplot as plt\n",
"plt.rcParams['figure.figsize'] = [14, 8]\n",
"\n",
"sys.path.append('../..')\n",
"from pytracking.analysis.plot_results import plot_results, print_results\n",
"from pytracking.evaluation import get_dataset, trackerlist"
]
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"trackers = []\n",
"trackers.extend(trackerlist('atom', 'default', range(0, 5), 'ATOM'))\n",
"trackers.extend(trackerlist('dimp', 'dimp18', range(0,5), 'DiMP18'))\n",
"trackers.extend(trackerlist('dimp', 'dimp50', range(0, 5), 'DiMP-50'))\n",
"trackers.extend(trackerlist('dimp', 'prdimp18', range(0, 5), 'PrDiMP-18'))\n",
"trackers.extend(trackerlist('dimp', 'prdimp50', range(0, 5), 'PrDiMP-50'))\n",
"trackers.extend(trackerlist('dimp', 'super_dimp', range(0, 5), 'Super DiMP'))\n",
"trackers.extend(trackerlist('kys', 'default', range(0, 5), 'KYS'))\n",
"trackers.extend(trackerlist('tomp', 'tomp101', 0, 'ToMP-101'))\n",
"trackers.extend(trackerlist('tomp', 'tomp50', 0, 'ToMP-50'))\n",
"trackers.extend(trackerlist('keep_track', 'default_fast', range(0, 5), 'KeepTrack'))\n",
"trackers.extend(trackerlist('alpha_refine', 'super_dimp_seg_refine_box', range(0, 5), 'AlphaRefine'))\n",
"trackers.extend(trackerlist('stark_st', 'baseline_R101', None, 'STARK-ST-101'))\n",
"trackers.extend(trackerlist('stark_st', 'baseline', None, 'STARK-ST-50'))\n",
"trackers.extend(trackerlist('transt', 'transt50', None, 'TransT'))\n",
"trackers.extend(trackerlist('mixformer_online', 'baseline', None, 'MixFormer-22k'))\n",
"trackers.extend(trackerlist('mixformer_online', 'baseline_1k', None, 'MixFormer-1k'))\n",
"trackers.extend(trackerlist('mixformer_online', 'baseline_large', None, 'MixFormerL-22k'))\n",
"trackers.extend(trackerlist('trdimp', 'trdimp_lasot', range(3), 'TrDiMP'))\n",
"trackers.extend(trackerlist('trdimp', 'trsiam', range(3), 'TrSiam'))\n",
"trackers.extend(trackerlist('siamrpn_pp', 'siamrpn_r50_l234_dwxcorr_otb', None, 'SiamRPN++'))\n",
"trackers.extend(trackerlist('siammask', 'siammask_r50_l3', None, 'SiamMask'))\n",
"trackers.extend(trackerlist('siamban', 'siamban_r50_l234_otb', None, 'SiamBAN'))\n",
"trackers.extend(trackerlist('ocean', 'online', None, 'Ocean'))\n",
"\n",
"plot_results(trackers, get_dataset('avist'), 'avist', merge_results=True, force_evaluation=True,\n",
" skip_missing_seq=False, exclude_invalid_frames=False, plot_types=('success'))"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"trackers = []\n",
"trackers.extend(trackerlist('atom', 'default', range(0, 5), 'Atom'))\n",
"trackers.extend(trackerlist('dimp', 'dimp18', range(0, 5), 'DiMP-18'))\n",
"trackers.extend(trackerlist('dimp', 'dimp50', range(0, 5), 'DiMP-50'))\n",
"trackers.extend(trackerlist('dimp', 'prdimp18', range(0, 5), 'PrDiMP-18'))\n",
"trackers.extend(trackerlist('dimp', 'prdimp50', range(0, 5), 'PrDiMP-50'))\n",
"trackers.extend(trackerlist('dimp', 'super_dimp', range(0, 5), 'Super DiMP'))\n",
"trackers.extend(trackerlist('kys', 'default', range(0, 5), 'KYS'))\n",
"trackers.extend(trackerlist('tomp', 'tomp101', 0, 'ToMP-101'))\n",
"trackers.extend(trackerlist('tomp', 'tomp50', 0, 'ToMP-50'))\n",
"trackers.extend(trackerlist('keep_track', 'default_fast', range(0, 5), 'KeepTrack'))\n",
"trackers.extend(trackerlist('alpha_refine', 'super_dimp_seg_refine_box', range(0, 5), 'ARBoxRefine'))\n",
"trackers.extend(trackerlist('alpha_refine', 'super_dimp_seg_box_from_seg', range(0, 5), 'ARSegToBox'))\n",
"trackers.extend(trackerlist('stark_st', 'baseline_R101', None, 'STARK-ST-101'))\n",
"trackers.extend(trackerlist('stark_st', 'baseline', None, 'STARK-ST-50'))\n",
"trackers.extend(trackerlist('transt', 'transt50', None, 'TransT'))\n",
"trackers.extend(trackerlist('mixformer_online', 'baseline', None, 'MixFormer-22k'))\n",
"trackers.extend(trackerlist('mixformer_online', 'baseline_1k', None, 'MixFormer-1k'))\n",
"trackers.extend(trackerlist('mixformer_online', 'baseline_large', None, 'MixFormerL-22k'))\n",
"trackers.extend(trackerlist('trdimp', 'trdimp', range(3), 'TrDiMP'))\n",
"trackers.extend(trackerlist('trdimp', 'trdimp_lasot', range(3), 'TrDiMP-LaSOT'))\n",
"trackers.extend(trackerlist('trdimp', 'trsiam', range(3), 'TrSiam'))\n",
"trackers.extend(trackerlist('trdimp', 'trsiam_lasot', range(3), 'TrSiam-LaSOT'))\n",
"trackers.extend(trackerlist('siamrpn_pp', 'siamrpn_r50_l234_dwxcorr_otb', None, 'SiamRPN++'))\n",
"trackers.extend(trackerlist('siammask', 'siammask_r50_l3', None, 'SiamMask'))\n",
"trackers.extend(trackerlist('siamban', 'siamban_r50_l234_otb', None, 'SiamBAN'))\n",
"trackers.extend(trackerlist('ocean', 'online', None, 'Ocean'))\n",
"\n",
"print_results(trackers, get_dataset('avist'), 'avist', merge_results=True, force_evaluation=True,\n",
" skip_missing_seq=False, exclude_invalid_frames=False, plot_types=('success'))"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}

0 comments on commit da789d1

Please sign in to comment.