-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvis.py
32 lines (24 loc) · 804 Bytes
/
vis.py
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
import time
import argparse
from gs.renderer import GaussianRenderer
from gs.sh_renderer import SHRenderer
from utils.viewer.viser_viewer import ViserViewer
from omegaconf import OmegaConf
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("saved_model", type=str)
parser.add_argument("--device", type=str, default="cuda")
parser.add_argument("--port", type=int, default=8080)
opt = parser.parse_args()
renderer = SHRenderer.load(opt.saved_model)
renderer.eval()
viewer_conf = {
"viewer_port": opt.port,
"device": opt.device,
}
viewer_conf = OmegaConf.create(viewer_conf)
viewer = ViserViewer(viewer_conf)
viewer.set_renderer(renderer)
while True:
viewer.update()
time.sleep(1e-3)