{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "9aa64ac0", "metadata": {}, "outputs": [], "source": [ "import os\n", "\n", "os.environ['TF_FORCE_GPU_ALLOW_GROWTH'] = 'true' # this is required\n", "os.environ['CUDA_VISIBLE_DEVICES'] = '1' # set to '0' for GPU0, '1' for GPU1 or '2' for GPU2. Check \"gpustat\" in a terminal." ] }, { "cell_type": "code", "execution_count": 2, "id": "d312c8e1", "metadata": {}, "outputs": [], "source": [ "glob_path = '/opt/iui-datarelease3-sose2021/*.csv'\n", "\n", "pickle_file = '../data.pickle'" ] }, { "cell_type": "code", "execution_count": 3, "id": "c04ba7f6", "metadata": { "tags": [] }, "outputs": [], "source": [ "from glob import glob\n", "import pandas as pd\n", "from tqdm import tqdm\n", "\n", "def dl_from_blob(filename, user_filter=None):\n", " \n", " dic_data = []\n", " \n", " for p in tqdm(glob(glob_path)):\n", " path = p\n", " filename = path.split('/')[-1].split('.')[0]\n", " splitname = filename.split('_')\n", " user = int(splitname[0][1:])\n", " if (user_filter):\n", " if (user != user_filter):\n", " continue\n", " scenario = splitname[1][len('Scenario'):]\n", " heightnorm = splitname[2][len('HeightNormalization'):] == 'True'\n", " armnorm = splitname[3][len('ArmNormalization'):] == 'True'\n", " rep = int(splitname[4][len('Repetition'):])\n", " session = int(splitname[5][len('Session'):])\n", " data = pd.read_csv(path)\n", " dic_data.append(\n", " {\n", " 'filename': path,\n", " 'user': user,\n", " 'scenario': scenario,\n", " 'heightnorm': heightnorm,\n", " 'armnorm': armnorm,\n", " 'rep': rep,\n", " 'session': session,\n", " 'data': data \n", " }\n", " )\n", " return dic_data" ] }, { "cell_type": "code", "execution_count": 4, "id": "45e23af8", "metadata": {}, "outputs": [], "source": [ "import pickle\n", "\n", "def save_pickle(f, structure):\n", " _p = open(f, 'wb')\n", " pickle.dump(structure, _p)\n", " _p.close()" ] }, { "cell_type": "code", "execution_count": 5, "id": "31a7d280", "metadata": {}, "outputs": [], "source": [ "def load_pickles(f) -> list:\n", " _p = open(pickle_file, 'rb')\n", " _d = pickle.load(_p)\n", " _p.close()\n", " \n", " return _d" ] }, { "cell_type": "code", "execution_count": 6, "id": "ec0dd3cb", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Loading data...\n", "../data.pickle found...\n", "CPU times: user 512 ms, sys: 2.47 s, total: 2.98 s\n", "Wall time: 2.98 s\n" ] } ], "source": [ "%%time\n", "\n", "\n", "def load_data() -> list:\n", " if os.path.isfile(pickle_file):\n", " print(f'{pickle_file} found...')\n", " return load_pickles(pickle_file)\n", " print(f'Didn\\'t find {pickle_file}...')\n", " all_data = dl_from_blob(glob_path)\n", " print(f'Creating {pickle_file}...')\n", " save_pickle(pickle_file, all_data)\n", " return all_data\n", "\n", "print(\"Loading data...\")\n", "dic_data = load_data()\n", "# plot_pd(data[0]['data'], False)" ] }, { "cell_type": "code", "execution_count": 7, "id": "2d11eb89", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "192\n" ] }, { "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", " \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", " \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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Unnamed: 0FrameIDparticipantIDScenarioHeightNormalizationArmNormalizationRepetitionLeftHandTrackingAccuracyRightHandTrackingAccuracyCenterEyeAnchor_pos_X...right_Hand_RingTip_euler_Xright_Hand_RingTip_euler_Yright_Hand_RingTip_euler_Zright_Hand_PinkyTip_pos_Xright_Hand_PinkyTip_pos_Yright_Hand_PinkyTip_pos_Zright_Hand_PinkyTip_euler_Xright_Hand_PinkyTip_euler_Yright_Hand_PinkyTip_euler_ZSession
0007SortingBlocksSceneTrueTrue1HighHigh-0.089895...307.9409320.01970195.10510.0166311.1063190.430588310.8786343.57170185.18741
1117SortingBlocksSceneTrueTrue1HighHigh-0.089738...308.1140320.34520195.51520.0072561.1454760.423464311.1056343.74560185.67171
2227SortingBlocksSceneTrueTrue1HighHigh-0.089347...308.2395320.51180195.72060.0074261.1449920.423223311.2307343.79710185.91251
3337SortingBlocksSceneTrueTrue1HighHigh-0.088938...308.3445320.66750195.98040.0076351.1445090.423137311.3370343.84570186.19851
4447SortingBlocksSceneTrueTrue1HighHigh-0.088715...308.5142320.82160196.06550.0079181.1440680.422891311.3891343.80610186.55281
..................................................................
2020202020207SortingBlocksSceneTrueTrue1HighHigh1.067835...334.317816.43365271.11871.2454570.619399-0.084547324.502926.11914271.37241
2021202120217SortingBlocksSceneTrueTrue1HighHigh1.076106...334.157315.85253271.23721.2606310.606978-0.078567324.442825.80618271.30201
2022202220227SortingBlocksSceneTrueTrue1HighHigh1.085397...334.057615.55901271.06701.2690630.599918-0.075514324.390125.65784270.95971
2023202320237SortingBlocksSceneTrueTrue1HighHigh1.096437...333.944515.22374270.91471.2789220.592047-0.071804324.332025.47795270.64351
2024202420247SortingBlocksSceneTrueTrue1HighHigh1.106890...333.758014.87231270.03831.2937650.578599-0.066561324.207725.11721269.51401
\n", "

2025 rows × 346 columns

\n", "
" ], "text/plain": [ " Unnamed: 0 FrameID participantID Scenario \\\n", "0 0 0 7 SortingBlocksScene \n", "1 1 1 7 SortingBlocksScene \n", "2 2 2 7 SortingBlocksScene \n", "3 3 3 7 SortingBlocksScene \n", "4 4 4 7 SortingBlocksScene \n", "... ... ... ... ... \n", "2020 2020 2020 7 SortingBlocksScene \n", "2021 2021 2021 7 SortingBlocksScene \n", "2022 2022 2022 7 SortingBlocksScene \n", "2023 2023 2023 7 SortingBlocksScene \n", "2024 2024 2024 7 SortingBlocksScene \n", "\n", " HeightNormalization ArmNormalization Repetition \\\n", "0 True True 1 \n", "1 True True 1 \n", "2 True True 1 \n", "3 True True 1 \n", "4 True True 1 \n", "... ... ... ... \n", "2020 True True 1 \n", "2021 True True 1 \n", "2022 True True 1 \n", "2023 True True 1 \n", "2024 True True 1 \n", "\n", " LeftHandTrackingAccuracy RightHandTrackingAccuracy \\\n", "0 High High \n", "1 High High \n", "2 High High \n", "3 High High \n", "4 High High \n", "... ... ... \n", "2020 High High \n", "2021 High High \n", "2022 High High \n", "2023 High High \n", "2024 High High \n", "\n", " CenterEyeAnchor_pos_X ... right_Hand_RingTip_euler_X \\\n", "0 -0.089895 ... 307.9409 \n", "1 -0.089738 ... 308.1140 \n", "2 -0.089347 ... 308.2395 \n", "3 -0.088938 ... 308.3445 \n", "4 -0.088715 ... 308.5142 \n", "... ... ... ... \n", "2020 1.067835 ... 334.3178 \n", "2021 1.076106 ... 334.1573 \n", "2022 1.085397 ... 334.0576 \n", "2023 1.096437 ... 333.9445 \n", "2024 1.106890 ... 333.7580 \n", "\n", " right_Hand_RingTip_euler_Y right_Hand_RingTip_euler_Z \\\n", "0 320.01970 195.1051 \n", "1 320.34520 195.5152 \n", "2 320.51180 195.7206 \n", "3 320.66750 195.9804 \n", "4 320.82160 196.0655 \n", "... ... ... \n", "2020 16.43365 271.1187 \n", "2021 15.85253 271.2372 \n", "2022 15.55901 271.0670 \n", "2023 15.22374 270.9147 \n", "2024 14.87231 270.0383 \n", "\n", " right_Hand_PinkyTip_pos_X right_Hand_PinkyTip_pos_Y \\\n", "0 0.016631 1.106319 \n", "1 0.007256 1.145476 \n", "2 0.007426 1.144992 \n", "3 0.007635 1.144509 \n", "4 0.007918 1.144068 \n", "... ... ... \n", "2020 1.245457 0.619399 \n", "2021 1.260631 0.606978 \n", "2022 1.269063 0.599918 \n", "2023 1.278922 0.592047 \n", "2024 1.293765 0.578599 \n", "\n", " right_Hand_PinkyTip_pos_Z right_Hand_PinkyTip_euler_X \\\n", "0 0.430588 310.8786 \n", "1 0.423464 311.1056 \n", "2 0.423223 311.2307 \n", "3 0.423137 311.3370 \n", "4 0.422891 311.3891 \n", "... ... ... \n", "2020 -0.084547 324.5029 \n", "2021 -0.078567 324.4428 \n", "2022 -0.075514 324.3901 \n", "2023 -0.071804 324.3320 \n", "2024 -0.066561 324.2077 \n", "\n", " right_Hand_PinkyTip_euler_Y right_Hand_PinkyTip_euler_Z Session \n", "0 343.57170 185.1874 1 \n", "1 343.74560 185.6717 1 \n", "2 343.79710 185.9125 1 \n", "3 343.84570 186.1985 1 \n", "4 343.80610 186.5528 1 \n", "... ... ... ... \n", "2020 26.11914 271.3724 1 \n", "2021 25.80618 271.3020 1 \n", "2022 25.65784 270.9597 1 \n", "2023 25.47795 270.6435 1 \n", "2024 25.11721 269.5140 1 \n", "\n", "[2025 rows x 346 columns]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "fil_dic_data = []\n", "for d in dic_data:\n", " if d['scenario'] == 'Sorting':\n", " if d['heightnorm'] == d['armnorm']:\n", " fil_dic_data.append(d)\n", "\n", "print(len(fil_dic_data))\n", "test_entry = fil_dic_data[15].copy()\n", "test_entry['data']" ] }, { "cell_type": "code", "execution_count": 81, "id": "9ee5b898", "metadata": { "tags": [] }, "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", " \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", " \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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Unnamed: 0LeftHandTrackingAccuracyRightHandTrackingAccuracyCenterEyeAnchor_pos_XCenterEyeAnchor_pos_YCenterEyeAnchor_pos_ZCenterEyeAnchor_euler_XCenterEyeAnchor_euler_YCenterEyeAnchor_euler_Zleft_OVRHandPrefab_pos_X...right_Hand_RingTip_pos_Zright_Hand_RingTip_euler_Xright_Hand_RingTip_euler_Yright_Hand_RingTip_euler_Zright_Hand_PinkyTip_pos_Xright_Hand_PinkyTip_pos_Yright_Hand_PinkyTip_pos_Zright_Hand_PinkyTip_euler_Xright_Hand_PinkyTip_euler_Yright_Hand_PinkyTip_euler_Z
00HighHigh-0.0898951.7556650.2343449.3326055.018498358.49900-0.316633...0.446973307.9409320.01970195.10510.0166311.1063190.430588310.8786343.57170185.1874
11HighHigh-0.0897381.7557320.2345429.3381915.061474358.47840-0.300754...0.440061308.1140320.34520195.51520.0072561.1454760.423464311.1056343.74560185.6717
22HighHigh-0.0893471.7557800.2347389.3436845.115413358.46080-0.300725...0.439948308.2395320.51180195.72060.0074261.1449920.423223311.2307343.79710185.9125
33HighHigh-0.0889381.7556860.2343539.3357655.173394358.46820-0.300701...0.439995308.3445320.66750195.98040.0076351.1445090.423137311.3370343.84570186.1985
44HighHigh-0.0887151.7556430.2344719.3262435.247888358.46250-0.300564...0.439725308.5142320.82160196.06550.0079181.1440680.422891311.3891343.80610186.5528
..................................................................
20202020HighHigh1.0678351.1498860.08770857.75244088.46632013.975300.684950...-0.064587334.317816.43365271.11871.2454570.619399-0.084547324.502926.11914271.3724
20212021HighHigh1.0761061.1423070.08691758.37646087.83281013.812480.696102...-0.058271334.157315.85253271.23721.2606310.606978-0.078567324.442825.80618271.3020
20222022HighHigh1.0853971.1358800.08607859.29877087.60625013.544120.702457...-0.055092334.057615.55901271.06701.2690630.599918-0.075514324.390125.65784270.9597
20232023HighHigh1.0964371.1292930.08484760.21707087.79144013.385610.709858...-0.051225333.944515.22374270.91471.2789220.592047-0.071804324.332025.47795270.6435
20242024HighHigh1.1068901.1236940.08414960.87795087.96779013.392710.720758...-0.046066333.758014.87231270.03831.2937650.578599-0.066561324.207725.11721269.5140
\n", "

2025 rows × 339 columns

\n", "
" ], "text/plain": [ " Unnamed: 0 LeftHandTrackingAccuracy RightHandTrackingAccuracy \\\n", "0 0 High High \n", "1 1 High High \n", "2 2 High High \n", "3 3 High High \n", "4 4 High High \n", "... ... ... ... \n", "2020 2020 High High \n", "2021 2021 High High \n", "2022 2022 High High \n", "2023 2023 High High \n", "2024 2024 High High \n", "\n", " CenterEyeAnchor_pos_X CenterEyeAnchor_pos_Y CenterEyeAnchor_pos_Z \\\n", "0 -0.089895 1.755665 0.234344 \n", "1 -0.089738 1.755732 0.234542 \n", "2 -0.089347 1.755780 0.234738 \n", "3 -0.088938 1.755686 0.234353 \n", "4 -0.088715 1.755643 0.234471 \n", "... ... ... ... \n", "2020 1.067835 1.149886 0.087708 \n", "2021 1.076106 1.142307 0.086917 \n", "2022 1.085397 1.135880 0.086078 \n", "2023 1.096437 1.129293 0.084847 \n", "2024 1.106890 1.123694 0.084149 \n", "\n", " CenterEyeAnchor_euler_X CenterEyeAnchor_euler_Y \\\n", "0 9.332605 5.018498 \n", "1 9.338191 5.061474 \n", "2 9.343684 5.115413 \n", "3 9.335765 5.173394 \n", "4 9.326243 5.247888 \n", "... ... ... \n", "2020 57.752440 88.466320 \n", "2021 58.376460 87.832810 \n", "2022 59.298770 87.606250 \n", "2023 60.217070 87.791440 \n", "2024 60.877950 87.967790 \n", "\n", " CenterEyeAnchor_euler_Z left_OVRHandPrefab_pos_X ... \\\n", "0 358.49900 -0.316633 ... \n", "1 358.47840 -0.300754 ... \n", "2 358.46080 -0.300725 ... \n", "3 358.46820 -0.300701 ... \n", "4 358.46250 -0.300564 ... \n", "... ... ... ... \n", "2020 13.97530 0.684950 ... \n", "2021 13.81248 0.696102 ... \n", "2022 13.54412 0.702457 ... \n", "2023 13.38561 0.709858 ... \n", "2024 13.39271 0.720758 ... \n", "\n", " right_Hand_RingTip_pos_Z right_Hand_RingTip_euler_X \\\n", "0 0.446973 307.9409 \n", "1 0.440061 308.1140 \n", "2 0.439948 308.2395 \n", "3 0.439995 308.3445 \n", "4 0.439725 308.5142 \n", "... ... ... \n", "2020 -0.064587 334.3178 \n", "2021 -0.058271 334.1573 \n", "2022 -0.055092 334.0576 \n", "2023 -0.051225 333.9445 \n", "2024 -0.046066 333.7580 \n", "\n", " right_Hand_RingTip_euler_Y right_Hand_RingTip_euler_Z \\\n", "0 320.01970 195.1051 \n", "1 320.34520 195.5152 \n", "2 320.51180 195.7206 \n", "3 320.66750 195.9804 \n", "4 320.82160 196.0655 \n", "... ... ... \n", "2020 16.43365 271.1187 \n", "2021 15.85253 271.2372 \n", "2022 15.55901 271.0670 \n", "2023 15.22374 270.9147 \n", "2024 14.87231 270.0383 \n", "\n", " right_Hand_PinkyTip_pos_X right_Hand_PinkyTip_pos_Y \\\n", "0 0.016631 1.106319 \n", "1 0.007256 1.145476 \n", "2 0.007426 1.144992 \n", "3 0.007635 1.144509 \n", "4 0.007918 1.144068 \n", "... ... ... \n", "2020 1.245457 0.619399 \n", "2021 1.260631 0.606978 \n", "2022 1.269063 0.599918 \n", "2023 1.278922 0.592047 \n", "2024 1.293765 0.578599 \n", "\n", " right_Hand_PinkyTip_pos_Z right_Hand_PinkyTip_euler_X \\\n", "0 0.430588 310.8786 \n", "1 0.423464 311.1056 \n", "2 0.423223 311.2307 \n", "3 0.423137 311.3370 \n", "4 0.422891 311.3891 \n", "... ... ... \n", "2020 -0.084547 324.5029 \n", "2021 -0.078567 324.4428 \n", "2022 -0.075514 324.3901 \n", "2023 -0.071804 324.3320 \n", "2024 -0.066561 324.2077 \n", "\n", " right_Hand_PinkyTip_euler_Y right_Hand_PinkyTip_euler_Z \n", "0 343.57170 185.1874 \n", "1 343.74560 185.6717 \n", "2 343.79710 185.9125 \n", "3 343.84570 186.1985 \n", "4 343.80610 186.5528 \n", "... ... ... \n", "2020 26.11914 271.3724 \n", "2021 25.80618 271.3020 \n", "2022 25.65784 270.9597 \n", "2023 25.47795 270.6435 \n", "2024 25.11721 269.5140 \n", "\n", "[2025 rows x 339 columns]" ] }, "execution_count": 81, "metadata": {}, "output_type": "execute_result" } ], "source": [ "def drop(entry) -> pd.DataFrame:\n", " droptable = ['participantID', 'FrameID', 'Scenario', 'HeightNormalization', 'ArmNormalization', 'Repetition', 'Session']\n", " centry = entry.copy()\n", " return centry['data'].drop(droptable, axis=1)\n", "\n", "test_entry2 = test_entry.copy()\n", "test_entry2['data'] = drop(test_entry)\n", "test_entry2['data']" ] }, { "cell_type": "code", "execution_count": 82, "id": "083ba677", "metadata": { "tags": [] }, "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", " \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", " \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", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Unnamed: 0LeftHandTrackingAccuracyRightHandTrackingAccuracyCenterEyeAnchor_pos_XCenterEyeAnchor_pos_YCenterEyeAnchor_pos_ZCenterEyeAnchor_euler_XCenterEyeAnchor_euler_YCenterEyeAnchor_euler_Zleft_OVRHandPrefab_pos_X...right_Hand_RingTip_pos_Zright_Hand_RingTip_euler_Xright_Hand_RingTip_euler_Yright_Hand_RingTip_euler_Zright_Hand_PinkyTip_pos_Xright_Hand_PinkyTip_pos_Yright_Hand_PinkyTip_pos_Zright_Hand_PinkyTip_euler_Xright_Hand_PinkyTip_euler_Yright_Hand_PinkyTip_euler_Z
001.01.0-0.0898951.7556650.2343449.3326055.018498358.49900-0.316633...0.446973307.9409320.01970195.10510.0166311.1063190.430588310.8786343.57170185.1874
111.01.0-0.0897381.7557320.2345429.3381915.061474358.47840-0.300754...0.440061308.1140320.34520195.51520.0072561.1454760.423464311.1056343.74560185.6717
221.01.0-0.0893471.7557800.2347389.3436845.115413358.46080-0.300725...0.439948308.2395320.51180195.72060.0074261.1449920.423223311.2307343.79710185.9125
331.01.0-0.0889381.7556860.2343539.3357655.173394358.46820-0.300701...0.439995308.3445320.66750195.98040.0076351.1445090.423137311.3370343.84570186.1985
441.01.0-0.0887151.7556430.2344719.3262435.247888358.46250-0.300564...0.439725308.5142320.82160196.06550.0079181.1440680.422891311.3891343.80610186.5528
..................................................................
202020201.01.01.0678351.1498860.08770857.75244088.46632013.975300.684950...-0.064587334.317816.43365271.11871.2454570.619399-0.084547324.502926.11914271.3724
202120211.01.01.0761061.1423070.08691758.37646087.83281013.812480.696102...-0.058271334.157315.85253271.23721.2606310.606978-0.078567324.442825.80618271.3020
202220221.01.01.0853971.1358800.08607859.29877087.60625013.544120.702457...-0.055092334.057615.55901271.06701.2690630.599918-0.075514324.390125.65784270.9597
202320231.01.01.0964371.1292930.08484760.21707087.79144013.385610.709858...-0.051225333.944515.22374270.91471.2789220.592047-0.071804324.332025.47795270.6435
202420241.01.01.1068901.1236940.08414960.87795087.96779013.392710.720758...-0.046066333.758014.87231270.03831.2937650.578599-0.066561324.207725.11721269.5140
\n", "

2025 rows × 339 columns

\n", "
" ], "text/plain": [ " Unnamed: 0 LeftHandTrackingAccuracy RightHandTrackingAccuracy \\\n", "0 0 1.0 1.0 \n", "1 1 1.0 1.0 \n", "2 2 1.0 1.0 \n", "3 3 1.0 1.0 \n", "4 4 1.0 1.0 \n", "... ... ... ... \n", "2020 2020 1.0 1.0 \n", "2021 2021 1.0 1.0 \n", "2022 2022 1.0 1.0 \n", "2023 2023 1.0 1.0 \n", "2024 2024 1.0 1.0 \n", "\n", " CenterEyeAnchor_pos_X CenterEyeAnchor_pos_Y CenterEyeAnchor_pos_Z \\\n", "0 -0.089895 1.755665 0.234344 \n", "1 -0.089738 1.755732 0.234542 \n", "2 -0.089347 1.755780 0.234738 \n", "3 -0.088938 1.755686 0.234353 \n", "4 -0.088715 1.755643 0.234471 \n", "... ... ... ... \n", "2020 1.067835 1.149886 0.087708 \n", "2021 1.076106 1.142307 0.086917 \n", "2022 1.085397 1.135880 0.086078 \n", "2023 1.096437 1.129293 0.084847 \n", "2024 1.106890 1.123694 0.084149 \n", "\n", " CenterEyeAnchor_euler_X CenterEyeAnchor_euler_Y \\\n", "0 9.332605 5.018498 \n", "1 9.338191 5.061474 \n", "2 9.343684 5.115413 \n", "3 9.335765 5.173394 \n", "4 9.326243 5.247888 \n", "... ... ... \n", "2020 57.752440 88.466320 \n", "2021 58.376460 87.832810 \n", "2022 59.298770 87.606250 \n", "2023 60.217070 87.791440 \n", "2024 60.877950 87.967790 \n", "\n", " CenterEyeAnchor_euler_Z left_OVRHandPrefab_pos_X ... \\\n", "0 358.49900 -0.316633 ... \n", "1 358.47840 -0.300754 ... \n", "2 358.46080 -0.300725 ... \n", "3 358.46820 -0.300701 ... \n", "4 358.46250 -0.300564 ... \n", "... ... ... ... \n", "2020 13.97530 0.684950 ... \n", "2021 13.81248 0.696102 ... \n", "2022 13.54412 0.702457 ... \n", "2023 13.38561 0.709858 ... \n", "2024 13.39271 0.720758 ... \n", "\n", " right_Hand_RingTip_pos_Z right_Hand_RingTip_euler_X \\\n", "0 0.446973 307.9409 \n", "1 0.440061 308.1140 \n", "2 0.439948 308.2395 \n", "3 0.439995 308.3445 \n", "4 0.439725 308.5142 \n", "... ... ... \n", "2020 -0.064587 334.3178 \n", "2021 -0.058271 334.1573 \n", "2022 -0.055092 334.0576 \n", "2023 -0.051225 333.9445 \n", "2024 -0.046066 333.7580 \n", "\n", " right_Hand_RingTip_euler_Y right_Hand_RingTip_euler_Z \\\n", "0 320.01970 195.1051 \n", "1 320.34520 195.5152 \n", "2 320.51180 195.7206 \n", "3 320.66750 195.9804 \n", "4 320.82160 196.0655 \n", "... ... ... \n", "2020 16.43365 271.1187 \n", "2021 15.85253 271.2372 \n", "2022 15.55901 271.0670 \n", "2023 15.22374 270.9147 \n", "2024 14.87231 270.0383 \n", "\n", " right_Hand_PinkyTip_pos_X right_Hand_PinkyTip_pos_Y \\\n", "0 0.016631 1.106319 \n", "1 0.007256 1.145476 \n", "2 0.007426 1.144992 \n", "3 0.007635 1.144509 \n", "4 0.007918 1.144068 \n", "... ... ... \n", "2020 1.245457 0.619399 \n", "2021 1.260631 0.606978 \n", "2022 1.269063 0.599918 \n", "2023 1.278922 0.592047 \n", "2024 1.293765 0.578599 \n", "\n", " right_Hand_PinkyTip_pos_Z right_Hand_PinkyTip_euler_X \\\n", "0 0.430588 310.8786 \n", "1 0.423464 311.1056 \n", "2 0.423223 311.2307 \n", "3 0.423137 311.3370 \n", "4 0.422891 311.3891 \n", "... ... ... \n", "2020 -0.084547 324.5029 \n", "2021 -0.078567 324.4428 \n", "2022 -0.075514 324.3901 \n", "2023 -0.071804 324.3320 \n", "2024 -0.066561 324.2077 \n", "\n", " right_Hand_PinkyTip_euler_Y right_Hand_PinkyTip_euler_Z \n", "0 343.57170 185.1874 \n", "1 343.74560 185.6717 \n", "2 343.79710 185.9125 \n", "3 343.84570 186.1985 \n", "4 343.80610 186.5528 \n", "... ... ... \n", "2020 26.11914 271.3724 \n", "2021 25.80618 271.3020 \n", "2022 25.65784 270.9597 \n", "2023 25.47795 270.6435 \n", "2024 25.11721 269.5140 \n", "\n", "[2025 rows x 339 columns]" ] }, "execution_count": 82, "metadata": {}, "output_type": "execute_result" } ], "source": [ "def floatize(entry):\n", " centry = entry.copy()\n", " centry['data']['LeftHandTrackingAccuracy'] = (entry['data']['LeftHandTrackingAccuracy'] == 'High') * 1.0\n", " centry['data']['RightHandTrackingAccuracy'] = (entry['data']['RightHandTrackingAccuracy'] == 'High') * 1.0\n", " return centry['data']\n", "\n", "test_entry3 = test_entry2.copy()\n", "test_entry3['data'] = floatize(test_entry2)\n", "test_entry3['data']" ] }, { "cell_type": "code", "execution_count": 83, "id": "00edea73", "metadata": {}, "outputs": [], "source": [ "# d_entry = c_entry.where(c_entry['LeftHandTrackingAccuracy'] == c_entry['RightHandTrackingAccuracy']).dropna().reset_index(drop=True)\n", "# a = entry.copy()\n", "# a['data'] = d_entry.drop(droptable, axis=1)\n", "# print(a['data'].shape)\n", "# print(a['data'].dtypes)" ] }, { "cell_type": "code", "execution_count": 84, "id": "547f63d2", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 84, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from tensorflow.keras.preprocessing import timeseries_dataset_from_array\n", "from tensorflow.keras.preprocessing.sequence import pad_sequences\n", "\n", "def slicing(entry):\n", " stride = 150\n", " \n", " entry['data'] = pad_sequences(entry['data'].to_numpy().T,\n", " maxlen=(int(entry['data'].shape[0]/stride)+1)*stride,\n", " dtype='float64',\n", " padding='pre', truncating='post'\n", " )\n", "\n", " return timeseries_dataset_from_array(\n", " data=entry['data'], \n", " targets=[entry['user'] for _ in range(entry['data'].shape[0])], \n", " sequence_length=300,\n", " sequence_stride=150, \n", " batch_size=1, \n", " seed=177013\n", " )\n", "\n", "test_entry4 = test_entry3.copy()\n", "test_entry4['data'] = slicing(test_entry3)\n", "test_entry4['data']" ] }, { "cell_type": "code", "execution_count": 86, "id": "620c529b", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "tf.Tensor(\n", "[[[ 0.000000e+00 0.000000e+00 0.000000e+00 ... 2.022000e+03\n", " 2.023000e+03 2.024000e+03]\n", " [ 0.000000e+00 0.000000e+00 0.000000e+00 ... 1.000000e+00\n", " 1.000000e+00 1.000000e+00]\n", " [ 0.000000e+00 0.000000e+00 0.000000e+00 ... 1.000000e+00\n", " 1.000000e+00 1.000000e+00]\n", " ...\n", " [ 0.000000e+00 0.000000e+00 0.000000e+00 ... 1.247579e+00\n", " 1.257665e+00 1.273240e+00]\n", " [ 0.000000e+00 0.000000e+00 0.000000e+00 ... 6.340001e-01\n", " 6.261733e-01 6.128760e-01]\n", " [ 0.000000e+00 0.000000e+00 0.000000e+00 ... -8.997461e-02\n", " -8.650930e-02 -8.193973e-02]]], shape=(1, 300, 2100), dtype=float64)\n", "tf.Tensor([7], shape=(1,), dtype=int32)\n" ] } ], "source": [ "for i,t in test_entry4['data']:\n", " print(i)\n", " print(t)" ] }, { "cell_type": "code", "execution_count": 126, "id": "4e755031", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "/opt/iui-datarelease3-sose2021/P14_ScenarioSorting_HeightNormalizationTrue_ArmNormalizationTrue_Repetition2.csv\n" ] }, { "data": { "text/plain": [ "337" ] }, "execution_count": 126, "metadata": {}, "output_type": "execute_result" } ], "source": [ "index = 1\n", "entry = fil_dic_data[index]['data']\n", "print(fil_dic_data[index]['filename'])\n", "col_of_interst = []\n", "for col in entry:\n", " if 'float' in str(entry[col].dtype):\n", " col_of_interst.append(col)\n", "len(col_of_interst)" ] }, { "cell_type": "code", "execution_count": 98, "id": "d4207627", "metadata": {}, "outputs": [], "source": [ "len_list = []\n", "for i in dic_data:\n", " len_list.append(len(i['data']))" ] }, { "cell_type": "code", "execution_count": 110, "id": "e068b158", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "count 384.000000\n", "mean 3053.768229\n", "std 2195.831831\n", "min 597.000000\n", "50% 2395.000000\n", "90% 5977.000000\n", "91% 6157.600000\n", "92% 6239.600000\n", "93% 6341.490000\n", "94% 6585.200000\n", "95% 7561.800000\n", "96% 8158.000000\n", "97% 8895.250000\n", "98% 9942.320000\n", "99% 10315.120000\n", "max 19371.000000\n", "dtype: float64" ] }, "execution_count": 110, "metadata": {}, "output_type": "execute_result" } ], "source": [ "len_series = pd.Series(len_list, dtype='int64')\n", "len_series.describe(percentiles=[x*0.01 for x in range(90,100)])" ] }, { "cell_type": "code", "execution_count": 111, "id": "84260e81", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[]" ] }, "execution_count": 111, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Z1A+gAAAACXBIWXMAAAsTAAALEwEAmpwYAAAgJUlEQVR4nO3deXxV9Z3/8dcne8hOFggQSGRHrYABt1qXKqKdkfbX0cK0v6q1daZTZ7Grjn10ZjrTdlpnOqOtU8eZqrWtC7XWUkVxqbZTHSBh3yGyZIGQkIQshKz3O3/cA15jMAFucu7yfj4e95Gzce/n5CRvTs75nu/XnHOIiEj0S/C7ABERCQ8FuohIjFCgi4jECAW6iEiMUKCLiMSIJL8+uKCgwJWWlvr18SIiUWndunVHnHOFg63zLdBLS0uprKz06+NFRKKSmR041TpdchERiREKdBGRGKFAFxGJE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5SXwRH4tqH15hg4PGM1ePOO2MGj/WO4fPAdbF8zIHSAYEelmPsrdsZsvxd253tS5dczpL35+Q8YA0wzjl3yFtVD4zzpgcbaHvi+yyPdP8OfBUIePP5wFHnXJ83H7of7xpAHDgxgHg07nsZ0Ag86l1u+m8zyyDGj7tzrg74F6AaOETwGK4jPo75CeE6xhO96YHLw0KBfhbMLBP4JfA3zrm20HUu+N9vzLUJNbM/Ahqcc+v8rsUHSQT/FP+Rc24ecIzgn98nxeJx964XLyH4H9oEIANY7GtRPorkY6xAP0NmlkwwzH/unHvWW3zYzIq99cVAg7f8VANtD2cA7khzGXCjme0HniJ42eV+INeCA4TDu/fjVAOIR+O+1wK1zrk13vwzBAM+1o/7NcA+51yjc64XeJbgz0E8HPMTwnWM67zpgcvDQoF+Bry70j8Gdjjnvh+yKnSw7FsIXls/sfzT3h3xi4FW78+3VcAiM8vzzoIWecsilnPuHufcJOdcKcEbXr91zn0SeJ3gAOHw3n0fbADxFcBSr0VEGTCd4M2iiOWcqwdqzGymt+jDwHZi/7hXAxeb2RjvZ//Efsf8MQ8RlmPsrWszs4u97+WnQ97r7Pl98yEaX8AHCf7JtRnY6L1uIHid8DVgD/AqMNbb3oAHCd7V3wKUh7zXZ4Aq73Wb3/t2mt+HK3mnlcs5BH85q4BfAKne8jRvvspbf07Iv7/X+57sIox3+kd4n+cCld6xf45gC4aYP+7APwA7ga3ATwm2VInJYw48SfBeQS/Bv8puD+cxBsq97+PbwA8ZcJP9bF569F9EJEbokouISIxQoIuIxAgFuohIjFCgi4jECAW6iEiMUKCLiMQIBbqISIz4P/znqNGDJLV6AAAAAElFTkSuQmCC\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "from matplotlib import pyplot as plt\n", "\n", "l = []\n", "ptiles = [x*0.01 for x in range(100)]\n", "for i in ptiles:\n", " l.append(len_series.quantile(i))\n", "\n", "plt.plot(l, ptiles)" ] }, { "cell_type": "code", "execution_count": 12, "id": "c4cbcf14", "metadata": {}, "outputs": [], "source": [ "def pplot(dd):\n", " x = dd.shape[0]\n", " fix = int(x/3)+1\n", " fiy = 3\n", " fig, axs = plt.subplots(fix, fiy, figsize=(3*fiy, 3*fix))\n", " \n", " for i in range(x):\n", " axs[int(i/3)][i%3].plot(dd[i])\n", " " ] }, { "cell_type": "code", "execution_count": null, "id": "3f5d854e", "metadata": {}, "outputs": [], "source": [ "pplot(x['data'][2:12])" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.8.10" } }, "nbformat": 4, "nbformat_minor": 5 }