ostapagon commited on
Commit
fccded4
·
1 Parent(s): c35f5f4

Reduce GPU duration and iterations in training and reconstruction functions

Browse files
Files changed (2) hide show
  1. demo/gs_train.py +1 -1
  2. demo/mast3r_demo.py +3 -3
demo/gs_train.py CHANGED
@@ -51,7 +51,7 @@ class ModelParams:
51
  data_device: str = "cuda"
52
  eval: bool = False
53
 
54
- @spaces.GPU(duration=170)
55
  def train(
56
  data_source_path, iterations, position_lr_init, position_lr_final, position_lr_delay_mult,
57
  position_lr_max_steps, feature_lr, opacity_lr, scaling_lr, rotation_lr,
 
51
  data_device: str = "cuda"
52
  eval: bool = False
53
 
54
+ @spaces.GPU(duration=20)
55
  def train(
56
  data_source_path, iterations, position_lr_init, position_lr_final, position_lr_delay_mult,
57
  position_lr_max_steps, feature_lr, opacity_lr, scaling_lr, rotation_lr,
demo/mast3r_demo.py CHANGED
@@ -173,7 +173,7 @@ def save_colmap_scene(scene, save_dir, min_conf_thr=2, clean_depth=False, mask_i
173
  save_pointcloud_with_normals(imgs, pts3d, masks, sparse_path)
174
  return save_path
175
 
176
- @spaces.GPU(duration=160)
177
  def get_reconstructed_scene(snapshot, current_scene_state,
178
  min_conf_thr, matching_conf_thr,
179
  as_pointcloud, cam_size, shared_intrinsics, clean_depth, filelist, **kw):
@@ -189,9 +189,9 @@ def get_reconstructed_scene(snapshot, current_scene_state,
189
  filelist = [filelist[0], filelist[0] + '_2']
190
 
191
  lr1 = 0.07
192
- niter1 = 600
193
  lr2 = 0.014
194
- niter2 = 300
195
  optim_level = 'refine+depth'
196
  mask_sky, transparent_cams = False, False
197
  if len(filelist) < 13:
 
173
  save_pointcloud_with_normals(imgs, pts3d, masks, sparse_path)
174
  return save_path
175
 
176
+ @spaces.GPU(duration=20)
177
  def get_reconstructed_scene(snapshot, current_scene_state,
178
  min_conf_thr, matching_conf_thr,
179
  as_pointcloud, cam_size, shared_intrinsics, clean_depth, filelist, **kw):
 
189
  filelist = [filelist[0], filelist[0] + '_2']
190
 
191
  lr1 = 0.07
192
+ niter1 = 100
193
  lr2 = 0.014
194
+ niter2 = 100
195
  optim_level = 'refine+depth'
196
  mask_sky, transparent_cams = False, False
197
  if len(filelist) < 13: