test
Browse files
app.py
CHANGED
@@ -85,7 +85,6 @@ sys.path.append(str(Path(__file__).parent / "src" / "experiments"))
|
|
85 |
# from pgnd.sim import Friction, CacheDiffSimWithFrictionBatch, StaticsBatch, CollidersBatch
|
86 |
# from pgnd.material import PGNDModel
|
87 |
# from pgnd.utils import Logger, get_root, mkdir
|
88 |
-
from pgnd.ffmpeg import make_video
|
89 |
|
90 |
from real_world.utils.render_utils import interpolate_motions
|
91 |
from real_world.gs.helpers import setup_camera
|
@@ -96,6 +95,23 @@ from real_world.gs.convert import save_to_splat, read_splat
|
|
96 |
|
97 |
root = Path(__file__).parent / "src" / "experiments"
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
|
100 |
def quat2mat(quat):
|
101 |
import kornia
|
|
|
85 |
# from pgnd.sim import Friction, CacheDiffSimWithFrictionBatch, StaticsBatch, CollidersBatch
|
86 |
# from pgnd.material import PGNDModel
|
87 |
# from pgnd.utils import Logger, get_root, mkdir
|
|
|
88 |
|
89 |
from real_world.utils.render_utils import interpolate_motions
|
90 |
from real_world.gs.helpers import setup_camera
|
|
|
95 |
|
96 |
root = Path(__file__).parent / "src" / "experiments"
|
97 |
|
98 |
+
def make_video(
|
99 |
+
image_root: Path,
|
100 |
+
video_path: Path,
|
101 |
+
image_pattern: str = '%04d.png',
|
102 |
+
frame_rate: int = 10):
|
103 |
+
|
104 |
+
subprocess.run([
|
105 |
+
'ffmpeg',
|
106 |
+
'-y',
|
107 |
+
'-hide_banner',
|
108 |
+
'-loglevel', 'error',
|
109 |
+
'-framerate', str(frame_rate),
|
110 |
+
'-i', str(image_root / image_pattern),
|
111 |
+
'-c:v', 'libx264',
|
112 |
+
'-pix_fmt', 'yuv420p',
|
113 |
+
str(video_path)
|
114 |
+
])
|
115 |
|
116 |
def quat2mat(quat):
|
117 |
import kornia
|