alexnasa commited on
Commit
fe3aa70
·
verified ·
1 Parent(s): 8cb18fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -111,6 +111,7 @@ def get_reconstructed_scene(outdir, model, device):
111
  model.decoder,
112
  )
113
  plyfile = os.path.join(outdir, "gaussians.ply")
 
114
 
115
  export_ply(
116
  gaussians.means[0],
@@ -121,9 +122,12 @@ def get_reconstructed_scene(outdir, model, device):
121
  Path(plyfile),
122
  save_sh_dc_only=True,
123
  )
 
 
 
124
  # Clean up
125
  torch.cuda.empty_cache()
126
- return plyfile, video, depth_colored
127
 
128
 
129
  # 2) Handle uploaded video/images --> produce target_dir + images
 
111
  model.decoder,
112
  )
113
  plyfile = os.path.join(outdir, "gaussians.ply")
114
+ splatfile = os.path.join(outdir, "gaussians.splat")
115
 
116
  export_ply(
117
  gaussians.means[0],
 
122
  Path(plyfile),
123
  save_sh_dc_only=True,
124
  )
125
+ splat_data = process_ply_to_splat(plyfile)
126
+ save_splat_file(splat_data, splatfile)
127
+
128
  # Clean up
129
  torch.cuda.empty_cache()
130
+ return splatfile, video, depth_colored
131
 
132
 
133
  # 2) Handle uploaded video/images --> produce target_dir + images