BSJ2004 commited on
Commit
a080429
·
verified ·
1 Parent(s): 8a2ad0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -59
app.py CHANGED
@@ -387,38 +387,7 @@ with gr.Blocks(
387
 
388
  gr.HTML(
389
  """
390
- <h1>🏛️ VGGT: Visual Geometry Grounded Transformer</h1>
391
- <p>
392
- <a href="https://github.com/facebookresearch/vggt">🌟 GitHub Repository</a> |
393
- <a href="https://vgg-t.github.io/">🚀 Project Page</a>
394
- </p>
395
-
396
- <div style="font-size: 16px; line-height: 1.5;">
397
- <p>Upload a video or a set of images to create a 3D reconstruction of a scene or object. VGGT takes these images and generates all key 3D attributes, including extrinsic and intrinsic camera parameters, point maps, depth maps, and 3D point tracks.</p>
398
-
399
- <h3>Getting Started:</h3>
400
- <ol>
401
- <li><strong>Upload Your Data:</strong> Use the "Upload Video" or "Upload Images" buttons on the left to provide your input. Videos will be automatically split into individual frames (one frame per second).</li>
402
- <li><strong>Preview:</strong> Your uploaded images will appear in the gallery on the left.</li>
403
- <li><strong>Reconstruct:</strong> Click the "Reconstruct" button to start the 3D reconstruction process.</li>
404
- <li><strong>Visualize:</strong> The 3D reconstruction will appear in the viewer on the right. You can rotate, pan, and zoom to explore the model, and download the GLB file. Note the visualization of 3D points may be slow for a large number of input images.</li>
405
- <li>
406
- <strong>Adjust Visualization (Optional):</strong>
407
- After reconstruction, you can fine-tune the visualization using the options below
408
- <details style="display:inline;">
409
- <summary style="display:inline;">(<strong>click to expand</strong>):</summary>
410
- <ul>
411
- <li><em>Confidence Threshold:</em> Adjust the filtering of points based on confidence.</li>
412
- <li><em>Show Points from Frame:</em> Select specific frames to display in the point cloud.</li>
413
- <li><em>Show Camera:</em> Toggle the display of estimated camera positions.</li>
414
- <li><em>Filter Sky / Filter Black Background:</em> Remove sky or black-background points.</li>
415
- <li><em>Select a Prediction Mode:</em> Choose between "Depthmap and Camera Branch" or "Pointmap Branch."</li>
416
- </ul>
417
- </details>
418
- </li>
419
- </ol>
420
- <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>
421
- </div>
422
  """
423
  )
424
 
@@ -509,33 +478,7 @@ with gr.Blocks(
509
  )
510
  return glbfile, log_msg, target_dir, dropdown, image_paths
511
 
512
- gr.Markdown("Click any row to load an example.", elem_classes=["example-log"])
513
-
514
- gr.Examples(
515
- examples=examples,
516
- inputs=[
517
- input_video,
518
- num_images,
519
- input_images,
520
- conf_thres,
521
- mask_black_bg,
522
- mask_white_bg,
523
- show_cam,
524
- mask_sky,
525
- prediction_mode,
526
- is_example,
527
- ],
528
- outputs=[
529
- reconstruction_output,
530
- log_output,
531
- target_dir_output,
532
- frame_filter,
533
- image_gallery,
534
- ],
535
- fn=example_pipeline,
536
- cache_examples=False,
537
- examples_per_page=50,
538
- )
539
 
540
  # -------------------------------------------------------------------------
541
  # "Reconstruct" button logic:
 
387
 
388
  gr.HTML(
389
  """
390
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
391
  """
392
  )
393
 
 
478
  )
479
  return glbfile, log_msg, target_dir, dropdown, image_paths
480
 
481
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
482
 
483
  # -------------------------------------------------------------------------
484
  # "Reconstruct" button logic: