support-local-realtime-SIBR-viewer
This commit is contained in:
parent
d412f8b22d
commit
eff2ff2e80
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ tensorboard_3d
|
||||
screenshots
|
||||
data/
|
||||
data
|
||||
submodules/
|
||||
|
||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -1,9 +1,7 @@
|
||||
[submodule "submodules/simple-knn"]
|
||||
path = submodules/simple-knn
|
||||
url = https://gitlab.inria.fr/bkerbl/simple-knn.git
|
||||
[submodule "submodules/diff-gaussian-rasterization"]
|
||||
path = submodules/diff-gaussian-rasterization
|
||||
url = https://github.com/graphdeco-inria/diff-gaussian-rasterization
|
||||
|
||||
[submodule "submodules/depth-diff-gaussian-rasterization"]
|
||||
path = submodules/depth-diff-gaussian-rasterization
|
||||
url = https://github.com/ingra14m/depth-diff-gaussian-rasterization
|
||||
|
||||
@ -76,7 +76,7 @@ def receive():
|
||||
world_view_transform[:,2] = -world_view_transform[:,2]
|
||||
full_proj_transform = torch.reshape(torch.tensor(message["view_projection_matrix"]), (4, 4)).cuda()
|
||||
full_proj_transform[:,1] = -full_proj_transform[:,1]
|
||||
custom_cam = MiniCam(width, height, fovy, fovx, znear, zfar, world_view_transform, full_proj_transform)
|
||||
custom_cam = MiniCam(width, height, fovy, fovx, znear, zfar, world_view_transform, full_proj_transform,time=0)
|
||||
except Exception as e:
|
||||
print("")
|
||||
traceback.print_exc()
|
||||
|
||||
17
train.py
17
train.py
@ -103,21 +103,34 @@ def scene_reconstruction(dataset, opt, hyper, pipe, testing_iterations, saving_i
|
||||
viewpoint_stack = temp_list.copy()
|
||||
else:
|
||||
load_in_memory = False
|
||||
|
||||
#
|
||||
count = 0
|
||||
for iteration in range(first_iter, final_iter+1):
|
||||
if network_gui.conn == None:
|
||||
network_gui.try_connect()
|
||||
while network_gui.conn != None:
|
||||
try:
|
||||
net_image_bytes = None
|
||||
custom_cam, do_training, pipe.convert_SHs_python, pipe.compute_cov3D_python, keep_alive, scaling_modifer, ts = network_gui.receive()
|
||||
custom_cam, do_training, pipe.convert_SHs_python, pipe.compute_cov3D_python, keep_alive, scaling_modifer = network_gui.receive()
|
||||
if custom_cam != None:
|
||||
count +=1
|
||||
viewpoint_index = (count ) % len(video_cams)
|
||||
if (count //(len(video_cams))) % 2 == 0:
|
||||
viewpoint_index = viewpoint_index
|
||||
else:
|
||||
viewpoint_index = len(video_cams) - viewpoint_index - 1
|
||||
# print(viewpoint_index)
|
||||
viewpoint = video_cams[viewpoint_index]
|
||||
custom_cam.time = viewpoint.time
|
||||
# print(custom_cam.time, viewpoint_index, count)
|
||||
net_image = render(custom_cam, gaussians, pipe, background, scaling_modifer, stage=stage, cam_type=scene.dataset_type)["render"]
|
||||
|
||||
net_image_bytes = memoryview((torch.clamp(net_image, min=0, max=1.0) * 255).byte().permute(1, 2, 0).contiguous().cpu().numpy())
|
||||
network_gui.send(net_image_bytes, dataset.source_path)
|
||||
if do_training and ((iteration < int(opt.iterations)) or not keep_alive) :
|
||||
break
|
||||
except Exception as e:
|
||||
print(e)
|
||||
network_gui.conn = None
|
||||
|
||||
iter_start.record()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user