Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
0740a7a
1
Parent(s):
e8227e4
upadte app
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ from datetime import datetime
|
|
15 |
import glob
|
16 |
import gc
|
17 |
import time
|
18 |
-
|
19 |
|
20 |
|
21 |
sys.path.append("vggt/")
|
@@ -43,7 +43,7 @@ model.eval()
|
|
43 |
# -------------------------------------------------------------------------
|
44 |
# 1) Core model inference
|
45 |
# -------------------------------------------------------------------------
|
46 |
-
|
47 |
def run_model(target_dir, model) -> dict:
|
48 |
"""
|
49 |
Run the VGGT model on images in the 'target_dir/images' folder and return predictions.
|
@@ -183,7 +183,7 @@ def update_gallery_on_upload(input_video, input_images):
|
|
183 |
# -------------------------------------------------------------------------
|
184 |
# 4) Reconstruction: uses the target_dir plus any viz parameters
|
185 |
# -------------------------------------------------------------------------
|
186 |
-
|
187 |
def gradio_demo(
|
188 |
target_dir,
|
189 |
conf_thres=3.0,
|
@@ -413,7 +413,7 @@ with gr.Blocks(
|
|
413 |
</details>
|
414 |
</li>
|
415 |
</ol>
|
416 |
-
<p><strong style="color: #0ea5e9;">Please note:</strong> <span style="color: #0ea5e9; font-weight: bold;">Our
|
417 |
</div>
|
418 |
"""
|
419 |
)
|
|
|
15 |
import glob
|
16 |
import gc
|
17 |
import time
|
18 |
+
import spaces
|
19 |
|
20 |
|
21 |
sys.path.append("vggt/")
|
|
|
43 |
# -------------------------------------------------------------------------
|
44 |
# 1) Core model inference
|
45 |
# -------------------------------------------------------------------------
|
46 |
+
@spaces.GPU(duration=120)
|
47 |
def run_model(target_dir, model) -> dict:
|
48 |
"""
|
49 |
Run the VGGT model on images in the 'target_dir/images' folder and return predictions.
|
|
|
183 |
# -------------------------------------------------------------------------
|
184 |
# 4) Reconstruction: uses the target_dir plus any viz parameters
|
185 |
# -------------------------------------------------------------------------
|
186 |
+
@spaces.GPU(duration=120)
|
187 |
def gradio_demo(
|
188 |
target_dir,
|
189 |
conf_thres=3.0,
|
|
|
413 |
</details>
|
414 |
</li>
|
415 |
</ol>
|
416 |
+
<p><strong style="color: #0ea5e9;">Please note:</strong> <span style="color: #0ea5e9; font-weight: bold;">Our model itself usually only needs less than 1 second to reconstruct a scene. However, visualizing 3D points may take tens of seconds due to third-party rendering, which are independent of VGGT's processing time. Please be patient or, for faster visualization, use a local machine to run our demo from our <a href="https://github.com/facebookresearch/vggt">GitHub repository</a>. </span></p>
|
417 |
</div>
|
418 |
"""
|
419 |
)
|