Spaces:
Running
on
Zero
Running
on
Zero
fix num iter
Browse files- app.py +7 -7
- train_feat2gs.py +1 -1
app.py
CHANGED
@@ -59,7 +59,7 @@ def get_dust3r_args_parser():
|
|
59 |
return parser
|
60 |
|
61 |
|
62 |
-
@spaces.GPU(duration=
|
63 |
def run_dust3r(inputfiles, input_path=None):
|
64 |
|
65 |
if input_path is not None:
|
@@ -154,8 +154,8 @@ def run_dust3r(inputfiles, input_path=None):
|
|
154 |
|
155 |
return outfile, feat_image_path, opt, None, None
|
156 |
|
157 |
-
@spaces.GPU(duration=
|
158 |
-
def run_feat2gs(opt, niter=
|
159 |
|
160 |
if opt is None:
|
161 |
raise gr.Error("Please run Step 1 first!")
|
@@ -214,7 +214,7 @@ def run_feat2gs(opt, niter=200):
|
|
214 |
except Exception as e:
|
215 |
raise gr.Error(f"Step 2 failed: {str(e)}")
|
216 |
|
217 |
-
@spaces.GPU(duration=
|
218 |
def run_render(opt, args, cam_traj='ellipse'):
|
219 |
if opt is None or args is None:
|
220 |
raise gr.Error("Please run Steps 1 and 2 first!")
|
@@ -249,11 +249,11 @@ def run_render(opt, args, cam_traj='ellipse'):
|
|
249 |
except Exception as e:
|
250 |
raise gr.Error(f"Step 3 failed: {str(e)}")
|
251 |
|
252 |
-
|
253 |
def process_example(inputfiles, input_path):
|
254 |
dust3r_model, feat_image, dust3r_state, _, _ = run_dust3r(inputfiles, input_path=input_path)
|
255 |
|
256 |
-
output_model, feat2gs_state, _ = run_feat2gs(dust3r_state, niter=
|
257 |
|
258 |
output_video = run_render(dust3r_state, feat2gs_state, cam_traj='interpolated')
|
259 |
|
@@ -355,7 +355,7 @@ with demo:
|
|
355 |
|
356 |
with gr.Row(variant='panel'):
|
357 |
with gr.Tab("Step 2: Readout 3DGS from features & Jointly optimize pose"):
|
358 |
-
niter = gr.Number(value=
|
359 |
feat2gs_run = gr.Button("RUN Step 2")
|
360 |
with gr.Column(scale=1):
|
361 |
with gr.Group():
|
|
|
59 |
return parser
|
60 |
|
61 |
|
62 |
+
@spaces.GPU(duration=250)
|
63 |
def run_dust3r(inputfiles, input_path=None):
|
64 |
|
65 |
if input_path is not None:
|
|
|
154 |
|
155 |
return outfile, feat_image_path, opt, None, None
|
156 |
|
157 |
+
@spaces.GPU(duration=250)
|
158 |
+
def run_feat2gs(opt, niter=2000):
|
159 |
|
160 |
if opt is None:
|
161 |
raise gr.Error("Please run Step 1 first!")
|
|
|
214 |
except Exception as e:
|
215 |
raise gr.Error(f"Step 2 failed: {str(e)}")
|
216 |
|
217 |
+
@spaces.GPU(duration=250)
|
218 |
def run_render(opt, args, cam_traj='ellipse'):
|
219 |
if opt is None or args is None:
|
220 |
raise gr.Error("Please run Steps 1 and 2 first!")
|
|
|
249 |
except Exception as e:
|
250 |
raise gr.Error(f"Step 3 failed: {str(e)}")
|
251 |
|
252 |
+
@spaces.GPU(duration=250)
|
253 |
def process_example(inputfiles, input_path):
|
254 |
dust3r_model, feat_image, dust3r_state, _, _ = run_dust3r(inputfiles, input_path=input_path)
|
255 |
|
256 |
+
output_model, feat2gs_state, _ = run_feat2gs(dust3r_state, niter=2000)
|
257 |
|
258 |
output_video = run_render(dust3r_state, feat2gs_state, cam_traj='interpolated')
|
259 |
|
|
|
355 |
|
356 |
with gr.Row(variant='panel'):
|
357 |
with gr.Tab("Step 2: Readout 3DGS from features & Jointly optimize pose"):
|
358 |
+
niter = gr.Number(value=2000, precision=0, minimum=2000, maximum=8000, label="Training iterations")
|
359 |
feat2gs_run = gr.Button("RUN Step 2")
|
360 |
with gr.Column(scale=1):
|
361 |
with gr.Group():
|
train_feat2gs.py
CHANGED
@@ -66,7 +66,7 @@ def training(dataset, opt, pipe, testing_iterations, saving_iterations, checkpoi
|
|
66 |
progress_bar = tqdm(range(first_iter, opt.iterations), desc="Training progress")
|
67 |
first_iter += 1
|
68 |
|
69 |
-
warm_iter =
|
70 |
|
71 |
start = perf_counter()
|
72 |
for iteration in range(first_iter, opt.iterations + 1):
|
|
|
66 |
progress_bar = tqdm(range(first_iter, opt.iterations), desc="Training progress")
|
67 |
first_iter += 1
|
68 |
|
69 |
+
warm_iter = 1000
|
70 |
|
71 |
start = perf_counter()
|
72 |
for iteration in range(first_iter, opt.iterations + 1):
|