{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import seaborn as sns\n", "import warnings\n", "import scipy.stats as stats\n", "import os\n", "\n", "warnings.simplefilter(action='ignore', category=FutureWarning)\n", "pd.options.mode.chained_assignment = None \n", "plt.style.use('ggplot')\n", "sns.color_palette(\"Paired\");\n", "sns.set_theme();" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Data Loading" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "# setting path to results folder\n", "root_path = '../../out/pretrained/adept/savi/results/'\n", "\n", "# list all folders in root path that don't stat with a dot\n", "nets = [f for f in os.listdir(root_path) if not f.startswith('.')]\n", "\n", "# read pickle file\n", "sf = pd.DataFrame()\n", "af = pd.DataFrame()\n", "\n", "# load statistics files from nets\n", "for net in nets:\n", " path = os.path.join(root_path, net, 'control', 'statistics',)\n", " with open(os.path.join(path, 'slotframe.csv'), 'rb') as f:\n", " sf_temp = pd.read_csv(f, index_col=0)\n", " sf_temp['net'] = net\n", " sf = pd.concat([sf,sf_temp])\n", "\n", " with open(os.path.join(path, 'accframe.csv'), 'rb') as f:\n", " af_temp = pd.read_csv(f, index_col=0)\n", " af_temp['net'] = net\n", " af = pd.concat([af,af_temp])\n", "\n", "# cast variables\n", "sf['visible'] = sf['visible'].astype(bool)\n", "sf['bound'] = sf['bound'].astype(bool)\n", "sf['occluder'] = sf['occluder'].astype(bool)\n", "sf['inimage'] = sf['inimage'].astype(bool)\n", "sf['alpha_pos'] = 1-sf['alpha_pos']\n", "sf['alpha_ges'] = 1-sf['alpha_ges']\n", "\n", "# scale to percentage\n", "sf['TE'] = sf['TE'] * 100\n", "\n", "# add surprise as dummy code\n", "sf['control'] = [('control' in set) for set in sf['set']]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Calculate Tracking Error (TE)" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Tracking Error when visible: M: 26.7 , STD: 12.6, Count: 1100\n", "Tracking Error when occluded: M: 19.1 , STD: 9.74, Count: 220\n" ] } ], "source": [ "grouping = (sf.inimage & sf.bound & ~sf.occluder & sf.control)\n", "\n", "def get_stats(col):\n", " return f' M: {col.mean():.3} , STD: {col.std():.3}, Count: {col.count()}'\n", "\n", "# When Visible\n", "temp = sf[grouping & sf.visible]\n", "print(f'Tracking Error when visible:' + get_stats(temp['TE']))\n", "\n", "# When Occluded\n", "temp = sf[grouping & ~sf.visible]\n", "print(f'Tracking Error when occluded:' + get_stats(temp['TE']))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Calculate Succesfull Trackings (TE)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
setevalmodetracked_postracked_negtracked_pos_protracked_neg_pro
0controlcontrol1300.0322580.967742
\n", "
" ], "text/plain": [ " set evalmode tracked_pos tracked_neg tracked_pos_pro \\\n", "0 control control 1 30 0.032258 \n", "\n", " tracked_neg_pro \n", "0 0.967742 " ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# succesfull trackings: In the last visible moment of the target, the slot was less than 10% away from the target\n", "# determine last visible frame numeric\n", "grouping_factors = ['net','set','evalmode','scene','slot']\n", "ff = sf[sf.visible].groupby(grouping_factors).max()\n", "ff.rename(columns = {'frame':'last_visible'}, inplace = True)\n", "ff = ff[['last_visible']]\n", "\n", "# add dummy variable to sf\n", "sf = sf.merge(ff, on=grouping_factors, how='left')\n", "sf['last_visible'] = (sf['last_visible'] == sf['frame'])\n", "\n", "# same for first bound frame\n", "ff = sf[sf.visible & sf.bound & sf.inimage].groupby(grouping_factors).min()\n", "ff.rename(columns = {'frame':'first_visible'}, inplace = True)\n", "ff = ff[['first_visible']]\n", "\n", "# add dummy variable to sf\n", "sf = sf.merge(ff, on=grouping_factors, how='left')\n", "\n", "# extract the trials where the target was last visible and threshold the TE\n", "ff = sf[sf['last_visible']] \n", "ff['tracked_pos'] = (ff['TE'] < 10)\n", "ff['tracked_neg'] = (ff['TE'] >= 10)\n", "\n", "# fill NaN with 0\n", "sf = sf.merge(ff[grouping_factors + ['tracked_pos', 'tracked_neg']], on=grouping_factors, how='left')\n", "sf['tracked_pos'].fillna(False, inplace=True)\n", "sf['tracked_neg'].fillna(False, inplace=True)\n", "\n", "# Aggreagte over all scenes\n", "temp = sf[(sf['frame']== 15) & ~sf.occluder & sf.control & (sf.first_visible < 20)]\n", "temp = temp.groupby(['set', 'evalmode']).sum()\n", "temp = temp[['tracked_pos', 'tracked_neg']]\n", "temp = temp.reset_index()\n", "\n", "temp['tracked_pos_pro'] = temp['tracked_pos'] / (temp['tracked_pos'] + temp['tracked_neg'])\n", "temp['tracked_neg_pro'] = temp['tracked_neg'] / (temp['tracked_pos'] + temp['tracked_neg'])\n", "\n", "temp" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Mostly Tracked stats" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAEgCAYAAACgiViPAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAf40lEQVR4nO3de5zM9eLH8dfMXhDrumMvjkjqcxIhUSeUonJJOUeq0/0iRUjhlMuRk6SDJNXZkhX5HXWUEiWVRFJyC5X6FLmEdazddVmWtTvz+2OXM7t27Qyzze7X+/l4eDz2O9/vfOdt2LePz3y/n3X5fD5ERMQ53OEOICIioaViFxFxGBW7iIjDqNhFRBxGxS4i4jCRYX79Ck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3aRPLOBRkB7YInf4znAqLAkEjlFGrGL+DHGVLPW7gt3DpHToRG7SEHdjDHPATXyt12Az1obEcZMIkFRsYsUNAJoZ639PtxBRE6VblASKWinSl3KO43YRQpabYx5B/gEOHzsQWvtG+GLJBIcFbtIQdWAA+Qt/nWMD1CxS7mhq2JECjHGRAGGvIHP99banDBHEgmKil3EjzGmBXnXtKeR9xlUHPBna+03YQ0mEgRNxYgUNAm45ViRG2MuA14EWoU1lUgQdFWMSEFV/Efn1trlQMUw5hEJmopdpKB0Y8yNxzaMMd3Im5YRKTc0FSNSUC/gA2NMMvl3nQKXhzeSSHA0YhcpqBNwCKgHXAWkAu3CGUgkWCp2kYJ6Aa2ttQetteuBFkC/MGcSCYqKXaSgKCDbbzsb/QQlKWc0xy5S0BxgkTFmFnmF3h14P6yJRIKkG5RECjHG3ARcCRwFvrDWzglvIpHgqNhFRBxGc+wiIg6jYhcRcRgVu0gQjDHnGGNmhzuHyMmo2EWCU4+8JX1Fyix9eCpnNGNMFeB14DzAC6wGHgS6AMOBaPLuRB0ErAAsUIe8q2WuC0dmkZJoxC5nuj8DMdbaZkDL/MfOBZ4BOltrm5N3N+q75K3y2BPYpFKXskw3KMmZ7kvgGWPMYuBTYCJwDZAAfGbM8VkXL9AwDPlEgqYRu5zRrLWbySvsMUBVYCEQAXxmrW127BdwGfB92IKKBEHFLmc0Y0xv8ubYP7HWPg58DNQErjXG/DH/mM7AeqASkEPeejIiZZY+PJUzmjGmMjAVuIi8D0m3AfcBHYBh5K3JngMMsNYuNcbUBD4HjgCXWmv1DSRljopdRMRhNBUjIuIwKnYREYdRsYuIOIyKXUTEYVTsIiIOo2IXEXEYFbuIiMOo2EVEHOb/ATOom5O2pBONAAAAAElFTkSuQmCC", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "temp = af[af.index == 'OVERALL']\n", "temp['mostly_tracked'] = temp['mostly_tracked'] / temp['num_unique_objects']\n", "temp['partially_tracked'] = temp['partially_tracked'] / temp['num_unique_objects']\n", "temp['mostly_lost'] = temp['mostly_lost'] / temp['num_unique_objects']\n", "g = temp[['mostly_tracked', 'partially_tracked', 'mostly_lost','set']].set_index(['set']).groupby(['set']).mean().plot(kind='bar', stacked=True);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# MOTA " ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
idf1idpidrrecallprecisionnum_unique_objectsmostly_trackedpartially_trackedmostly_lostnum_false_positivesnum_missesnum_switchesnum_fragmentationsmotamotpnum_transfernum_ascendnum_migrate
set
control0.4624030.3278230.784430.8678530.36268786.054.031.01.08482.0735.076.021.0-0.6708020.08286116.058.00.0
\n", "
" ], "text/plain": [ " idf1 idp idr recall precision num_unique_objects \\\n", "set \n", "control 0.462403 0.327823 0.78443 0.867853 0.362687 86.0 \n", "\n", " mostly_tracked partially_tracked mostly_lost num_false_positives \\\n", "set \n", "control 54.0 31.0 1.0 8482.0 \n", "\n", " num_misses num_switches num_fragmentations mota motp \\\n", "set \n", "control 735.0 76.0 21.0 -0.670802 0.082861 \n", "\n", " num_transfer num_ascend num_migrate \n", "set \n", "control 16.0 58.0 0.0 " ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "af[af.index == 'OVERALL'].groupby(['set']).mean()" ] } ], "metadata": { "kernelspec": { "display_name": "loci23", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.16" } }, "nbformat": 4, "nbformat_minor": 2 }