19 KiB
19 KiB
In [1]:
import pandas as pd
import numpy as np
import glob
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
Vehicles¶
In [28]:
for model in ['int_ee', 'int_ee_me', 'vel_ee', 'robot']:
print(f"FDE Results for: {model}")
for ph in [2, 4, 6, 8]:
print(f"-----------------PH: {ph} -------------------")
perf_df = pd.DataFrame()
for f in glob.glob(f"results/{model}_{ph}_fde_full.csv"):
dataset_df = pd.read_csv(f)
dataset_df['model'] = model
perf_df = perf_df.append(dataset_df, ignore_index=True)
del perf_df['Unnamed: 0']
print(f"FDE Mean @{ph*0.5}s: {perf_df['value'][perf_df['type'] == 'full'].mean()}")
del perf_df
perf_df = pd.DataFrame()
for f in glob.glob(f"results/{model}_{ph}_rv_full.csv"):
dataset_df = pd.read_csv(f)
dataset_df['model'] = model
perf_df = perf_df.append(dataset_df, ignore_index=True)
del perf_df['Unnamed: 0']
print(f"RB Viols @{ph*0.5}s: {perf_df['value'][perf_df['type'] == 'full'].sum() / (len(perf_df['value'][perf_df['type'] == 'full'].index)*2000)}")
del perf_df
perf_df = pd.DataFrame()
for f in glob.glob(f"results/{model}*_{ph}_fde_most_likely_z.csv"):
dataset_df = pd.read_csv(f)
dataset_df['model'] = model
perf_df = perf_df.append(dataset_df, ignore_index=True)
del perf_df['Unnamed: 0']
print(f"FDE @{ph*0.5}s: {perf_df['value'][perf_df['type'] == 'ml'].mean()}")
del perf_df
perf_df = pd.DataFrame()
for f in glob.glob(f"results/{model}*_{ph}_kde_full.csv"):
dataset_df = pd.read_csv(f)
dataset_df['model'] = model
perf_df = perf_df.append(dataset_df, ignore_index=True)
del perf_df['Unnamed: 0']
print(f"KDE @{ph*0.5}s: {perf_df['value'][perf_df['type'] == 'full'].mean()}")
print("----------------------------------------------")
del perf_df
print("")
In [38]:
for model in ['int_ee_me_no_ego', 'robot']:
print(f"FDE Results for: {model}")
for ph in [2, 4, 6, 8]:
print(f"-----------------PH: {ph} -------------------")
perf_df = pd.DataFrame()
for f in glob.glob(f"results/{model}_{ph}_fde_full.csv"):
dataset_df = pd.read_csv(f)
dataset_df['model'] = model
perf_df = perf_df.append(dataset_df, ignore_index=True)
del perf_df['Unnamed: 0']
print(f"FDE Mean @{ph*0.5}s: {perf_df['value'][perf_df['type'] == 'full'].mean()}")
del perf_df
perf_df = pd.DataFrame()
for f in glob.glob(f"results/{model}_{ph}_rv_full.csv"):
dataset_df = pd.read_csv(f)
dataset_df['model'] = model
perf_df = perf_df.append(dataset_df, ignore_index=True)
del perf_df['Unnamed: 0']
print(f"RB Viols @{ph*0.5}s: {perf_df['value'][perf_df['type'] == 'full'].sum() / (len(perf_df['value'][perf_df['type'] == 'full'].index)*2000)}")
del perf_df
perf_df = pd.DataFrame()
for f in glob.glob(f"results/{model}*_{ph}_fde_most_likely_z.csv"):
dataset_df = pd.read_csv(f)
dataset_df['model'] = model
perf_df = perf_df.append(dataset_df, ignore_index=True)
del perf_df['Unnamed: 0']
print(f"FDE @{ph*0.5}s: {perf_df['value'][perf_df['type'] == 'ml'].mean()}")
del perf_df
perf_df = pd.DataFrame()
for f in glob.glob(f"results/{model}*_{ph}_kde_full.csv"):
dataset_df = pd.read_csv(f)
dataset_df['model'] = model
perf_df = perf_df.append(dataset_df, ignore_index=True)
del perf_df['Unnamed: 0']
print(f"KDE @{ph*0.5}s: {perf_df['value'][perf_df['type'] == 'full'].mean()}")
print("----------------------------------------------")
del perf_df
print("")
Pedestrians¶
In [40]:
for model in ['int_ee_me_ped', 'vel_ee_ped']:
print(f"FDE Results for: {model}")
for ph in [2, 4, 6, 8]:
print(f"-----------------PH: {ph} -------------------")
perf_df = pd.DataFrame()
for f in glob.glob(f"results/{model}*_{ph}_fde_full.csv"):
dataset_df = pd.read_csv(f)
dataset_df['model'] = model
perf_df = perf_df.append(dataset_df, ignore_index=True)
del perf_df['Unnamed: 0']
print(f"FDE Mean @{ph*0.5}s: {perf_df['value'][perf_df['metric'] == 'fde'].mean()}")
del perf_df
perf_df = pd.DataFrame()
for f in glob.glob(f"results/{model}*_{ph}_ade_full.csv"):
dataset_df = pd.read_csv(f)
dataset_df['model'] = model
perf_df = perf_df.append(dataset_df, ignore_index=True)
del perf_df['Unnamed: 0']
print(f"ADE Mean @{ph*0.5}s: {perf_df['value'][perf_df['metric'] == 'ade'].mean()}")
del perf_df
perf_df = pd.DataFrame()
for f in glob.glob(f"results/{model}*_{ph}_kde_full.csv"):
dataset_df = pd.read_csv(f)
dataset_df['model'] = model
perf_df = perf_df.append(dataset_df, ignore_index=True)
del perf_df['Unnamed: 0']
print(f"KDE Mean @{ph*0.5}s: {perf_df['value'][perf_df['metric'] == 'kde'].mean()}")
del perf_df
perf_df = pd.DataFrame()
for f in glob.glob(f"results/{model}*_{ph}_fde_most_likely_z.csv"):
dataset_df = pd.read_csv(f)
dataset_df['model'] = model
perf_df = perf_df.append(dataset_df, ignore_index=True)
del perf_df['Unnamed: 0']
print(f"FDE @{ph*0.5}s: {perf_df['value'][perf_df['metric'] == 'fde'].mean()}")
del perf_df
perf_df = pd.DataFrame()
for f in glob.glob(f"results/{model}*_{ph}_ade_most_likely_z.csv"):
dataset_df = pd.read_csv(f)
dataset_df['model'] = model
perf_df = perf_df.append(dataset_df, ignore_index=True)
del perf_df['Unnamed: 0']
print(f"ADE @{ph*0.5}s: {perf_df['value'][perf_df['metric'] == 'ade'].mean()}")
del perf_df
print("----------------------------------------------")
print("")
In [ ]: