MCPcopy Create free account
hub / github.com/DSL-Lab/StreamSplat / receive

Function receive

gaussian_renderer_dynamic/network_gui.py:57–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55 conn.sendall(bytes(verify, 'ascii'))
56
57def receive():
58 message = read()
59
60 width = message["resolution_x"]
61 height = message["resolution_y"]
62
63 if width != 0 and height != 0:
64 try:
65 do_training = bool(message["train"])
66 fovy = message["fov_y"]
67 fovx = message["fov_x"]
68 znear = message["z_near"]
69 zfar = message["z_far"]
70 do_shs_python = bool(message["shs_python"])
71 do_rot_scale_python = bool(message["rot_scale_python"])
72 keep_alive = bool(message["keep_alive"])
73 scaling_modifier = message["scaling_modifier"]
74 world_view_transform = torch.reshape(torch.tensor(message["view_matrix"]), (4, 4)).cuda()
75 world_view_transform[:,1] = -world_view_transform[:,1]
76 world_view_transform[:,2] = -world_view_transform[:,2]
77 full_proj_transform = torch.reshape(torch.tensor(message["view_projection_matrix"]), (4, 4)).cuda()
78 full_proj_transform[:,1] = -full_proj_transform[:,1]
79 custom_cam = MiniCam(width, height, fovy, fovx, znear, zfar, world_view_transform, full_proj_transform)
80 except Exception as e:
81 print("")
82 traceback.print_exc()
83 raise e
84 return custom_cam, do_training, do_shs_python, do_rot_scale_python, keep_alive, scaling_modifier
85 else:
86 return None, None, None, None, None, None

Callers

nothing calls this directly

Calls 1

readFunction · 0.85

Tested by

no test coverage detected