{ "cells": [ { "cell_type": "code", "execution_count": 16, "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": 17, "metadata": {}, "outputs": [], "source": [ "# setting path to results folder\n", "root_path = '../../../out/pretrained/adept_ablations/recon'\n", "\n", "# list all folders in root path that don't stat with a dot\n", "nets = ['norecon']\n", "\n", "# read pickle file\n", "tf = pd.DataFrame()\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, 'results')\n", " with open(os.path.join(path, 'trialframe.csv'), 'rb') as f:\n", " tf_temp = pd.read_csv(f, index_col=0)\n", " tf_temp['net'] = net\n", " tf = pd.concat([tf,tf_temp])\n", "\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['vanishing'] = sf['vanishing'].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", "tf['control'] = [('control' in set) for set in tf['set']]\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": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Tracking Error when visible: M: 1.75 , STD: 1.23, Count: 1563\n", "Tracking Error when occluded: M: 2.09 , STD: 1.39, Count: 486\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": 19, "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
0controlopen4710.9791670.020833
\n", "
" ], "text/plain": [ " set evalmode tracked_pos tracked_neg tracked_pos_pro \\\n", "0 control open 47 1 0.979167 \n", "\n", " tracked_neg_pro \n", "0 0.020833 " ] }, "execution_count": 19, "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 & sf.bound & sf.inimage].groupby(grouping_factors).max()\n", "ff.rename(columns = {'frame':'last_visible'}, inplace = True)\n", "sf = sf.merge(ff[['last_visible']], on=grouping_factors, how='left')\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", "sf = sf.merge(ff[['first_visible']], on=grouping_factors, how='left')\n", "\n", "# add dummy variable to sf\n", "sf['last_visible'] = (sf['last_visible'] == sf['frame'])\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']== 1) & ~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": 20, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAEmCAYAAAB20LuSAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAmQklEQVR4nO3deUCUdeLH8fcAgkcqiDPgbeZNoB0mkWm6rtfPKzXzpFYjj1WSWlcNrzwWKs0jy5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Tz31FJ9//rm7YxieRuxF3MiRI0lISOC7777Dy8uL8PBw5xkyIu506tQp59cOh4NDhw7l+JBfCo5G7CJSIH6/56nD4cDDwwM/Pz+GDx9O8+bN3R3N8HSBkogUiBkzZtC3b18SEhKoXr06x44dc3ekYkPFLiIFYurUqdStW5fExERKlizJypUrmTVrlrtjFQsqdhEpEHa7nWbNmrFx40batGlDpUqVsNls7o5VLKjYRaRAlCpVivnz57N9+3ZatmzJwoULKVOmjLtjFQsqdhEpENOmTePKlSvMnj2b8uXLk5yczPTp090dq1jQWTEiIgajEbuIiMGo2EVEDEbFLpIPx48fzzEHikhhpGIXyYdTp07x888/uzuGyC3pw1Mp1i5fvsyYMWP49ddf8fDwICgoiEmTJrFp0ybmzp1LVlYWJUuWZNSoUYSEhNCuXTuSk5Np0qQJ77//vrvji9yQRuxSrH355ZdcvnyZVatWOW8AfuzYMWbMmMG8efNYuXIlkydPZvjw4Vy9epUpU6ZQvXp1lboUaprdUYq1hx56iBkzZtC/f3/CwsJ45pln2LJlCykpKTz77LPO7Uwmk+Y6kSJDxS7FWrVq1fjyyy/Zvn073377LX/5y18YNGgQjz76KDNnznRud/r0aSwWCzt37nRfWJE80qEYKdYWL17MmDFjaNasGSNHjqRZs2ZcvHiRLVu2cOTIEQA2b95M586dycjIwNPTk6ysLDenFrk1jdilWOvatSs7duygQ4cOlCpVikqVKtG/f3/uu+8+XnzxRRwOB15eXsydO5cyZcpQu3ZtfHx86NGjB59//vkN7+kp4m46K0ZExGB0KEZExGBU7CIiBqNiFxExGBW7iIjBqNhFRAxGxS4iYjAqdhERg1Gxi4gYzP8DK9ahmaov8k8AAAAASUVORK5CYII=", "text/plain": [ "
" ] }, "metadata": {}, "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": 21, "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", " \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.7930200.9654260.6728610.6753110.96894286.044.012.030.0106.01590.02.037.00.6532570.0354030.02.00.0
surprise0.7819890.9594840.6599110.6662440.96869233.013.07.013.034.0527.02.011.00.6434450.0349900.02.00.0
\n", "
" ], "text/plain": [ " idf1 idp idr recall precision \\\n", "set \n", "control 0.793020 0.965426 0.672861 0.675311 0.968942 \n", "surprise 0.781989 0.959484 0.659911 0.666244 0.968692 \n", "\n", " num_unique_objects mostly_tracked partially_tracked mostly_lost \\\n", "set \n", "control 86.0 44.0 12.0 30.0 \n", "surprise 33.0 13.0 7.0 13.0 \n", "\n", " num_false_positives num_misses num_switches num_fragmentations \\\n", "set \n", "control 106.0 1590.0 2.0 37.0 \n", "surprise 34.0 527.0 2.0 11.0 \n", "\n", " mota motp num_transfer num_ascend num_migrate \n", "set \n", "control 0.653257 0.035403 0.0 2.0 0.0 \n", "surprise 0.643445 0.034990 0.0 2.0 0.0 " ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "af[af.index == 'OVERALL'].groupby(['set']).mean()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Gate Openings" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Percept gate openings when visible: M: 0.257 , STD: 0.237, Count: 1563\n", "Percept gate openings when occluded: M: 0.00921 , STD: 0.0524, Count: 486\n" ] } ], "source": [ "grouping = (sf.inimage & sf.bound & ~sf.occluder & sf.control)\n", "temp = sf[grouping & sf.visible]\n", "print(f'Percept gate openings when visible:' + get_stats(temp['alpha_pos'] + temp['alpha_ges']))\n", "temp = sf[grouping & ~sf.visible]\n", "print(f'Percept gate openings when occluded:' + get_stats(temp['alpha_pos'] + temp['alpha_ges']))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] } ], "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 }