Skip to content
Snippets Groups Projects
Commit 65110ff7 authored by Nikos Athanasiou's avatar Nikos Athanasiou
Browse files

potential render bug

parent 465a621c
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ for expname in experiments:
metr_d[name] = dict(zip(metric_name, metric_val))
write_json(metr_d, f'{dir}/final_mets.json')
list_of_tup_expname_metrs = [(k,v) for k,v in metr_d.items()]
list_of_tup_expname_metrs = [(k.replace('teacher_force', 'TF').replace('motion_branch', 'MB'),v) for k,v in metr_d.items()]
exp_names, only_scores = zip(*list_of_tup_expname_metrs)
metr2scorelist_d = {k: [d[k] for d in only_scores] for k in only_scores[0]}
import pandas as pd
......@@ -56,12 +56,10 @@ df.columns = [header1, header2]
df.sort_index()
html = df.to_html(classes='table table-striped text-center', justify='center')
# write html to file
text_file = open(f'{dir}/metrics.html', "w")
text_file.write(html)
text_file.close()
text_file = open(f'./metrics.html', "w")
text_file.write(html)
text_file.close()
# write html/tex to file
latex = df.to_latex(index=True)
\ No newline at end of file
with open(f'{dir}/metrics.html', "w") as f:
f.write(html)
latex = df.to_latex(index=True)
with open(f'{dir}/metrics.tex', "w") as f:
f.write(latex)
......@@ -113,7 +113,7 @@ def sample(newcfg: DictConfig) -> None:
with torch.no_grad():
for keyid in (pbar := tqdm(dataset.keyids)):
pbar.set_description(f"Processing {keyid}")
one_data = dataset.load_keyid(keyid)
one_data = dataset.load_keyid(keyid, mode='inference')
# dataset.dtype == 'separate_pairs'
if one_data['length_0'] == 1 or one_data['length_1'] == 1 :
......@@ -141,8 +141,8 @@ def sample(newcfg: DictConfig) -> None:
align_only_trans=cfg.align_only_trans,
slerp_window_size=cfg.slerp_window_size,
return_type=return_type)
from temos.info.joints import mmm_to_smplh_scaling_factor
skate += foot_skate(mjoints*mmm_to_smplh_scaling_factor)
# from temos.info.joints import mmm_to_smplh_scaling_factor
skate += foot_skate(mjoints)
# check the transition frame distance
# for temos naive, the transition distance should be the lowest
......
......@@ -69,6 +69,7 @@ def render_cli(cfg: DictConfig) -> None:
# data = np.load(path)
data = np.load(path, allow_pickle=True).item()
motion = data['motion']
motion = motion.copy()[..., [2, 0, 1]]
text = data['text']
if 'lengths' in data:
lens = data['lengths']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment