Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
teach
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nikos Athanasiou
teach
Commits
65110ff7
Commit
65110ff7
authored
2 years ago
by
Nikos Athanasiou
Browse files
Options
Downloads
Patches
Plain Diff
potential render bug
parent
465a621c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
collect_results.py
+7
-9
7 additions, 9 deletions
collect_results.py
compute_td.py
+3
-3
3 additions, 3 deletions
compute_td.py
render.py
+1
-0
1 addition, 0 deletions
render.py
with
11 additions
and
12 deletions
collect_results.py
+
7
−
9
View file @
65110ff7
...
...
@@ -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
)
This diff is collapsed.
Click to expand it.
compute_td.py
+
3
−
3
View file @
65110ff7
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
render.py
+
1
−
0
View file @
65110ff7
...
...
@@ -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
'
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment