Spaces:
Building
Building
Upload 62 files
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +10 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.47.07 AM_out/bounding_box.yaml +4 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.47.07 AM_out/char_cfg.yaml +83 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.47.07 AM_out/image.png +3 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.47.07 AM_out/joint_overlay.png +3 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.47.07/342/200/257AM_out/mask.png +0 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.47.07 AM_out/mvc_cfg.yaml +10 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.47.07 AM_out/texture.png +3 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.47.07 AM_out/video.gif +3 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.52.46 AM_out/bounding_box.yaml +4 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.52.46 AM_out/char_cfg.yaml +83 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.52.46/342/200/257AM_out/image.png +0 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.52.46/342/200/257AM_out/joint_overlay.png +0 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.52.46/342/200/257AM_out/mask.png +0 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.52.46 AM_out/mvc_cfg.yaml +10 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.52.46/342/200/257AM_out/texture.png +0 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.52.46 AM_out/video.gif +3 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.54.12 AM_out/bounding_box.yaml +4 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.54.12 AM_out/char_cfg.yaml +83 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.54.12/342/200/257AM_out/image.png +0 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.54.12/342/200/257AM_out/joint_overlay.png +0 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.54.12/342/200/257AM_out/mask.png +0 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.54.12 AM_out/mvc_cfg.yaml +10 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.54.12/342/200/257AM_out/texture.png +0 -0
- outputs_gradio/Screenshot 2024-12-04 at 2.54.12 AM_out/video.gif +3 -0
- outputs_gradio/garlic_out/bounding_box.yaml +4 -0
- outputs_gradio/garlic_out/char_cfg.yaml +83 -0
- outputs_gradio/garlic_out/image.png +3 -0
- outputs_gradio/garlic_out/joint_overlay.png +0 -0
- outputs_gradio/garlic_out/mask.png +0 -0
- outputs_gradio/garlic_out/mvc_cfg.yaml +8 -0
- outputs_gradio/garlic_out/texture.png +0 -0
- outputs_gradio/garlic_out/video.gif +3 -0
- outputs_gradio/webcam_out/bounding_box.yaml +4 -0
- outputs_gradio/webcam_out/char_cfg.yaml +83 -0
- outputs_gradio/webcam_out/image.png +3 -0
- outputs_gradio/webcam_out/joint_overlay.png +0 -0
- outputs_gradio/webcam_out/mask.png +0 -0
- outputs_gradio/webcam_out/mvc_cfg.yaml +8 -0
- outputs_gradio/webcam_out/texture.png +0 -0
- outputs_gradio/webcam_out/video.gif +3 -0
- tests/test_animated_drawing.py +27 -0
- tests/test_animated_drawing_files/test_mvc.yaml +5 -0
- tests/test_arap.py +116 -0
- tests/test_bvh.py +32 -0
- tests/test_bvh_files/zombie.bvh +0 -0
- tests/test_quaternions.py +67 -0
- tests/test_render.py +32 -0
- tests/test_render_files/char1/char_cfg.yaml +83 -0
- tests/test_render_files/char1/joint_overlay.png +0 -0
.gitattributes
CHANGED
@@ -10,3 +10,13 @@ media/gif_export_video.gif filter=lfs diff=lfs merge=lfs -text
|
|
10 |
media/interactive_window_example.gif filter=lfs diff=lfs merge=lfs -text
|
11 |
media/mp4_export_video.gif filter=lfs diff=lfs merge=lfs -text
|
12 |
media/multiple_characters_example.gif filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
media/interactive_window_example.gif filter=lfs diff=lfs merge=lfs -text
|
11 |
media/mp4_export_video.gif filter=lfs diff=lfs merge=lfs -text
|
12 |
media/multiple_characters_example.gif filter=lfs diff=lfs merge=lfs -text
|
13 |
+
outputs_gradio/garlic_out/image.png filter=lfs diff=lfs merge=lfs -text
|
14 |
+
outputs_gradio/garlic_out/video.gif filter=lfs diff=lfs merge=lfs -text
|
15 |
+
outputs_gradio/Screenshot[[:space:]]2024-12-04[[:space:]]at[[:space:]]2.47.07 AM_out/image.png filter=lfs diff=lfs merge=lfs -text
|
16 |
+
outputs_gradio/Screenshot[[:space:]]2024-12-04[[:space:]]at[[:space:]]2.47.07 AM_out/joint_overlay.png filter=lfs diff=lfs merge=lfs -text
|
17 |
+
outputs_gradio/Screenshot[[:space:]]2024-12-04[[:space:]]at[[:space:]]2.47.07 AM_out/texture.png filter=lfs diff=lfs merge=lfs -text
|
18 |
+
outputs_gradio/Screenshot[[:space:]]2024-12-04[[:space:]]at[[:space:]]2.47.07 AM_out/video.gif filter=lfs diff=lfs merge=lfs -text
|
19 |
+
outputs_gradio/Screenshot[[:space:]]2024-12-04[[:space:]]at[[:space:]]2.52.46 AM_out/video.gif filter=lfs diff=lfs merge=lfs -text
|
20 |
+
outputs_gradio/Screenshot[[:space:]]2024-12-04[[:space:]]at[[:space:]]2.54.12 AM_out/video.gif filter=lfs diff=lfs merge=lfs -text
|
21 |
+
outputs_gradio/webcam_out/image.png filter=lfs diff=lfs merge=lfs -text
|
22 |
+
outputs_gradio/webcam_out/video.gif filter=lfs diff=lfs merge=lfs -text
|
outputs_gradio/Screenshot 2024-12-04 at 2.47.07 AM_out/bounding_box.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
bottom: 973
|
2 |
+
left: 94
|
3 |
+
right: 584
|
4 |
+
top: 55
|
outputs_gradio/Screenshot 2024-12-04 at 2.47.07 AM_out/char_cfg.yaml
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
height: 918
|
2 |
+
skeleton:
|
3 |
+
- loc:
|
4 |
+
- 249
|
5 |
+
- 679
|
6 |
+
name: root
|
7 |
+
parent: null
|
8 |
+
- loc:
|
9 |
+
- 249
|
10 |
+
- 679
|
11 |
+
name: hip
|
12 |
+
parent: root
|
13 |
+
- loc:
|
14 |
+
- 254
|
15 |
+
- 383
|
16 |
+
name: torso
|
17 |
+
parent: hip
|
18 |
+
- loc:
|
19 |
+
- 249
|
20 |
+
- 186
|
21 |
+
name: neck
|
22 |
+
parent: torso
|
23 |
+
- loc:
|
24 |
+
- 160
|
25 |
+
- 383
|
26 |
+
name: right_shoulder
|
27 |
+
parent: torso
|
28 |
+
- loc:
|
29 |
+
- 115
|
30 |
+
- 481
|
31 |
+
name: right_elbow
|
32 |
+
parent: right_shoulder
|
33 |
+
- loc:
|
34 |
+
- 79
|
35 |
+
- 589
|
36 |
+
name: right_hand
|
37 |
+
parent: right_elbow
|
38 |
+
- loc:
|
39 |
+
- 348
|
40 |
+
- 383
|
41 |
+
name: left_shoulder
|
42 |
+
parent: torso
|
43 |
+
- loc:
|
44 |
+
- 384
|
45 |
+
- 490
|
46 |
+
name: left_elbow
|
47 |
+
parent: left_shoulder
|
48 |
+
- loc:
|
49 |
+
- 429
|
50 |
+
- 598
|
51 |
+
name: left_hand
|
52 |
+
parent: left_elbow
|
53 |
+
- loc:
|
54 |
+
- 187
|
55 |
+
- 679
|
56 |
+
name: right_hip
|
57 |
+
parent: root
|
58 |
+
- loc:
|
59 |
+
- 187
|
60 |
+
- 786
|
61 |
+
name: right_knee
|
62 |
+
parent: right_hip
|
63 |
+
- loc:
|
64 |
+
- 187
|
65 |
+
- 894
|
66 |
+
name: right_foot
|
67 |
+
parent: right_knee
|
68 |
+
- loc:
|
69 |
+
- 312
|
70 |
+
- 679
|
71 |
+
name: left_hip
|
72 |
+
parent: root
|
73 |
+
- loc:
|
74 |
+
- 321
|
75 |
+
- 777
|
76 |
+
name: left_knee
|
77 |
+
parent: left_hip
|
78 |
+
- loc:
|
79 |
+
- 321
|
80 |
+
- 885
|
81 |
+
name: left_foot
|
82 |
+
parent: left_knee
|
83 |
+
width: 490
|
outputs_gradio/Screenshot 2024-12-04 at 2.47.07 AM_out/image.png
ADDED
Git LFS Details
|
outputs_gradio/Screenshot 2024-12-04 at 2.47.07 AM_out/joint_overlay.png
ADDED
Git LFS Details
|
outputs_gradio/Screenshot 2024-12-04 at 2.47.07/342/200/257AM_out/mask.png
ADDED
outputs_gradio/Screenshot 2024-12-04 at 2.47.07 AM_out/mvc_cfg.yaml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
controller:
|
2 |
+
MODE: video_render
|
3 |
+
OUTPUT_VIDEO_PATH: "/Users/gauravyadav/AnimatedDrawings/outputs_gradio/Screenshot\
|
4 |
+
\ 2024-12-04 at 2.47.07\u202FAM_out/video.gif"
|
5 |
+
scene:
|
6 |
+
ANIMATED_CHARACTERS:
|
7 |
+
- character_cfg: "/Users/gauravyadav/AnimatedDrawings/outputs_gradio/Screenshot\
|
8 |
+
\ 2024-12-04 at 2.47.07\u202FAM_out/char_cfg.yaml"
|
9 |
+
motion_cfg: /Users/gauravyadav/AnimatedDrawings/examples/config/motion/dab.yaml
|
10 |
+
retarget_cfg: /Users/gauravyadav/AnimatedDrawings/examples/config/retarget/fair1_ppf.yaml
|
outputs_gradio/Screenshot 2024-12-04 at 2.47.07 AM_out/texture.png
ADDED
Git LFS Details
|
outputs_gradio/Screenshot 2024-12-04 at 2.47.07 AM_out/video.gif
ADDED
Git LFS Details
|
outputs_gradio/Screenshot 2024-12-04 at 2.52.46 AM_out/bounding_box.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
bottom: 686
|
2 |
+
left: 24
|
3 |
+
right: 435
|
4 |
+
top: 44
|
outputs_gradio/Screenshot 2024-12-04 at 2.52.46 AM_out/char_cfg.yaml
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
height: 642
|
2 |
+
skeleton:
|
3 |
+
- loc:
|
4 |
+
- 227
|
5 |
+
- 453
|
6 |
+
name: root
|
7 |
+
parent: null
|
8 |
+
- loc:
|
9 |
+
- 227
|
10 |
+
- 453
|
11 |
+
name: hip
|
12 |
+
parent: root
|
13 |
+
- loc:
|
14 |
+
- 234
|
15 |
+
- 205
|
16 |
+
name: torso
|
17 |
+
parent: hip
|
18 |
+
- loc:
|
19 |
+
- 221
|
20 |
+
- 98
|
21 |
+
name: neck
|
22 |
+
parent: torso
|
23 |
+
- loc:
|
24 |
+
- 184
|
25 |
+
- 205
|
26 |
+
name: right_shoulder
|
27 |
+
parent: torso
|
28 |
+
- loc:
|
29 |
+
- 108
|
30 |
+
- 249
|
31 |
+
name: right_elbow
|
32 |
+
parent: right_shoulder
|
33 |
+
- loc:
|
34 |
+
- 39
|
35 |
+
- 299
|
36 |
+
name: right_hand
|
37 |
+
parent: right_elbow
|
38 |
+
- loc:
|
39 |
+
- 284
|
40 |
+
- 205
|
41 |
+
name: left_shoulder
|
42 |
+
parent: torso
|
43 |
+
- loc:
|
44 |
+
- 328
|
45 |
+
- 280
|
46 |
+
name: left_elbow
|
47 |
+
parent: left_shoulder
|
48 |
+
- loc:
|
49 |
+
- 372
|
50 |
+
- 355
|
51 |
+
name: left_hand
|
52 |
+
parent: left_elbow
|
53 |
+
- loc:
|
54 |
+
- 171
|
55 |
+
- 450
|
56 |
+
name: right_hip
|
57 |
+
parent: root
|
58 |
+
- loc:
|
59 |
+
- 158
|
60 |
+
- 525
|
61 |
+
name: right_knee
|
62 |
+
parent: right_hip
|
63 |
+
- loc:
|
64 |
+
- 140
|
65 |
+
- 606
|
66 |
+
name: right_foot
|
67 |
+
parent: right_knee
|
68 |
+
- loc:
|
69 |
+
- 284
|
70 |
+
- 456
|
71 |
+
name: left_hip
|
72 |
+
parent: root
|
73 |
+
- loc:
|
74 |
+
- 278
|
75 |
+
- 531
|
76 |
+
name: left_knee
|
77 |
+
parent: left_hip
|
78 |
+
- loc:
|
79 |
+
- 265
|
80 |
+
- 613
|
81 |
+
name: left_foot
|
82 |
+
parent: left_knee
|
83 |
+
width: 411
|
outputs_gradio/Screenshot 2024-12-04 at 2.52.46/342/200/257AM_out/image.png
ADDED
outputs_gradio/Screenshot 2024-12-04 at 2.52.46/342/200/257AM_out/joint_overlay.png
ADDED
outputs_gradio/Screenshot 2024-12-04 at 2.52.46/342/200/257AM_out/mask.png
ADDED
outputs_gradio/Screenshot 2024-12-04 at 2.52.46 AM_out/mvc_cfg.yaml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
controller:
|
2 |
+
MODE: video_render
|
3 |
+
OUTPUT_VIDEO_PATH: "/Users/gauravyadav/AnimatedDrawings/outputs_gradio/Screenshot\
|
4 |
+
\ 2024-12-04 at 2.52.46\u202FAM_out/video.gif"
|
5 |
+
scene:
|
6 |
+
ANIMATED_CHARACTERS:
|
7 |
+
- character_cfg: "/Users/gauravyadav/AnimatedDrawings/outputs_gradio/Screenshot\
|
8 |
+
\ 2024-12-04 at 2.52.46\u202FAM_out/char_cfg.yaml"
|
9 |
+
motion_cfg: /Users/gauravyadav/AnimatedDrawings/examples/config/motion/dab.yaml
|
10 |
+
retarget_cfg: /Users/gauravyadav/AnimatedDrawings/examples/config/retarget/fair1_ppf.yaml
|
outputs_gradio/Screenshot 2024-12-04 at 2.52.46/342/200/257AM_out/texture.png
ADDED
outputs_gradio/Screenshot 2024-12-04 at 2.52.46 AM_out/video.gif
ADDED
Git LFS Details
|
outputs_gradio/Screenshot 2024-12-04 at 2.54.12 AM_out/bounding_box.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
bottom: 689
|
2 |
+
left: 30
|
3 |
+
right: 437
|
4 |
+
top: 35
|
outputs_gradio/Screenshot 2024-12-04 at 2.54.12 AM_out/char_cfg.yaml
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
height: 654
|
2 |
+
skeleton:
|
3 |
+
- loc:
|
4 |
+
- 226
|
5 |
+
- 461
|
6 |
+
name: root
|
7 |
+
parent: null
|
8 |
+
- loc:
|
9 |
+
- 226
|
10 |
+
- 461
|
11 |
+
name: hip
|
12 |
+
parent: root
|
13 |
+
- loc:
|
14 |
+
- 232
|
15 |
+
- 222
|
16 |
+
name: torso
|
17 |
+
parent: hip
|
18 |
+
- loc:
|
19 |
+
- 219
|
20 |
+
- 113
|
21 |
+
name: neck
|
22 |
+
parent: torso
|
23 |
+
- loc:
|
24 |
+
- 181
|
25 |
+
- 222
|
26 |
+
name: right_shoulder
|
27 |
+
parent: torso
|
28 |
+
- loc:
|
29 |
+
- 111
|
30 |
+
- 260
|
31 |
+
name: right_elbow
|
32 |
+
parent: right_shoulder
|
33 |
+
- loc:
|
34 |
+
- 34
|
35 |
+
- 311
|
36 |
+
name: right_hand
|
37 |
+
parent: right_elbow
|
38 |
+
- loc:
|
39 |
+
- 283
|
40 |
+
- 222
|
41 |
+
name: left_shoulder
|
42 |
+
parent: torso
|
43 |
+
- loc:
|
44 |
+
- 328
|
45 |
+
- 292
|
46 |
+
name: left_elbow
|
47 |
+
parent: left_shoulder
|
48 |
+
- loc:
|
49 |
+
- 366
|
50 |
+
- 369
|
51 |
+
name: left_hand
|
52 |
+
parent: left_elbow
|
53 |
+
- loc:
|
54 |
+
- 168
|
55 |
+
- 458
|
56 |
+
name: right_hip
|
57 |
+
parent: root
|
58 |
+
- loc:
|
59 |
+
- 156
|
60 |
+
- 535
|
61 |
+
name: right_knee
|
62 |
+
parent: right_hip
|
63 |
+
- loc:
|
64 |
+
- 136
|
65 |
+
- 618
|
66 |
+
name: right_foot
|
67 |
+
parent: right_knee
|
68 |
+
- loc:
|
69 |
+
- 283
|
70 |
+
- 464
|
71 |
+
name: left_hip
|
72 |
+
parent: root
|
73 |
+
- loc:
|
74 |
+
- 277
|
75 |
+
- 547
|
76 |
+
name: left_knee
|
77 |
+
parent: left_hip
|
78 |
+
- loc:
|
79 |
+
- 264
|
80 |
+
- 624
|
81 |
+
name: left_foot
|
82 |
+
parent: left_knee
|
83 |
+
width: 407
|
outputs_gradio/Screenshot 2024-12-04 at 2.54.12/342/200/257AM_out/image.png
ADDED
outputs_gradio/Screenshot 2024-12-04 at 2.54.12/342/200/257AM_out/joint_overlay.png
ADDED
outputs_gradio/Screenshot 2024-12-04 at 2.54.12/342/200/257AM_out/mask.png
ADDED
outputs_gradio/Screenshot 2024-12-04 at 2.54.12 AM_out/mvc_cfg.yaml
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
controller:
|
2 |
+
MODE: video_render
|
3 |
+
OUTPUT_VIDEO_PATH: "/Users/gauravyadav/AnimatedDrawings/outputs_gradio/Screenshot\
|
4 |
+
\ 2024-12-04 at 2.54.12\u202FAM_out/video.gif"
|
5 |
+
scene:
|
6 |
+
ANIMATED_CHARACTERS:
|
7 |
+
- character_cfg: "/Users/gauravyadav/AnimatedDrawings/outputs_gradio/Screenshot\
|
8 |
+
\ 2024-12-04 at 2.54.12\u202FAM_out/char_cfg.yaml"
|
9 |
+
motion_cfg: /Users/gauravyadav/AnimatedDrawings/examples/config/motion/dab.yaml
|
10 |
+
retarget_cfg: /Users/gauravyadav/AnimatedDrawings/examples/config/retarget/fair1_ppf.yaml
|
outputs_gradio/Screenshot 2024-12-04 at 2.54.12/342/200/257AM_out/texture.png
ADDED
outputs_gradio/Screenshot 2024-12-04 at 2.54.12 AM_out/video.gif
ADDED
Git LFS Details
|
outputs_gradio/garlic_out/bounding_box.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
bottom: 782
|
2 |
+
left: 118
|
3 |
+
right: 635
|
4 |
+
top: 187
|
outputs_gradio/garlic_out/char_cfg.yaml
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
height: 595
|
2 |
+
skeleton:
|
3 |
+
- loc:
|
4 |
+
- 289
|
5 |
+
- 422
|
6 |
+
name: root
|
7 |
+
parent: null
|
8 |
+
- loc:
|
9 |
+
- 289
|
10 |
+
- 422
|
11 |
+
name: hip
|
12 |
+
parent: root
|
13 |
+
- loc:
|
14 |
+
- 289
|
15 |
+
- 166
|
16 |
+
name: torso
|
17 |
+
parent: hip
|
18 |
+
- loc:
|
19 |
+
- 289
|
20 |
+
- 227
|
21 |
+
name: neck
|
22 |
+
parent: torso
|
23 |
+
- loc:
|
24 |
+
- 154
|
25 |
+
- 173
|
26 |
+
name: right_shoulder
|
27 |
+
parent: torso
|
28 |
+
- loc:
|
29 |
+
- 107
|
30 |
+
- 139
|
31 |
+
name: right_elbow
|
32 |
+
parent: right_shoulder
|
33 |
+
- loc:
|
34 |
+
- 67
|
35 |
+
- 99
|
36 |
+
name: right_hand
|
37 |
+
parent: right_elbow
|
38 |
+
- loc:
|
39 |
+
- 423
|
40 |
+
- 159
|
41 |
+
name: left_shoulder
|
42 |
+
parent: torso
|
43 |
+
- loc:
|
44 |
+
- 450
|
45 |
+
- 112
|
46 |
+
name: left_elbow
|
47 |
+
parent: left_shoulder
|
48 |
+
- loc:
|
49 |
+
- 471
|
50 |
+
- 59
|
51 |
+
name: left_hand
|
52 |
+
parent: left_elbow
|
53 |
+
- loc:
|
54 |
+
- 201
|
55 |
+
- 422
|
56 |
+
name: right_hip
|
57 |
+
parent: root
|
58 |
+
- loc:
|
59 |
+
- 195
|
60 |
+
- 489
|
61 |
+
name: right_knee
|
62 |
+
parent: right_hip
|
63 |
+
- loc:
|
64 |
+
- 181
|
65 |
+
- 563
|
66 |
+
name: right_foot
|
67 |
+
parent: right_knee
|
68 |
+
- loc:
|
69 |
+
- 376
|
70 |
+
- 422
|
71 |
+
name: left_hip
|
72 |
+
parent: root
|
73 |
+
- loc:
|
74 |
+
- 390
|
75 |
+
- 483
|
76 |
+
name: left_knee
|
77 |
+
parent: left_hip
|
78 |
+
- loc:
|
79 |
+
- 403
|
80 |
+
- 543
|
81 |
+
name: left_foot
|
82 |
+
parent: left_knee
|
83 |
+
width: 517
|
outputs_gradio/garlic_out/image.png
ADDED
Git LFS Details
|
outputs_gradio/garlic_out/joint_overlay.png
ADDED
outputs_gradio/garlic_out/mask.png
ADDED
outputs_gradio/garlic_out/mvc_cfg.yaml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
controller:
|
2 |
+
MODE: video_render
|
3 |
+
OUTPUT_VIDEO_PATH: /Users/gauravyadav/AnimatedDrawings/outputs_gradio/garlic_out/video.gif
|
4 |
+
scene:
|
5 |
+
ANIMATED_CHARACTERS:
|
6 |
+
- character_cfg: /Users/gauravyadav/AnimatedDrawings/outputs_gradio/garlic_out/char_cfg.yaml
|
7 |
+
motion_cfg: /Users/gauravyadav/AnimatedDrawings/examples/config/motion/dab.yaml
|
8 |
+
retarget_cfg: /Users/gauravyadav/AnimatedDrawings/examples/config/retarget/fair1_ppf.yaml
|
outputs_gradio/garlic_out/texture.png
ADDED
outputs_gradio/garlic_out/video.gif
ADDED
Git LFS Details
|
outputs_gradio/webcam_out/bounding_box.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
bottom: 705
|
2 |
+
left: 280
|
3 |
+
right: 527
|
4 |
+
top: 443
|
outputs_gradio/webcam_out/char_cfg.yaml
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
height: 262
|
2 |
+
skeleton:
|
3 |
+
- loc:
|
4 |
+
- 112
|
5 |
+
- 215
|
6 |
+
name: root
|
7 |
+
parent: null
|
8 |
+
- loc:
|
9 |
+
- 112
|
10 |
+
- 215
|
11 |
+
name: hip
|
12 |
+
parent: root
|
13 |
+
- loc:
|
14 |
+
- 135
|
15 |
+
- 181
|
16 |
+
name: torso
|
17 |
+
parent: hip
|
18 |
+
- loc:
|
19 |
+
- 122
|
20 |
+
- 113
|
21 |
+
name: neck
|
22 |
+
parent: torso
|
23 |
+
- loc:
|
24 |
+
- 41
|
25 |
+
- 203
|
26 |
+
name: right_shoulder
|
27 |
+
parent: torso
|
28 |
+
- loc:
|
29 |
+
- 22
|
30 |
+
- 136
|
31 |
+
name: right_elbow
|
32 |
+
parent: right_shoulder
|
33 |
+
- loc:
|
34 |
+
- 29
|
35 |
+
- 168
|
36 |
+
name: right_hand
|
37 |
+
parent: right_elbow
|
38 |
+
- loc:
|
39 |
+
- 228
|
40 |
+
- 158
|
41 |
+
name: left_shoulder
|
42 |
+
parent: torso
|
43 |
+
- loc:
|
44 |
+
- 234
|
45 |
+
- 158
|
46 |
+
name: left_elbow
|
47 |
+
parent: left_shoulder
|
48 |
+
- loc:
|
49 |
+
- 234
|
50 |
+
- 168
|
51 |
+
name: left_hand
|
52 |
+
parent: left_elbow
|
53 |
+
- loc:
|
54 |
+
- 74
|
55 |
+
- 213
|
56 |
+
name: right_hip
|
57 |
+
parent: root
|
58 |
+
- loc:
|
59 |
+
- 67
|
60 |
+
- 226
|
61 |
+
name: right_knee
|
62 |
+
parent: right_hip
|
63 |
+
- loc:
|
64 |
+
- 64
|
65 |
+
- 242
|
66 |
+
name: right_foot
|
67 |
+
parent: right_knee
|
68 |
+
- loc:
|
69 |
+
- 151
|
70 |
+
- 216
|
71 |
+
name: left_hip
|
72 |
+
parent: root
|
73 |
+
- loc:
|
74 |
+
- 154
|
75 |
+
- 229
|
76 |
+
name: left_knee
|
77 |
+
parent: left_hip
|
78 |
+
- loc:
|
79 |
+
- 154
|
80 |
+
- 248
|
81 |
+
name: left_foot
|
82 |
+
parent: left_knee
|
83 |
+
width: 247
|
outputs_gradio/webcam_out/image.png
ADDED
Git LFS Details
|
outputs_gradio/webcam_out/joint_overlay.png
ADDED
outputs_gradio/webcam_out/mask.png
ADDED
outputs_gradio/webcam_out/mvc_cfg.yaml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
controller:
|
2 |
+
MODE: video_render
|
3 |
+
OUTPUT_VIDEO_PATH: /Users/gauravyadav/AnimatedDrawings/outputs_gradio/webcam_out/video.gif
|
4 |
+
scene:
|
5 |
+
ANIMATED_CHARACTERS:
|
6 |
+
- character_cfg: /Users/gauravyadav/AnimatedDrawings/outputs_gradio/webcam_out/char_cfg.yaml
|
7 |
+
motion_cfg: /Users/gauravyadav/AnimatedDrawings/examples/config/motion/dab.yaml
|
8 |
+
retarget_cfg: /Users/gauravyadav/AnimatedDrawings/examples/config/retarget/fair1_ppf.yaml
|
outputs_gradio/webcam_out/texture.png
ADDED
outputs_gradio/webcam_out/video.gif
ADDED
Git LFS Details
|
tests/test_animated_drawing.py
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
2 |
+
# This source code is licensed under the MIT license found in the
|
3 |
+
# LICENSE file in the root directory of this source tree.
|
4 |
+
|
5 |
+
from animated_drawings.model.animated_drawing import AnimatedDrawing
|
6 |
+
from animated_drawings.config import Config
|
7 |
+
from pkg_resources import resource_filename
|
8 |
+
|
9 |
+
|
10 |
+
def test_init():
|
11 |
+
import OpenGL.GL as GL
|
12 |
+
import glfw
|
13 |
+
glfw.init()
|
14 |
+
glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 3)
|
15 |
+
glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 3)
|
16 |
+
glfw.window_hint(glfw.OPENGL_FORWARD_COMPAT, GL.GL_TRUE)
|
17 |
+
glfw.window_hint(glfw.OPENGL_PROFILE, glfw.OPENGL_CORE_PROFILE)
|
18 |
+
win = glfw.create_window(100, 100, 'Viewer', None, None)
|
19 |
+
glfw.make_context_current(win)
|
20 |
+
|
21 |
+
mvc_cfg_fn = resource_filename(__name__, 'test_animated_drawing_files/test_mvc.yaml')
|
22 |
+
mvc_config = Config(mvc_cfg_fn)
|
23 |
+
char_cfg, retarget_cfg, motion_cfg = mvc_config.scene.animated_characters[0]
|
24 |
+
|
25 |
+
AnimatedDrawing(char_cfg, retarget_cfg, motion_cfg)
|
26 |
+
|
27 |
+
assert True
|
tests/test_animated_drawing_files/test_mvc.yaml
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
scene:
|
2 |
+
ANIMATED_CHARACTERS:
|
3 |
+
- character_cfg: examples/characters/char2/char_cfg.yaml
|
4 |
+
motion_cfg: examples/config/motion/jumping_jacks.yaml
|
5 |
+
retarget_cfg: examples/config/retarget/cmu1_pfp.yaml
|
tests/test_arap.py
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
2 |
+
# This source code is licensed under the MIT license found in the
|
3 |
+
# LICENSE file in the root directory of this source tree.
|
4 |
+
|
5 |
+
import numpy as np
|
6 |
+
from animated_drawings.model.arap import ARAP, plot_mesh
|
7 |
+
|
8 |
+
|
9 |
+
def test_single_triangle_mesh():
|
10 |
+
show_plots = False # Make true if you'd like to see mesh viz during test run
|
11 |
+
vertices = np.array([
|
12 |
+
[2.0, 2.0],
|
13 |
+
[3.0, 3.0],
|
14 |
+
[4.0, 2.0]
|
15 |
+
])
|
16 |
+
|
17 |
+
triangles = np.array([
|
18 |
+
[0, 1, 2]
|
19 |
+
], np.int32)
|
20 |
+
|
21 |
+
pins_xy = np.array([[2.0, 2.0], [4.0, 2.0]])
|
22 |
+
if show_plots:
|
23 |
+
plot_mesh(vertices, triangles, pins_xy)
|
24 |
+
arap = ARAP(pins_xy, triangles=triangles, vertices=vertices)
|
25 |
+
|
26 |
+
pins_xy = np.array([[-5.0, 0.0], [5.0, 0.0]])
|
27 |
+
v = arap.solve(pins_xy)
|
28 |
+
if show_plots:
|
29 |
+
plot_mesh(v, triangles, pins_xy)
|
30 |
+
|
31 |
+
assert np.isclose(v, np.array([
|
32 |
+
[-5.0, 0.0],
|
33 |
+
[0.0, 1.0],
|
34 |
+
[5.0, 0.0]
|
35 |
+
])).all()
|
36 |
+
|
37 |
+
|
38 |
+
def test_two_triangle_mesh():
|
39 |
+
show_plots = False # Make true if you'd like to see mesh viz during test run
|
40 |
+
vertices = np.array([
|
41 |
+
[1.0, 0.0],
|
42 |
+
[1.0, 1.0],
|
43 |
+
[2.0, 1.0],
|
44 |
+
[2.0, 0.0],
|
45 |
+
])
|
46 |
+
|
47 |
+
triangles = np.array([
|
48 |
+
[0, 1, 2],
|
49 |
+
[0, 2, 3],
|
50 |
+
], np.int32)
|
51 |
+
|
52 |
+
pins_xy = np.array([[1.0, 0.0], [2.0, 0.0]])
|
53 |
+
new = ARAP(pins_xy, triangles=triangles, vertices=vertices)
|
54 |
+
if show_plots:
|
55 |
+
plot_mesh(vertices, triangles, pins_xy)
|
56 |
+
|
57 |
+
pins_xy = np.array([[1.0, 0.0], [1.7, 0.7]])
|
58 |
+
v = new.solve(pins_xy)
|
59 |
+
if show_plots:
|
60 |
+
plot_mesh(v, triangles, pins_xy)
|
61 |
+
|
62 |
+
assert np.isclose(v, np.array([
|
63 |
+
[9.99999989e-01, -1.13708135e-08],
|
64 |
+
[2.91471856e-01, 7.05685418e-01],
|
65 |
+
[9.97157285e-01, 1.41137085e+00],
|
66 |
+
[1.70000001e+00, 7.00000011e-01]
|
67 |
+
])).all()
|
68 |
+
|
69 |
+
|
70 |
+
def test_four_triangle_mesh():
|
71 |
+
show_plots = False # Make true if you'd like to see mesh viz during test run
|
72 |
+
vertices = np.array([
|
73 |
+
[0.0, 0.0],
|
74 |
+
[0.0, 1.0],
|
75 |
+
[1.0, 1.0],
|
76 |
+
[1.0, 0.0],
|
77 |
+
[2.0, 1.0],
|
78 |
+
[2.0, 0.0],
|
79 |
+
[0.0, 2.0],
|
80 |
+
[1.0, 2.0],
|
81 |
+
[2.0, 2.0],
|
82 |
+
])
|
83 |
+
|
84 |
+
triangles = np.array([
|
85 |
+
[0, 1, 2],
|
86 |
+
[0, 2, 3],
|
87 |
+
[3, 2, 4],
|
88 |
+
[3, 4, 5],
|
89 |
+
|
90 |
+
[1, 6, 7],
|
91 |
+
[1, 7, 2],
|
92 |
+
[2, 7, 8],
|
93 |
+
[2, 8, 4]
|
94 |
+
], np.int32)
|
95 |
+
|
96 |
+
pins_xy = np.array([[0.0, 0.0], [0.0, 2.0], [2.0, 0.0]])
|
97 |
+
if show_plots:
|
98 |
+
plot_mesh(vertices, triangles, pins_xy)
|
99 |
+
new = ARAP(pins_xy, triangles=triangles, vertices=vertices)
|
100 |
+
|
101 |
+
new_pins_xy = np.array([[0.0, 0.0], [0.0, 3.0], [6.0, 0.0]])
|
102 |
+
v = new.solve(new_pins_xy)
|
103 |
+
if show_plots:
|
104 |
+
plot_mesh(v, triangles, new_pins_xy)
|
105 |
+
|
106 |
+
assert np.isclose(v, np.array([
|
107 |
+
[3.19325865e-06, 1.08194488e-06],
|
108 |
+
[6.78428061e-01, 1.37166545e+00],
|
109 |
+
[2.14606263e+00, 1.19790398e+00],
|
110 |
+
[2.81917351e+00, 1.12790606e-02],
|
111 |
+
[3.95163838e+00, 1.34725960e+00],
|
112 |
+
[5.99999596e+00, 5.51801260e-07],
|
113 |
+
[8.44193478e-07, 2.99999837e+00],
|
114 |
+
[1.46633111e+00, 2.60720416e+00],
|
115 |
+
[2.82413859e+00, 2.62209072e+00]
|
116 |
+
])).all()
|
tests/test_bvh.py
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
2 |
+
# This source code is licensed under the MIT license found in the
|
3 |
+
# LICENSE file in the root directory of this source tree.
|
4 |
+
|
5 |
+
from animated_drawings.model.bvh import BVH
|
6 |
+
from pkg_resources import resource_filename
|
7 |
+
|
8 |
+
|
9 |
+
def test_bvh_from_file():
|
10 |
+
bvh_fn = resource_filename(__name__, 'test_bvh_files/zombie.bvh')
|
11 |
+
b = BVH.from_file(bvh_fn)
|
12 |
+
|
13 |
+
# was the skeleton built correctly?
|
14 |
+
assert b.root_joint.joint_count() == 34
|
15 |
+
|
16 |
+
# did frame_time parse correctly?
|
17 |
+
assert b.frame_time == 0.0333333
|
18 |
+
|
19 |
+
# did frame num parse correctly?
|
20 |
+
assert b.frame_max_num == 779
|
21 |
+
|
22 |
+
# there should be root position data for each frame
|
23 |
+
assert b.frame_max_num == b.pos_data.shape[0]
|
24 |
+
# and it should be an xzy coordinate
|
25 |
+
assert b.pos_data.shape[-1] == 3
|
26 |
+
|
27 |
+
# there should be rotation data for each frame
|
28 |
+
assert b.frame_max_num == b.rot_data.shape[0]
|
29 |
+
# there should be a rotation for every joint within that frame
|
30 |
+
assert b.rot_data.shape[1] == b.root_joint.joint_count()
|
31 |
+
# and the rotation is a quaternion with dimensionality of 4
|
32 |
+
assert b.rot_data.shape[-1] == 4
|
tests/test_bvh_files/zombie.bvh
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tests/test_quaternions.py
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
2 |
+
# This source code is licensed under the MIT license found in the
|
3 |
+
# LICENSE file in the root directory of this source tree.
|
4 |
+
|
5 |
+
from animated_drawings.model.quaternions import Quaternions
|
6 |
+
from animated_drawings.model.vectors import Vectors
|
7 |
+
import numpy as np
|
8 |
+
|
9 |
+
|
10 |
+
def test_not_four_elements():
|
11 |
+
try:
|
12 |
+
Quaternions(np.array([0, 1, 2])) # should fail
|
13 |
+
except AssertionError:
|
14 |
+
return
|
15 |
+
assert False
|
16 |
+
|
17 |
+
|
18 |
+
def test_initialize_with_ndarray():
|
19 |
+
q = Quaternions(np.array([1, 0, 0, 0])) # should succeed
|
20 |
+
assert np.array_equal(q.qs, np.array([[1, 0, 0, 0]]))
|
21 |
+
|
22 |
+
|
23 |
+
def test_from_angle_axis():
|
24 |
+
angle = np.array([1.0])
|
25 |
+
axis = Vectors(np.array([1.0, 1.0, 1.0]))
|
26 |
+
q6 = Quaternions.from_angle_axis(angle, axis)
|
27 |
+
assert np.allclose(q6.qs, np.array(
|
28 |
+
[[0.87758256, 0.27679646, 0.27679646, 0.27679646]]))
|
29 |
+
|
30 |
+
|
31 |
+
def test_multiple_from_angle_axis():
|
32 |
+
angles = np.array([[1.0], [1.0]])
|
33 |
+
axis = Vectors(
|
34 |
+
np.array([[1.0, 1.0, 1.0], [1.0, 1.0, 1.0]], dtype=np.float32))
|
35 |
+
q1 = Quaternions.from_angle_axis(angles, axis)
|
36 |
+
assert np.allclose(q1.qs, np.array([
|
37 |
+
[0.87758256, 0.27679646, 0.27679646, 0.27679646],
|
38 |
+
[0.87758256, 0.27679646, 0.27679646, 0.27679646]]))
|
39 |
+
|
40 |
+
|
41 |
+
def test_to_rotation_matrix():
|
42 |
+
angles = np.array([[np.pi / 2]])
|
43 |
+
axis = Vectors(np.array([1.0, 0.0, 0.0], dtype=np.float32))
|
44 |
+
q1 = Quaternions.from_angle_axis(angles, axis)
|
45 |
+
assert np.allclose(q1.to_rotation_matrix(), np.array([
|
46 |
+
[1.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00],
|
47 |
+
[0.000000e+00, 0.000000e+00, -1.000000e+00, 0.000000e+00],
|
48 |
+
[0.000000e+00, 1.000000e+00, 0.000000e+00, 0.000000e+00],
|
49 |
+
[0.000000e+00, 0.000000e+00, 0.000000e+00, 1.000000e+00]]))
|
50 |
+
|
51 |
+
|
52 |
+
def test_from_rotation_matrix():
|
53 |
+
angles = np.array([[np.pi / 2]])
|
54 |
+
axis = np.array([1.0, 1.0, 0.0], dtype=np.float32)
|
55 |
+
q1 = Quaternions.from_angle_axis(angles, Vectors(axis))
|
56 |
+
q2 = Quaternions.from_rotation_matrix(q1.to_rotation_matrix())
|
57 |
+
assert np.allclose(q1.qs, q2.qs)
|
58 |
+
|
59 |
+
|
60 |
+
def test_to_euler_angles():
|
61 |
+
# TODO add test coverage for from_euler_angles
|
62 |
+
pass
|
63 |
+
|
64 |
+
|
65 |
+
def test_multiply():
|
66 |
+
# TODO add test coverage for quaternion multiplication
|
67 |
+
pass
|
tests/test_render.py
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
2 |
+
# This source code is licensed under the MIT license found in the
|
3 |
+
# LICENSE file in the root directory of this source tree.
|
4 |
+
|
5 |
+
from animated_drawings import render
|
6 |
+
from pkg_resources import resource_filename
|
7 |
+
import os
|
8 |
+
import pytest
|
9 |
+
|
10 |
+
|
11 |
+
@pytest.mark.skipif(os.environ.get('IS_CI_RUNNER') == 'True', reason='skipping video rendering for CI/CD')
|
12 |
+
def test_render_gif():
|
13 |
+
render_gif_cfg_fn = resource_filename(__name__, 'test_render_files/mvc_render_gif.yaml')
|
14 |
+
|
15 |
+
render.start(render_gif_cfg_fn)
|
16 |
+
|
17 |
+
assert os.path.exists('.tests/test_render_files/video.gif')
|
18 |
+
assert os.path.getsize('.tests/test_render_files/video.gif') > 100
|
19 |
+
|
20 |
+
os.remove('.tests/test_render_files/video.gif')
|
21 |
+
|
22 |
+
|
23 |
+
@pytest.mark.skipif(os.environ.get('IS_CI_RUNNER') == 'True', reason='skipping video rendering for CI/CD')
|
24 |
+
def test_render_mp4():
|
25 |
+
render_mp4_cfg_fn = resource_filename(__name__, 'test_render_files/mvc_render_mp4.yaml')
|
26 |
+
|
27 |
+
render.start(render_mp4_cfg_fn)
|
28 |
+
|
29 |
+
assert os.path.exists('.tests/test_render_files/video.mp4')
|
30 |
+
assert os.path.getsize('.tests/test_render_files/video.mp4') > 100
|
31 |
+
|
32 |
+
os.remove('.tests/test_render_files/video.mp4')
|
tests/test_render_files/char1/char_cfg.yaml
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
height: 602
|
2 |
+
skeleton:
|
3 |
+
- loc:
|
4 |
+
- 264
|
5 |
+
- 397
|
6 |
+
name: root
|
7 |
+
parent: null
|
8 |
+
- loc:
|
9 |
+
- 264
|
10 |
+
- 397
|
11 |
+
name: hip
|
12 |
+
parent: root
|
13 |
+
- loc:
|
14 |
+
- 247
|
15 |
+
- 232
|
16 |
+
name: torso
|
17 |
+
parent: hip
|
18 |
+
- loc:
|
19 |
+
- 231
|
20 |
+
- 119
|
21 |
+
name: neck
|
22 |
+
parent: torso
|
23 |
+
- loc:
|
24 |
+
- 151
|
25 |
+
- 245
|
26 |
+
name: right_shoulder
|
27 |
+
parent: torso
|
28 |
+
- loc:
|
29 |
+
- 99
|
30 |
+
- 278
|
31 |
+
name: right_elbow
|
32 |
+
parent: right_shoulder
|
33 |
+
- loc:
|
34 |
+
- 46
|
35 |
+
- 311
|
36 |
+
name: right_hand
|
37 |
+
parent: right_elbow
|
38 |
+
- loc:
|
39 |
+
- 343
|
40 |
+
- 218
|
41 |
+
name: left_shoulder
|
42 |
+
parent: torso
|
43 |
+
- loc:
|
44 |
+
- 396
|
45 |
+
- 245
|
46 |
+
name: left_elbow
|
47 |
+
parent: left_shoulder
|
48 |
+
- loc:
|
49 |
+
- 449
|
50 |
+
- 278
|
51 |
+
name: left_hand
|
52 |
+
parent: left_elbow
|
53 |
+
- loc:
|
54 |
+
- 191
|
55 |
+
- 404
|
56 |
+
name: right_hip
|
57 |
+
parent: root
|
58 |
+
- loc:
|
59 |
+
- 165
|
60 |
+
- 476
|
61 |
+
name: right_knee
|
62 |
+
parent: right_hip
|
63 |
+
- loc:
|
64 |
+
- 138
|
65 |
+
- 556
|
66 |
+
name: right_foot
|
67 |
+
parent: right_knee
|
68 |
+
- loc:
|
69 |
+
- 337
|
70 |
+
- 390
|
71 |
+
name: left_hip
|
72 |
+
parent: root
|
73 |
+
- loc:
|
74 |
+
- 376
|
75 |
+
- 456
|
76 |
+
name: left_knee
|
77 |
+
parent: left_hip
|
78 |
+
- loc:
|
79 |
+
- 409
|
80 |
+
- 549
|
81 |
+
name: left_foot
|
82 |
+
parent: left_knee
|
83 |
+
width: 508
|
tests/test_render_files/char1/joint_overlay.png
ADDED