JianyuanWang commited on
Commit
757e693
1 Parent(s): 5d6ede9

add instructions

Browse files
Files changed (1) hide show
  1. app.py +10 -6
app.py CHANGED
@@ -223,7 +223,7 @@ with gr.Blocks() as demo:
223
 
224
  gr.Markdown("""
225
  <div style="text-align: left;">
226
- <p>Welcome to <a href="https://github.com/facebookresearch/vggsfm" target="_blank">VGGSfM</a> demo!
227
  This space demonstrates 3D reconstruction from input image frames. </p>
228
  <p>To get started quickly, you can click on our examples (page bottom). If you want to reconstruct your own data, simply: </p>
229
  <ul style="display: inline-block; text-align: left;">
@@ -231,7 +231,7 @@ with gr.Blocks() as demo:
231
  <li>upload a video (.mp4, .mov, etc.) </li>
232
  </ul>
233
  <p>If both images and videos are uploaded, the demo will only reconstruct the uploaded images. By default, we extract one image frame per second from the input video. To prevent crashes on the Hugging Face space, we currently limit reconstruction to the first 20 image frames. </p>
234
- <p>For more details, check our <a href="https://github.com/facebookresearch/vggsfm" target="_blank">GitHub Repo</a> ⭐</p>
235
  <p>(Please note that running reconstruction on Hugging Face space is slower than on a local machine.) </p>
236
  </div>
237
  """)
@@ -240,14 +240,16 @@ with gr.Blocks() as demo:
240
  with gr.Column(scale=1):
241
  input_video = gr.Video(label="Input video", interactive=True)
242
  input_images = gr.File(file_count="multiple", label="Input Images", interactive=True)
243
- num_query_images = gr.Slider(minimum=1, maximum=10, step=1, value=5, label="Number of query images")
244
- num_query_points = gr.Slider(minimum=512, maximum=4096, step=1, value=1024, label="Number of query points")
 
 
245
 
246
  with gr.Column(scale=3):
247
  reconstruction_output = gr.Model3D(label="Reconstruction", height=520)
248
  log_output = gr.Textbox(label="Log")
249
 
250
- submit_btn = gr.Button("Submit")
251
 
252
  examples = [
253
  [cake_video, cake_images, 3, 4096],
@@ -267,7 +269,9 @@ with gr.Blocks() as demo:
267
  [reconstruction_output, log_output]
268
  )
269
 
270
- demo.launch(debug=True, share=True)
 
 
271
  ########################################################################################################################
272
 
273
  # else:
 
223
 
224
  gr.Markdown("""
225
  <div style="text-align: left;">
226
+ <p>Welcome to <a href="https://vggsfm.github.io/" target="_blank">VGGSfM</a> demo!
227
  This space demonstrates 3D reconstruction from input image frames. </p>
228
  <p>To get started quickly, you can click on our examples (page bottom). If you want to reconstruct your own data, simply: </p>
229
  <ul style="display: inline-block; text-align: left;">
 
231
  <li>upload a video (.mp4, .mov, etc.) </li>
232
  </ul>
233
  <p>If both images and videos are uploaded, the demo will only reconstruct the uploaded images. By default, we extract one image frame per second from the input video. To prevent crashes on the Hugging Face space, we currently limit reconstruction to the first 20 image frames. </p>
234
+ <p>If you meet any problem, feel free to create an issue in our <a href="https://github.com/facebookresearch/vggsfm" target="_blank">GitHub Repo</a> ⭐</p>
235
  <p>(Please note that running reconstruction on Hugging Face space is slower than on a local machine.) </p>
236
  </div>
237
  """)
 
240
  with gr.Column(scale=1):
241
  input_video = gr.Video(label="Input video", interactive=True)
242
  input_images = gr.File(file_count="multiple", label="Input Images", interactive=True)
243
+ num_query_images = gr.Slider(minimum=1, maximum=10, step=1, value=5, label="Number of query images",
244
+ info="More query images usually lead to better reconstruction at lower speeds. If the viewpoint differences between your images are minimal, you can set this value to 1. ")
245
+ num_query_points = gr.Slider(minimum=512, maximum=4096, step=1, value=1024, label="Number of query points",
246
+ info="More query points usually lead to denser reconstruction at lower speeds.")
247
 
248
  with gr.Column(scale=3):
249
  reconstruction_output = gr.Model3D(label="Reconstruction", height=520)
250
  log_output = gr.Textbox(label="Log")
251
 
252
+ submit_btn = gr.Button("Reconstruct")
253
 
254
  examples = [
255
  [cake_video, cake_images, 3, 4096],
 
269
  [reconstruction_output, log_output]
270
  )
271
 
272
+ # demo.launch(debug=True, share=True)
273
+ demo.queue(max_size=20, concurrency_count=1).launch(show_error=True)
274
+ # demo.queue(max_size=20, concurrency_count=1).launch(debug=True, share=True)
275
  ########################################################################################################################
276
 
277
  # else: