forked from locuslab/stable_dynamics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
render_vae
executable file
·70 lines (58 loc) · 2.37 KB
/
render_vae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/env sh
set -e
DATASET="$1"
shift
MODEL="$1"
shift
for INDIR in "$@";
do
echo "PROCESSING $INDIR"
./.colorize ./trajectory.py \
--batch-size 360 \
imagepairs[files=youtube/$DATASET/*] \
"$MODEL" \
"$INDIR/checkpoint_*.pth" \
"$INDIR/trajectory.h5"
./.colorize ./plot_data.py \
--pca 2 \
--save "$INDIR/plot.pca.png" \
"$INDIR/trajectory.h5"
./.colorize ./plot_data.py \
--pca 2 \
--strip 50 500 \
--save "$INDIR/plot.strip.png" \
"$INDIR/trajectory.h5"
./.colorize ./vae_trajmodel.py \
"$INDIR/trajectory.h5" \
"$MODEL" \
"$INDIR/checkpoint_*.pth" \
plot \
--pca 2 \
--save "$INDIR/plot.trajmodel.png"
./.colorize ./vae_trajmodel.py \
"$INDIR/trajectory.h5" \
"$MODEL" \
"$INDIR/checkpoint_*.pth" \
render \
--save "$INDIR/trajmodel_render.png"
./.colorize ./render.py \
imagepairs[files=youtube/$DATASET/*] \
"$MODEL" \
"$INDIR/checkpoint_*.pth" \
--save "$INDIR/vae_render.png"
./.colorize ./render.py \
imagepairs[files=youtube/$DATASET/*] \
"$MODEL" \
"$INDIR/checkpoint_*.pth" \
--random 3 \
--save "$INDIR/vae_render_random.png"
mkdir -p "$INDIR/frames"
./.colorize ./vae_trajmodel.py \
--steps 300 \
"$INDIR/trajectory.h5" \
"$MODEL" \
"$INDIR/checkpoint_*.pth" \
render \
--save-frames "$INDIR/frames/fr_{:0>05}.png"
ffmpeg -r 30 -f image2 -i "$INDIR/frames/fr_%05d.png" "$INDIR/generated.mp4"
done