{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Goal of this notebook: implement some basic RNN/LSTM/GRU to _forecast_ trajectories based on VIRAT and/or the custom _hof_ dataset." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/ruben/suspicion/trap/.venv/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", " from .autonotebook import tqdm as notebook_tqdm\n" ] } ], "source": [ "import numpy as np\n", "import torch\n", "import matplotlib.pyplot as plt # Visualization \n", "import torch.nn as nn\n", "import pandas_helper_calc # noqa # provides df.calc.derivative()\n", "import pandas as pd\n", "import cv2\n", "import pathlib\n", "from tqdm.autonotebook import tqdm" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "FPS = 12\n", "# SRC_CSV = \"EXPERIMENTS/hofext-maskrcnn/all.txt\"\n", "# SRC_CSV = \"EXPERIMENTS/raw/generated/train/tracks.txt\"\n", "SRC_CSV = \"EXPERIMENTS/raw/hof-meter-maskrcnn2/train/tracks.txt\"\n", "SRC_CSV = \"EXPERIMENTS/20240426-hof-yolo/train/tracked.txt\"\n", "SRC_CSV = \"EXPERIMENTS/raw/hof2/train/tracked.txt\"\n", "# SRC_H = \"../DATASETS/hof/webcam20231103-2-homography.txt\"\n", "SRC_H = None\n", "CACHE_DIR = \"EXPERIMENTS/cache/hof2/\"\n", "SMOOTHING = True # hof-yolo is already smoothed, hof2 isn't\n", "SMOOTHING_WINDOW=3 #2" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "in_fields = ['proj_x', 'proj_y', 'vx', 'vy', 'ax', 'ay']\n", "# out_fields = ['v', 'heading']\n", "# velocity cannot be negative, and heading is circular (modulo), this makes it harder to optimise than a linear space, so try to use components\n", "# an we can use simple MSE loss (I guess?)\n", "out_fields = ['vx', 'vy']\n", "window = int(FPS*1.5)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "cuda\n" ] } ], "source": [ "# Set device\n", "device = \"cuda\" if torch.cuda.is_available() else \"cpu\"\n", "print(device)\n", "\n", "# Hyperparameters\n", "input_size = len(in_fields)\n", "hidden_size = 256\n", "num_layers = 3\n", "output_size = len(out_fields)\n", "learning_rate = 0.005 #0.01 #0.005\n", "batch_size = 256\n", "num_epochs = 1000" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "cache_path = pathlib.Path(CACHE_DIR)\n", "cache_path.mkdir(parents=True, exist_ok=True)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Samping 1/5, of 412098 items\n", "Done sampling kept 83726 items\n" ] } ], "source": [ "from pathlib import Path\n", "from trap.tools import load_tracks_from_csv\n", "\n", "data = load_tracks_from_csv(Path(SRC_CSV), FPS, 2, 5 )" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | frame_id | \n", "track_id | \n", "l | \n", "t | \n", "w | \n", "h | \n", "x | \n", "y | \n", "state | \n", "diff | \n", "... | \n", "dx | \n", "dy | \n", "vx | \n", "vy | \n", "ax | \n", "ay | \n", "v | \n", "a | \n", "heading | \n", "d_heading | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
194 | \n", "606.0 | \n", "4 | \n", "1593.885864 | \n", "782.814819 | \n", "145.704346 | \n", "195.380432 | \n", "12.897830 | \n", "10.750061 | \n", "2.0 | \n", "NaN | \n", "... | \n", "0.201965 | \n", "-0.291350 | \n", "0.484716 | \n", "-0.699240 | \n", "-1.622919 | \n", "-1.732144 | \n", "0.850815 | \n", "1.399195 | \n", "304.729842 | \n", "-101.772559 | \n", "
199 | \n", "611.0 | \n", "4 | \n", "1563.890015 | \n", "700.710510 | \n", "137.461304 | \n", "190.194855 | \n", "13.099794 | \n", "10.458712 | \n", "1.0 | \n", "5.0 | \n", "... | \n", "0.201965 | \n", "-0.291350 | \n", "0.484716 | \n", "-0.699240 | \n", "-1.622919 | \n", "-1.732144 | \n", "0.850815 | \n", "1.399195 | \n", "304.729842 | \n", "-101.772559 | \n", "
204 | \n", "616.0 | \n", "4 | \n", "1529.469727 | \n", "635.622498 | \n", "129.342651 | \n", "194.191528 | \n", "13.020002 | \n", "9.866642 | \n", "2.0 | \n", "5.0 | \n", "... | \n", "-0.079792 | \n", "-0.592069 | \n", "-0.191501 | \n", "-1.420966 | \n", "-1.622919 | \n", "-1.732144 | \n", "1.433812 | \n", "1.399195 | \n", "262.324609 | \n", "-101.772559 | \n", "
209 | \n", "621.0 | \n", "4 | \n", "1474.449341 | \n", "569.387634 | \n", "128.099854 | \n", "199.766357 | \n", "12.965776 | \n", "9.301442 | \n", "2.0 | \n", "5.0 | \n", "... | \n", "-0.054226 | \n", "-0.565200 | \n", "-0.130143 | \n", "-1.356479 | \n", "0.147259 | \n", "0.154769 | \n", "1.362708 | \n", "-0.170650 | \n", "264.519715 | \n", "5.268254 | \n", "
214 | \n", "626.0 | \n", "4 | \n", "1443.123535 | \n", "518.907043 | \n", "120.022461 | \n", "202.566772 | \n", "12.642992 | \n", "8.976624 | \n", "2.0 | \n", "5.0 | \n", "... | \n", "-0.322784 | \n", "-0.324818 | \n", "-0.774681 | \n", "-0.779564 | \n", "-1.546892 | \n", "1.384597 | \n", "1.099023 | \n", "-0.632844 | \n", "225.179993 | \n", "-94.415332 | \n", "
219 | \n", "631.0 | \n", "4 | \n", "1398.944946 | \n", "461.813049 | \n", "106.391357 | \n", "193.476410 | \n", "12.465588 | \n", "8.557788 | \n", "2.0 | \n", "5.0 | \n", "... | \n", "-0.177404 | \n", "-0.418836 | \n", "-0.425771 | \n", "-1.005205 | \n", "0.837386 | \n", "-0.541539 | \n", "1.091659 | \n", "-0.017675 | \n", "247.044148 | \n", "52.473972 | \n", "
224 | \n", "636.0 | \n", "4 | \n", "1353.237793 | \n", "438.118896 | \n", "91.444336 | \n", "170.930664 | \n", "12.128433 | \n", "8.052323 | \n", "2.0 | \n", "5.0 | \n", "... | \n", "-0.337155 | \n", "-0.505465 | \n", "-0.809172 | \n", "-1.213117 | \n", "-0.920163 | \n", "-0.498987 | \n", "1.458222 | \n", "0.879752 | \n", "236.295957 | \n", "-25.795658 | \n", "
229 | \n", "641.0 | \n", "4 | \n", "1272.791992 | \n", "408.827759 | \n", "104.274536 | \n", "180.414551 | \n", "11.689648 | \n", "7.684636 | \n", "2.0 | \n", "5.0 | \n", "... | \n", "-0.438785 | \n", "-0.367687 | \n", "-1.053084 | \n", "-0.882448 | \n", "-0.585388 | \n", "0.793604 | \n", "1.373936 | \n", "-0.202286 | \n", "219.961870 | \n", "-39.201809 | \n", "
234 | \n", "646.0 | \n", "4 | \n", "1198.965820 | \n", "407.952759 | \n", "103.282104 | \n", "167.306580 | \n", "11.207276 | \n", "7.476216 | \n", "2.0 | \n", "5.0 | \n", "... | \n", "-0.482372 | \n", "-0.208420 | \n", "-1.157693 | \n", "-0.500209 | \n", "-0.251064 | \n", "0.917374 | \n", "1.261136 | \n", "-0.270721 | \n", "203.367915 | \n", "-39.825493 | \n", "
239 | \n", "651.0 | \n", "4 | \n", "1156.309570 | \n", "415.743408 | \n", "97.628784 | \n", "158.774811 | \n", "10.884154 | \n", "7.514692 | \n", "2.0 | \n", "5.0 | \n", "... | \n", "-0.323122 | \n", "0.038476 | \n", "-0.775493 | \n", "0.092343 | \n", "0.917282 | \n", "1.422125 | \n", "0.780971 | \n", "-1.152395 | \n", "173.209381 | \n", "-72.380481 | \n", "
244 | \n", "656.0 | \n", "4 | \n", "1094.440430 | \n", "443.849915 | \n", "107.938110 | \n", "177.703979 | \n", "10.544492 | \n", "7.870090 | \n", "2.0 | \n", "5.0 | \n", "... | \n", "-0.339661 | \n", "0.355398 | \n", "-0.815187 | \n", "0.852955 | \n", "-0.095267 | \n", "1.825468 | \n", "1.179857 | \n", "0.957326 | \n", "133.703018 | \n", "-94.815270 | \n", "
249 | \n", "661.0 | \n", "4 | \n", "1072.595093 | \n", "481.461945 | \n", "118.452148 | \n", "205.365173 | \n", "10.486504 | \n", "8.287758 | \n", "2.0 | \n", "5.0 | \n", "... | \n", "-0.057989 | \n", "0.417668 | \n", "-0.139173 | \n", "1.002404 | \n", "1.622435 | \n", "0.358678 | \n", "1.012019 | \n", "-0.402811 | \n", "97.904355 | \n", "-85.916792 | \n", "
254 | \n", "666.0 | \n", "4 | \n", "1086.627930 | \n", "526.733154 | \n", "105.444458 | \n", "189.750610 | \n", "10.498393 | \n", "8.684043 | \n", "2.0 | \n", "5.0 | \n", "... | \n", "0.011889 | \n", "0.396285 | \n", "0.028534 | \n", "0.951083 | \n", "0.402496 | \n", "-0.123170 | \n", "0.951511 | \n", "-0.145220 | \n", "88.281546 | \n", "-23.094741 | \n", "
259 | \n", "671.0 | \n", "4 | \n", "1099.592285 | \n", "584.216675 | \n", "114.395874 | \n", "218.003479 | \n", "10.492767 | \n", "9.267106 | \n", "2.0 | \n", "5.0 | \n", "... | \n", "-0.005626 | \n", "0.583063 | \n", "-0.013502 | \n", "1.399352 | \n", "-0.100887 | \n", "1.075845 | \n", "1.399417 | \n", "1.074975 | \n", "90.552815 | \n", "5.451045 | \n", "
264 | \n", "676.0 | \n", "4 | \n", "1144.484782 | \n", "642.779582 | \n", "96.750326 | \n", "180.744690 | \n", "10.484691 | \n", "9.582745 | \n", "1.0 | \n", "5.0 | \n", "... | \n", "-0.008077 | \n", "0.315639 | \n", "-0.019384 | \n", "0.757534 | \n", "-0.014116 | \n", "-1.540364 | \n", "0.757782 | \n", "-1.539925 | \n", "91.465753 | \n", "2.191052 | \n", "
269 | \n", "681.0 | \n", "4 | \n", "1179.532959 | \n", "682.365540 | \n", "107.764282 | \n", "200.651733 | \n", "10.698373 | \n", "9.950516 | \n", "2.0 | \n", "5.0 | \n", "... | \n", "0.213682 | \n", "0.367771 | \n", "0.512837 | \n", "0.882650 | \n", "1.277331 | \n", "0.300278 | \n", "1.020820 | \n", "0.631291 | \n", "59.842534 | \n", "-75.895726 | \n", "
16 rows × 24 columns
\n", "\n", " | \n", " | l | \n", "t | \n", "w | \n", "h | \n", "x | \n", "y | \n", "state | \n", "
---|---|---|---|---|---|---|---|---|
track_id | \n", "frame_id | \n", "\n", " | \n", " | \n", " | \n", " | \n", " | \n", " | \n", " |
1 | \n", "342 | \n", "1393.736572 | \n", "0.000000 | \n", "67.613647 | \n", "121.391151 | \n", "1363.3164 | \n", "232.92647 | \n", "2 | \n", "
343 | \n", "1391.775879 | \n", "0.852371 | \n", "78.562622 | \n", "141.050934 | \n", "1359.1885 | \n", "266.06586 | \n", "2 | \n", "|
346 | \n", "1392.164551 | \n", "7.758987 | \n", "85.757324 | \n", "154.357971 | \n", "1355.7444 | \n", "297.67404 | \n", "2 | \n", "|
347 | \n", "1393.844849 | \n", "12.691238 | \n", "86.482910 | \n", "156.264786 | \n", "1355.2312 | \n", "308.20670 | \n", "2 | \n", "|
348 | \n", "1394.839111 | \n", "15.621338 | \n", "84.763428 | \n", "154.584396 | \n", "1354.9246 | \n", "310.09225 | \n", "2 | \n", "|
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
5030 | \n", "32691 | \n", "1708.213379 | \n", "749.260376 | \n", "133.839966 | \n", "182.405396 | \n", "1402.5426 | \n", "1075.20870 | \n", "2 | \n", "
32692 | \n", "1707.651855 | \n", "748.997437 | \n", "134.013672 | \n", "182.391296 | \n", "1402.2948 | \n", "1074.97230 | \n", "2 | \n", "|
32720 | \n", "1700.379639 | \n", "750.314697 | \n", "128.792603 | \n", "181.589783 | \n", "1395.7992 | \n", "1074.27320 | \n", "2 | \n", "|
32721 | \n", "1701.722412 | \n", "751.000488 | \n", "125.286865 | \n", "180.867615 | \n", "1395.5424 | \n", "1074.20560 | \n", "2 | \n", "|
32722 | \n", "1702.384766 | \n", "750.754517 | \n", "123.435425 | \n", "180.945618 | \n", "1395.4082 | \n", "1074.06500 | \n", "2 | \n", "
326960 rows × 7 columns
\n", "\n", " | frame_id | \n", "track_id | \n", "l | \n", "t | \n", "w | \n", "h | \n", "x | \n", "y | \n", "state | \n", "diff | \n", "x_raw | \n", "y_raw | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "9.0 | \n", "1.0 | \n", "0.000000 | \n", "565.566162 | \n", "88.795326 | \n", "173.917542 | \n", "0.855100 | \n", "7.136193 | \n", "2.0 | \n", "NaN | \n", "0.881595 | \n", "7.341152 | \n", "
1 | \n", "10.0 | \n", "1.0 | \n", "0.000000 | \n", "565.116699 | \n", "88.801704 | \n", "171.334290 | \n", "0.873132 | \n", "7.235233 | \n", "2.0 | \n", "1.0 | \n", "0.870703 | \n", "7.309168 | \n", "
2 | \n", "11.0 | \n", "1.0 | \n", "0.000000 | \n", "564.874573 | \n", "90.596596 | \n", "177.199951 | \n", "0.890957 | \n", "7.328989 | \n", "2.0 | \n", "1.0 | \n", "0.901374 | \n", "7.370044 | \n", "
3 | \n", "12.0 | \n", "1.0 | \n", "0.000000 | \n", "564.874268 | \n", "90.928131 | \n", "183.125732 | \n", "0.907784 | \n", "7.418187 | \n", "2.0 | \n", "1.0 | \n", "0.924360 | \n", "7.432365 | \n", "
4 | \n", "13.0 | \n", "1.0 | \n", "0.000000 | \n", "569.931213 | \n", "86.213280 | \n", "180.774292 | \n", "0.923439 | \n", "7.505012 | \n", "2.0 | \n", "1.0 | \n", "0.906583 | \n", "7.456334 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
320183 | \n", "60159.0 | \n", "3632.0 | \n", "1830.709717 | \n", "651.257446 | \n", "150.202515 | \n", "157.239746 | \n", "14.840476 | \n", "9.786501 | \n", "2.0 | \n", "NaN | \n", "15.214551 | \n", "10.027093 | \n", "
320184 | \n", "60160.0 | \n", "3632.0 | \n", "1834.013672 | \n", "649.612122 | \n", "153.686646 | \n", "160.874023 | \n", "15.033432 | \n", "9.870472 | \n", "2.0 | \n", "1.0 | \n", "15.244872 | \n", "10.047117 | \n", "
320185 | \n", "60161.0 | \n", "3632.0 | \n", "1845.373047 | \n", "651.249756 | \n", "147.178589 | \n", "153.729248 | \n", "15.211560 | \n", "9.943236 | \n", "2.0 | \n", "1.0 | \n", "15.318496 | \n", "10.015218 | \n", "
320186 | \n", "60162.0 | \n", "3632.0 | \n", "1857.388916 | \n", "650.908203 | \n", "136.407349 | \n", "142.354614 | \n", "15.377673 | \n", "10.008965 | \n", "2.0 | \n", "1.0 | \n", "15.400203 | \n", "9.935355 | \n", "
320187 | \n", "60163.0 | \n", "3632.0 | \n", "1862.792725 | \n", "658.719971 | \n", "141.984253 | \n", "149.052307 | \n", "15.538255 | \n", "10.075935 | \n", "2.0 | \n", "1.0 | \n", "15.416893 | \n", "10.051785 | \n", "
320188 rows × 12 columns
\n", "\n", " | frame_id | \n", "track_id | \n", "l | \n", "t | \n", "w | \n", "h | \n", "x | \n", "y | \n", "state | \n", "diff | \n", "x_raw | \n", "y_raw | \n", "dt | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "9.0 | \n", "1 | \n", "0.000000 | \n", "565.566162 | \n", "88.795326 | \n", "173.917542 | \n", "0.855100 | \n", "7.136193 | \n", "2.0 | \n", "NaN | \n", "0.881595 | \n", "7.341152 | \n", "NaN | \n", "
1 | \n", "10.0 | \n", "1 | \n", "0.000000 | \n", "565.116699 | \n", "88.801704 | \n", "171.334290 | \n", "0.873132 | \n", "7.235233 | \n", "2.0 | \n", "1.0 | \n", "0.870703 | \n", "7.309168 | \n", "0.083333 | \n", "
2 | \n", "11.0 | \n", "1 | \n", "0.000000 | \n", "564.874573 | \n", "90.596596 | \n", "177.199951 | \n", "0.890957 | \n", "7.328989 | \n", "2.0 | \n", "1.0 | \n", "0.901374 | \n", "7.370044 | \n", "0.083333 | \n", "
3 | \n", "12.0 | \n", "1 | \n", "0.000000 | \n", "564.874268 | \n", "90.928131 | \n", "183.125732 | \n", "0.907784 | \n", "7.418187 | \n", "2.0 | \n", "1.0 | \n", "0.924360 | \n", "7.432365 | \n", "0.083333 | \n", "
4 | \n", "13.0 | \n", "1 | \n", "0.000000 | \n", "569.931213 | \n", "86.213280 | \n", "180.774292 | \n", "0.923439 | \n", "7.505012 | \n", "2.0 | \n", "1.0 | \n", "0.906583 | \n", "7.456334 | \n", "0.083333 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
320183 | \n", "60159.0 | \n", "3632 | \n", "1830.709717 | \n", "651.257446 | \n", "150.202515 | \n", "157.239746 | \n", "14.840476 | \n", "9.786501 | \n", "2.0 | \n", "NaN | \n", "15.214551 | \n", "10.027093 | \n", "NaN | \n", "
320184 | \n", "60160.0 | \n", "3632 | \n", "1834.013672 | \n", "649.612122 | \n", "153.686646 | \n", "160.874023 | \n", "15.033432 | \n", "9.870472 | \n", "2.0 | \n", "1.0 | \n", "15.244872 | \n", "10.047117 | \n", "0.083333 | \n", "
320185 | \n", "60161.0 | \n", "3632 | \n", "1845.373047 | \n", "651.249756 | \n", "147.178589 | \n", "153.729248 | \n", "15.211560 | \n", "9.943236 | \n", "2.0 | \n", "1.0 | \n", "15.318496 | \n", "10.015218 | \n", "0.083333 | \n", "
320186 | \n", "60162.0 | \n", "3632 | \n", "1857.388916 | \n", "650.908203 | \n", "136.407349 | \n", "142.354614 | \n", "15.377673 | \n", "10.008965 | \n", "2.0 | \n", "1.0 | \n", "15.400203 | \n", "9.935355 | \n", "0.083333 | \n", "
320187 | \n", "60163.0 | \n", "3632 | \n", "1862.792725 | \n", "658.719971 | \n", "141.984253 | \n", "149.052307 | \n", "15.538255 | \n", "10.075935 | \n", "2.0 | \n", "1.0 | \n", "15.416893 | \n", "10.051785 | \n", "0.083333 | \n", "
320188 rows × 13 columns
\n", "\n", " | frame_id | \n", "track_id | \n", "l | \n", "t | \n", "w | \n", "h | \n", "x | \n", "y | \n", "state | \n", "diff | \n", "x_raw | \n", "y_raw | \n", "dt | \n", "proj_x | \n", "proj_y | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "9.0 | \n", "1 | \n", "0.000000 | \n", "565.566162 | \n", "88.795326 | \n", "173.917542 | \n", "0.855100 | \n", "7.136193 | \n", "2.0 | \n", "NaN | \n", "0.881595 | \n", "7.341152 | \n", "NaN | \n", "0.855100 | \n", "7.136193 | \n", "
1 | \n", "10.0 | \n", "1 | \n", "0.000000 | \n", "565.116699 | \n", "88.801704 | \n", "171.334290 | \n", "0.873132 | \n", "7.235233 | \n", "2.0 | \n", "1.0 | \n", "0.870703 | \n", "7.309168 | \n", "0.083333 | \n", "0.873132 | \n", "7.235233 | \n", "
2 | \n", "11.0 | \n", "1 | \n", "0.000000 | \n", "564.874573 | \n", "90.596596 | \n", "177.199951 | \n", "0.890957 | \n", "7.328989 | \n", "2.0 | \n", "1.0 | \n", "0.901374 | \n", "7.370044 | \n", "0.083333 | \n", "0.890957 | \n", "7.328989 | \n", "
3 | \n", "12.0 | \n", "1 | \n", "0.000000 | \n", "564.874268 | \n", "90.928131 | \n", "183.125732 | \n", "0.907784 | \n", "7.418187 | \n", "2.0 | \n", "1.0 | \n", "0.924360 | \n", "7.432365 | \n", "0.083333 | \n", "0.907784 | \n", "7.418187 | \n", "
4 | \n", "13.0 | \n", "1 | \n", "0.000000 | \n", "569.931213 | \n", "86.213280 | \n", "180.774292 | \n", "0.923439 | \n", "7.505012 | \n", "2.0 | \n", "1.0 | \n", "0.906583 | \n", "7.456334 | \n", "0.083333 | \n", "0.923439 | \n", "7.505012 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
320183 | \n", "60159.0 | \n", "3632 | \n", "1830.709717 | \n", "651.257446 | \n", "150.202515 | \n", "157.239746 | \n", "14.840476 | \n", "9.786501 | \n", "2.0 | \n", "NaN | \n", "15.214551 | \n", "10.027093 | \n", "NaN | \n", "14.840476 | \n", "9.786501 | \n", "
320184 | \n", "60160.0 | \n", "3632 | \n", "1834.013672 | \n", "649.612122 | \n", "153.686646 | \n", "160.874023 | \n", "15.033432 | \n", "9.870472 | \n", "2.0 | \n", "1.0 | \n", "15.244872 | \n", "10.047117 | \n", "0.083333 | \n", "15.033432 | \n", "9.870472 | \n", "
320185 | \n", "60161.0 | \n", "3632 | \n", "1845.373047 | \n", "651.249756 | \n", "147.178589 | \n", "153.729248 | \n", "15.211560 | \n", "9.943236 | \n", "2.0 | \n", "1.0 | \n", "15.318496 | \n", "10.015218 | \n", "0.083333 | \n", "15.211560 | \n", "9.943236 | \n", "
320186 | \n", "60162.0 | \n", "3632 | \n", "1857.388916 | \n", "650.908203 | \n", "136.407349 | \n", "142.354614 | \n", "15.377673 | \n", "10.008965 | \n", "2.0 | \n", "1.0 | \n", "15.400203 | \n", "9.935355 | \n", "0.083333 | \n", "15.377673 | \n", "10.008965 | \n", "
320187 | \n", "60163.0 | \n", "3632 | \n", "1862.792725 | \n", "658.719971 | \n", "141.984253 | \n", "149.052307 | \n", "15.538255 | \n", "10.075935 | \n", "2.0 | \n", "1.0 | \n", "15.416893 | \n", "10.051785 | \n", "0.083333 | \n", "15.538255 | \n", "10.075935 | \n", "
320188 rows × 15 columns
\n", "\n", " | frame_id | \n", "track_id | \n", "l | \n", "t | \n", "w | \n", "h | \n", "x | \n", "y | \n", "state | \n", "diff | \n", "... | \n", "y_raw | \n", "dt | \n", "proj_x | \n", "proj_y | \n", "dx | \n", "dy | \n", "vx | \n", "vy | \n", "ax | \n", "ay | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "9.0 | \n", "1 | \n", "0.000000 | \n", "565.566162 | \n", "88.795326 | \n", "173.917542 | \n", "0.855100 | \n", "7.136193 | \n", "2.0 | \n", "NaN | \n", "... | \n", "7.341152 | \n", "NaN | \n", "0.855100 | \n", "7.136193 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
1 | \n", "10.0 | \n", "1 | \n", "0.000000 | \n", "565.116699 | \n", "88.801704 | \n", "171.334290 | \n", "0.873132 | \n", "7.235233 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "7.309168 | \n", "0.083333 | \n", "0.873132 | \n", "7.235233 | \n", "0.018032 | \n", "0.099039 | \n", "0.216383 | \n", "1.188473 | \n", "NaN | \n", "NaN | \n", "
2 | \n", "11.0 | \n", "1 | \n", "0.000000 | \n", "564.874573 | \n", "90.596596 | \n", "177.199951 | \n", "0.890957 | \n", "7.328989 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "7.370044 | \n", "0.083333 | \n", "0.890957 | \n", "7.328989 | \n", "0.017825 | \n", "0.093756 | \n", "0.213899 | \n", "1.125077 | \n", "-0.029812 | \n", "-0.760753 | \n", "
3 | \n", "12.0 | \n", "1 | \n", "0.000000 | \n", "564.874268 | \n", "90.928131 | \n", "183.125732 | \n", "0.907784 | \n", "7.418187 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "7.432365 | \n", "0.083333 | \n", "0.907784 | \n", "7.418187 | \n", "0.016827 | \n", "0.089198 | \n", "0.201924 | \n", "1.070371 | \n", "-0.143699 | \n", "-0.656466 | \n", "
4 | \n", "13.0 | \n", "1 | \n", "0.000000 | \n", "569.931213 | \n", "86.213280 | \n", "180.774292 | \n", "0.923439 | \n", "7.505012 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "7.456334 | \n", "0.083333 | \n", "0.923439 | \n", "7.505012 | \n", "0.015655 | \n", "0.086825 | \n", "0.187865 | \n", "1.041902 | \n", "-0.168701 | \n", "-0.341637 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
320183 | \n", "60159.0 | \n", "3632 | \n", "1830.709717 | \n", "651.257446 | \n", "150.202515 | \n", "157.239746 | \n", "14.840476 | \n", "9.786501 | \n", "2.0 | \n", "NaN | \n", "... | \n", "10.027093 | \n", "NaN | \n", "14.840476 | \n", "9.786501 | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
320184 | \n", "60160.0 | \n", "3632 | \n", "1834.013672 | \n", "649.612122 | \n", "153.686646 | \n", "160.874023 | \n", "15.033432 | \n", "9.870472 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "10.047117 | \n", "0.083333 | \n", "15.033432 | \n", "9.870472 | \n", "0.192955 | \n", "0.083971 | \n", "2.315463 | \n", "1.007656 | \n", "NaN | \n", "NaN | \n", "
320185 | \n", "60161.0 | \n", "3632 | \n", "1845.373047 | \n", "651.249756 | \n", "147.178589 | \n", "153.729248 | \n", "15.211560 | \n", "9.943236 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "10.015218 | \n", "0.083333 | \n", "15.211560 | \n", "9.943236 | \n", "0.178128 | \n", "0.072764 | \n", "2.137542 | \n", "0.873173 | \n", "-2.135059 | \n", "-1.613797 | \n", "
320186 | \n", "60162.0 | \n", "3632 | \n", "1857.388916 | \n", "650.908203 | \n", "136.407349 | \n", "142.354614 | \n", "15.377673 | \n", "10.008965 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "9.935355 | \n", "0.083333 | \n", "15.377673 | \n", "10.008965 | \n", "0.166113 | \n", "0.065728 | \n", "1.993352 | \n", "0.788742 | \n", "-1.730279 | \n", "-1.013172 | \n", "
320187 | \n", "60163.0 | \n", "3632 | \n", "1862.792725 | \n", "658.719971 | \n", "141.984253 | \n", "149.052307 | \n", "15.538255 | \n", "10.075935 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "10.051785 | \n", "0.083333 | \n", "15.538255 | \n", "10.075935 | \n", "0.160582 | \n", "0.066971 | \n", "1.926987 | \n", "0.803649 | \n", "-0.796376 | \n", "0.178886 | \n", "
320188 rows × 21 columns
\n", "\n", " | frame_id | \n", "track_id | \n", "l | \n", "t | \n", "w | \n", "h | \n", "x | \n", "y | \n", "state | \n", "diff | \n", "... | \n", "dx | \n", "dy | \n", "vx | \n", "vy | \n", "ax | \n", "ay | \n", "v | \n", "a | \n", "heading | \n", "d_heading | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "9.0 | \n", "1 | \n", "0.000000 | \n", "565.566162 | \n", "88.795326 | \n", "173.917542 | \n", "0.855100 | \n", "7.136193 | \n", "2.0 | \n", "NaN | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
1 | \n", "10.0 | \n", "1 | \n", "0.000000 | \n", "565.116699 | \n", "88.801704 | \n", "171.334290 | \n", "0.873132 | \n", "7.235233 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.018032 | \n", "0.099039 | \n", "0.216383 | \n", "1.188473 | \n", "NaN | \n", "NaN | \n", "1.208011 | \n", "NaN | \n", "79.681298 | \n", "NaN | \n", "
2 | \n", "11.0 | \n", "1 | \n", "0.000000 | \n", "564.874573 | \n", "90.596596 | \n", "177.199951 | \n", "0.890957 | \n", "7.328989 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.017825 | \n", "0.093756 | \n", "0.213899 | \n", "1.125077 | \n", "-0.029812 | \n", "-0.760753 | \n", "1.145230 | \n", "-0.753373 | \n", "79.235449 | \n", "-5.350188 | \n", "
3 | \n", "12.0 | \n", "1 | \n", "0.000000 | \n", "564.874268 | \n", "90.928131 | \n", "183.125732 | \n", "0.907784 | \n", "7.418187 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.016827 | \n", "0.089198 | \n", "0.201924 | \n", "1.070371 | \n", "-0.143699 | \n", "-0.656466 | \n", "1.089251 | \n", "-0.671740 | \n", "79.316807 | \n", "0.976297 | \n", "
4 | \n", "13.0 | \n", "1 | \n", "0.000000 | \n", "569.931213 | \n", "86.213280 | \n", "180.774292 | \n", "0.923439 | \n", "7.505012 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.015655 | \n", "0.086825 | \n", "0.187865 | \n", "1.041902 | \n", "-0.168701 | \n", "-0.341637 | \n", "1.058703 | \n", "-0.366576 | \n", "79.778828 | \n", "5.544252 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
320183 | \n", "60159.0 | \n", "3632 | \n", "1830.709717 | \n", "651.257446 | \n", "150.202515 | \n", "157.239746 | \n", "14.840476 | \n", "9.786501 | \n", "2.0 | \n", "NaN | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
320184 | \n", "60160.0 | \n", "3632 | \n", "1834.013672 | \n", "649.612122 | \n", "153.686646 | \n", "160.874023 | \n", "15.033432 | \n", "9.870472 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.192955 | \n", "0.083971 | \n", "2.315463 | \n", "1.007656 | \n", "NaN | \n", "NaN | \n", "2.525221 | \n", "NaN | \n", "23.517970 | \n", "NaN | \n", "
320185 | \n", "60161.0 | \n", "3632 | \n", "1845.373047 | \n", "651.249756 | \n", "147.178589 | \n", "153.729248 | \n", "15.211560 | \n", "9.943236 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.178128 | \n", "0.072764 | \n", "2.137542 | \n", "0.873173 | \n", "-2.135059 | \n", "-1.613797 | \n", "2.309007 | \n", "-2.594562 | \n", "22.219713 | \n", "-15.579091 | \n", "
320186 | \n", "60162.0 | \n", "3632 | \n", "1857.388916 | \n", "650.908203 | \n", "136.407349 | \n", "142.354614 | \n", "15.377673 | \n", "10.008965 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.166113 | \n", "0.065728 | \n", "1.993352 | \n", "0.788742 | \n", "-1.730279 | \n", "-1.013172 | \n", "2.143727 | \n", "-1.983366 | \n", "21.588019 | \n", "-7.580324 | \n", "
320187 | \n", "60163.0 | \n", "3632 | \n", "1862.792725 | \n", "658.719971 | \n", "141.984253 | \n", "149.052307 | \n", "15.538255 | \n", "10.075935 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.160582 | \n", "0.066971 | \n", "1.926987 | \n", "0.803649 | \n", "-0.796376 | \n", "0.178886 | \n", "2.087853 | \n", "-0.670484 | \n", "22.638547 | \n", "12.606340 | \n", "
320188 rows × 25 columns
\n", "\n", " | frame_id | \n", "track_id | \n", "l | \n", "t | \n", "w | \n", "h | \n", "x | \n", "y | \n", "state | \n", "diff | \n", "... | \n", "dx | \n", "dy | \n", "vx | \n", "vy | \n", "ax | \n", "ay | \n", "v | \n", "a | \n", "heading | \n", "d_heading | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "9.0 | \n", "1 | \n", "0.000000 | \n", "565.566162 | \n", "88.795326 | \n", "173.917542 | \n", "0.855100 | \n", "7.136193 | \n", "2.0 | \n", "NaN | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "1.208011 | \n", "-0.753373 | \n", "79.681298 | \n", "-5.350188 | \n", "
1 | \n", "10.0 | \n", "1 | \n", "0.000000 | \n", "565.116699 | \n", "88.801704 | \n", "171.334290 | \n", "0.873132 | \n", "7.235233 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.018032 | \n", "0.099039 | \n", "0.216383 | \n", "1.188473 | \n", "NaN | \n", "NaN | \n", "1.208011 | \n", "-0.753373 | \n", "79.681298 | \n", "-5.350188 | \n", "
2 | \n", "11.0 | \n", "1 | \n", "0.000000 | \n", "564.874573 | \n", "90.596596 | \n", "177.199951 | \n", "0.890957 | \n", "7.328989 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.017825 | \n", "0.093756 | \n", "0.213899 | \n", "1.125077 | \n", "-0.029812 | \n", "-0.760753 | \n", "1.145230 | \n", "-0.753373 | \n", "79.235449 | \n", "-5.350188 | \n", "
3 | \n", "12.0 | \n", "1 | \n", "0.000000 | \n", "564.874268 | \n", "90.928131 | \n", "183.125732 | \n", "0.907784 | \n", "7.418187 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.016827 | \n", "0.089198 | \n", "0.201924 | \n", "1.070371 | \n", "-0.143699 | \n", "-0.656466 | \n", "1.089251 | \n", "-0.671740 | \n", "79.316807 | \n", "0.976297 | \n", "
4 | \n", "13.0 | \n", "1 | \n", "0.000000 | \n", "569.931213 | \n", "86.213280 | \n", "180.774292 | \n", "0.923439 | \n", "7.505012 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.015655 | \n", "0.086825 | \n", "0.187865 | \n", "1.041902 | \n", "-0.168701 | \n", "-0.341637 | \n", "1.058703 | \n", "-0.366576 | \n", "79.778828 | \n", "5.544252 | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
320183 | \n", "60159.0 | \n", "3632 | \n", "1830.709717 | \n", "651.257446 | \n", "150.202515 | \n", "157.239746 | \n", "14.840476 | \n", "9.786501 | \n", "2.0 | \n", "NaN | \n", "... | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "NaN | \n", "2.525221 | \n", "-2.594562 | \n", "23.517970 | \n", "-15.579091 | \n", "
320184 | \n", "60160.0 | \n", "3632 | \n", "1834.013672 | \n", "649.612122 | \n", "153.686646 | \n", "160.874023 | \n", "15.033432 | \n", "9.870472 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.192955 | \n", "0.083971 | \n", "2.315463 | \n", "1.007656 | \n", "NaN | \n", "NaN | \n", "2.525221 | \n", "-2.594562 | \n", "23.517970 | \n", "-15.579091 | \n", "
320185 | \n", "60161.0 | \n", "3632 | \n", "1845.373047 | \n", "651.249756 | \n", "147.178589 | \n", "153.729248 | \n", "15.211560 | \n", "9.943236 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.178128 | \n", "0.072764 | \n", "2.137542 | \n", "0.873173 | \n", "-2.135059 | \n", "-1.613797 | \n", "2.309007 | \n", "-2.594562 | \n", "22.219713 | \n", "-15.579091 | \n", "
320186 | \n", "60162.0 | \n", "3632 | \n", "1857.388916 | \n", "650.908203 | \n", "136.407349 | \n", "142.354614 | \n", "15.377673 | \n", "10.008965 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.166113 | \n", "0.065728 | \n", "1.993352 | \n", "0.788742 | \n", "-1.730279 | \n", "-1.013172 | \n", "2.143727 | \n", "-1.983366 | \n", "21.588019 | \n", "-7.580324 | \n", "
320187 | \n", "60163.0 | \n", "3632 | \n", "1862.792725 | \n", "658.719971 | \n", "141.984253 | \n", "149.052307 | \n", "15.538255 | \n", "10.075935 | \n", "2.0 | \n", "1.0 | \n", "... | \n", "0.160582 | \n", "0.066971 | \n", "1.926987 | \n", "0.803649 | \n", "-0.796376 | \n", "0.178886 | \n", "2.087853 | \n", "-0.670484 | \n", "22.638547 | \n", "12.606340 | \n", "
320188 rows × 25 columns
\n", "